Diffing POT files



I frequently encounter situations where I am interested in comparing
POT files that are closely related, but not 100% identical.

Does anyone know of a tool or scriptable series of actions using
Translate Toolkit modules (or other common text manipulation tools)
where it is simple to determine the differences between two POT files
(e.g. two versions of the same project at differnt points in time,
etc.).

I imagine something like a podiff or a pounique operation where there
are two inputs (file1.pot and file2.pot) and the output might ideally
be three files that represent the textual equivalent of a Venn diagram
of these two files.

file1-unique.pot
	msgids (still in a nice POT format) that are unique to file1

file2-unique.pot
	msgids (still in a nice POT format) that are unique to file2

file1-file2 common.pot
	msgids (still in a nice POT format) that represent the completely
identical msgid overlap between file1.pot and file2.pot.

This process should not permit fuzzy matching, which could lead to confusion.

Does anyone know of such a tool?  It would ideally be aware of PO file
structure to treat string subunits of a PO file as a single "chunk" as
opposed to a simple *nix diff which would be line-by-line.

Alternatively, does any one have an "algorithm" employing Transalte
Toolkit modules to achieve the same or similar result that could be
turned into a shell script that involves minimal manual manipulation
of the input of output files to achieve this sort of POT comparison
result.

TIA for any ideas or suggestions.

cjl
Sugar Labs Translation Team Coordinator


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]