[XML-SIG] Will gettext do?

Martin v. Loewis martin@mira.cs.tu-berlin.de
Tue, 30 Jan 2001 10:04:46 +0100


> It turns out that the .pot files are useless.  Even Python's gettext
> module requires GNU gettext and the binary .mo files.

Sure, it requires .mo files - but why GNU gettext?

> So I wandered off to find out how to make these .mo files.  Never
> mind that I can't bloody get the GNU gettext command-line processor
> to do anything regardless of how many options and environment
> variables I throw at it.

Do you already got .mo files? The tool to create them is msgfmt, not
gettext (that utility reads .mo files). Of course, there is not much
fun to generate a binary catalog if it has no translations. So you'd
first produce 4Suite.de.po, send it to me, and I send it back to you
filled with German translations.  Then you use msgfmt.

> So first of all, this seems a non-starter in Windows.

Why, again, is that? To format the catalog? Please have a look at
Tools/i18n/msgfmt.py.

> It looks as if even if I get it to work, I'm going to need full
> access to /usr/share/locale on the machine.

gettext will look in /usr/share/locale for catalogs by default, yes -
unless you've called bindtextdomain before that. Of course, if you
know the specific catalog to use, you can also instanciate
gettext.GNUTranslations directly.

> I assume I'm missing a great deal here

That is my theory also :-)

> And I've read and re-read the Python 2.0 gettext docs.

Which documentation specifically? And what specific passages made you
despair (sp?).

Regards,
Martin