bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gettext tools / squeezing whitespace


From: Bruno Haible
Subject: Re: gettext tools / squeezing whitespace
Date: Tue, 11 Feb 2003 19:34:19 +0100 (CET)

Karl Eichwalder writes:

> > What do you want to achieve with such a whitespace tolerant
> > comparison? msgmerge's fuzzy comparison already recognizes these
> > cases.
> 
> No, for my special applicition this isn't enough.  From time to time I
> misuse the .po file format and the gettext tools for proofreading
> purposes.
> 
> This means I've a database like file with approved messages (let's call
> it good.pot).  Then new .pot file for proofreading arrives (new.pot).
> Using gettext tool I can extract those messages from new.pot that are
> not available in good.pot; only these messages need proofreading.
>
> Sometimes there are some small whitespace differences; at times, I'd
> like to exclude those messages from proofreading. ...

There are three answers to this.

1) You are using only the msgid part, not really translations. So what
you actually use are files containing lists of strings. Much more
general tools should be available (databases etc.).

2) You can achieve what you want by abusing the gettext tools in the
following way. You pipe every input file through 3 filters:
   a. msgen,
   b. msgfilter sed -e 's/  */ /g'
   c. a simple script which converts

          msgid "foo"
          msgstr "bar"

      into

          msgid "bar"
          msgstr ""

3) Paul Eggert and I are / will be working on a program 'msgdiff'
which should make the proofreading task for translators easier. A kind
of "ediff" between PO/POT files. This tool could also be abused for
your case.

Bruno




reply via email to

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