[Distutils] Msgfmt in distutils?
Toshio Kuratomi
a.badger at gmail.com
Thu Oct 2 01:28:09 CEST 2008
Philip Jenvey wrote:
>
> On Oct 1, 2008, at 11:25 AM, Toshio Kuratomi wrote:
>
>> Jeroen Ruigrok van der Werven wrote:
>>> -On [20081001 16:28], Toshio Kuratomi (a.badger at gmail.com) wrote:
>>>>> and have distutils do the right thing with the .po files at build time
>>>>> (generate .mo files from them) and at install time (install them into
>>>>> PREFIX/share/locales/LC_MESSAGES/, or wherever the distribution is
>>>>> configured to put them).
>>>
>>> [snip]
>>>
>>>> This has been a big deal for some applications I work on. Our first
>>>> cut
>>>> was to add new Build and InstallData command classes.
>>>
>>> Actually with Babel (http://babel.edgewall.org/) that's all handled.
>>>
>> That's good to know. One of our Turbogears applications uses Babel and
>> it definitely doesn't install to the right place. I'd love to fix it to
>> take advantage of Babel' properly. Would you be kind enough to point me
>> documentation on how to get Babel to install locale files? Looking at
>> the babel website, I only see documentation up to building the message
>> catalogs. If the install portion is integrated into setuptools is there
>> something I might have to configure in setup() to tell babel/setuptools
>> what directory to use?
>
> Once you have Babel generating .mo files, all you'll need is a
> package_data entry for them, e.g.:
>
> package_data={'foo': ['i18n/*/LC_MESSAGES/*.mo']},
>
> then the catalogs will make it into the final sdist/egg and be included
> during an installation.
>
Thanks! This isn't quite what I was asking, though. the orignal poster
was asking how to install the catalogs into /usr/share/locale, the
proper directory on a Linux system. I thouoght babel was able to do
that but it seems babel currently just handles the creation and
maintenance of the message catalogs. Which is a huge thing! I just was
hoping to get rid of my ugly code to move the catalogs into the system
directory.
-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20081001/2987a001/attachment-0001.pgp>
More information about the Distutils-SIG
mailing list