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

Re: Gettext utility to compare two PO files



On Sun, Apr 10, 2005 at 07:40:25PM +0200, Christian Perrier wrote:
> For D-I l10n handling, I'm looking for a method for being able to
> isolate the msgids from a PO file which are NOT in another PO file.
> 
> Something like the opposite behaviour of msgcomm(1)
> 
> msgcmp(1) does something like this, but I would indeed need to output
> the strings which are in file1 but not in file2 as a PO file...

msgcomm -u does something very close. Indeed, to select the strings in 1.po
and not in 2.po, I think you could do:

msgcomm -u 1.po 2.po 2.po -o res.po

Strings which are both in 1 and 2 are discarded, and strings which are in 2
but not in 1 are also discarded since they are in both instance of 2.po.
Only strings which are in 1.po but not in 2.po remain.

Note that this is not tested, and that if it fails, doing such a tool which
the perl tools for Po manipulation contained in po4a should be quite easy.

Mt.

Attachment: signature.asc
Description: Digital signature


Reply to: