[I18n-sig] pygettext and msgfmt support for distutils

Bernhard Herzog bh@intevation.de
17 Apr 2003 12:23:52 +0200


martin@v.loewis.de (Martin v. L÷wis) writes:

> I'm with Barry here: You shouldn't have xgettext as part of the build
> or install commands.

That wasn't quite my intention. For the xgettext step I was thinking
more of a separate command that is not automatically called when doing a
build. It seems to me that maybe such a command should be run as part of
the sdist command to make sure that a .pot file shipped with the sources
is up to date.

Another reason I thought it might be good to have it as part of
distutils is that it could make use of information the distutils have
to, say, extract the translatable strings from all python source files
in the distribution.

> Providing a different command would be fine. For msgfmt, having that
> as a build step would be useful.
> 
> However, more important, to me, seems to define a mechanism to
> smoothly install .mo files, in a location where gettext would find
> them.

That wasn't much of a problem in our case, but thuban is more an
application than a library so we don't install under site-packages and
so have more control over where to look for mo files. 

I simply put the mo files into a directory right next to another
directory containing data files (icons). I use this scheme in Sketch too
(although without distutils so far) and so far nobody has complained
about this :).

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/