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

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

Re: Using gettext for arbitrary file format


From: Bruno Haible
Subject: Re: Using gettext for arbitrary file format
Date: Wed, 24 Jul 2002 15:12:08 +0200 (CEST)

Jean-Marc Lasgouttes writes:
> We use gettext in the lyx project (www.lyx.org) not only to
> translate C++ source strings, but also some strings that we have in
> our data files (and also Qt ui files). Currently, we have an ugly sed
> script which creates a dummy extl10n.h files and run xgettext on that.
> This is however not very convenient.

Yes, in particular this throws away the context information (file +
line number) that is useful to many translators.

You could achieve better results by creating a file ext_l10n.pot
instead of ext_l10n.h, using similar regexps, and then combine this
pot file with the other one using 'msgcat'. Similar to what is described
in the gettext manual, node "Maintainers for other Languages".

> Is there some way in xgettext to handle arbitrary formats? I would
> think that it could be possible to describe by a regexp (like we do in
> our ugly sed scripts) the syntax (usually simple) that we want to
> capture.

xgettext doesn't handle "arbitrary" formats. But for your particular
format you can easily create a converter to pot.

Bruno



reply via email to

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