[Top][All Lists]

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

Re: make msgcmp stricter on demand

From: Bruno Haible
Subject: Re: make msgcmp stricter on demand
Date: Sat, 9 Sep 2006 16:42:10 +0200
User-agent: KMail/1.9.1


Mariano Suárez-Alvarez wrote:
> I'm writing some tools which involve manupulating .po and .pot files,

You know of the libgettextpo library, which is designed to simplify such

> and I'm in the process of writing some tests for the tools. I was
> wondering if an option could be added to msgcmp so that it fails when
> there is even a warning, so that one can use it to compare for exact
> 'equality' (of the significant parts, up to permutations, &c)

msgcmp, as is, compares "two Uniforum style .po files to check
that both contain the same set of msgid strings."

If you want to check that both the msgid ans msgstr strings are the
same, ignoring differences in the comments, then I suggest that you
invoke "msgfmt -o - | msgunfmt -" on both files and compare the result
using "cmp".

If you want to check that also the comments, line numbers, flags are
the same, invoke "msgcat" on both, and compare the result using "cmp".

By the way, if your tools contains functionality that is not specific
to the GNOME project, you are welcome to propose it for inclusion in
GNU gettext, in one form or the other!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]