[I18n-sig] pygettext and msgfmt support for distutils

Barry Warsaw barry@python.org
22 Apr 2003 15:19:47 -0400

On Thu, 2003-04-17 at 06:23, Bernhard Herzog wrote:
> 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.

I tend to think about updating the .pot file on a much different
schedule than creating source distributions.  Actually, sdist-time would
be too late since I usually like to give my translators a little
heads-up before a release.

> 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.

In my experience, this isn't too much of a problem.  It's usually pretty
easy to write a find script to calculate the files for extraction.  The
hard part (for me) is figuring out which files you also want to extract
docstrings for, and such a distinction isn't built into distutils
(although possibly could be -- they're usually command line scripts).