[XML-SIG] Will gettext do?
Uche Ogbuji
uche.ogbuji@fourthought.com
Tue, 30 Jan 2001 16:45:54 -0700
> It's my turn to go to bed now :-) but as a snap answer: the common
> tradition is to have 4Suite.<lang>.po in the source distribution,
> where <lang> is typically fr, de, en (and *not* fr_FR, de_DE, en_US -
> unless the German translation for Germany really differs from the one
> for, say, Austria). With that, it should not be too difficult to
> generate the directories in a loop.
Well, I do know that en_US could differ from en_GR, but probably not so it's
inconceivable to combine the two.
> Furthermore, I feel that any <package/<lang>/LC_MESSAGES/catalog.po
> approach is bad (even though it's gettext tradition), so I'd promote
> the idea of having <package>.<lang>.mo instead, and keeping the mo
> files all in a single directory. Unfortunately, I'm not sure whether
> gettext.py supports such a scheme - essentially, you need the module
> to tell you what languages to consider in what order, but you may want
> to override the resulting file naming scheme.
Given that I have reasonable dictionary for now, I'll leave it as is, and we
can go about improving it when we've shaken out all the cases.
> So *if* you can install into <python prefix>/share/locale, that is
> probably best if that also is the platform convention, otherwise, any
> scheme that just works should do - even if it creates many extra
> directories.
I'll investigate <python prefix>/share/locale
For now they,re in each module's directory itself, which is easy to find
(__file__), and I know can be written to on install.
> I'd support proposals to enhance gettext.py for easier distribution of
> catalogs - in particular on non-Unix platforms, as well as proposals
> to enhance distutils to support message catalogs.
I think I already have the distutils part down. It generates a "default" po
in a "generate" phase, and creates and installs the mo in a "build" phase.
See Ft/admin/DistExt.py
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python