Marking translatable strings
Barry A. Warsaw
bwarsaw at cnri.reston.va.us
Thu Sep 16 17:07:18 EDT 1999
>>>>> "BH" == Bernhard Herzog <herzog at online.de> writes:
BH> If you're careful to only use double-quoted strings inside of
BH> _(), you can even use xgettext to build the initial
BH> po-files. xgettext will likely complain about lots of invalid
BH> character constants and strings if you have single- and
BH> triple-quoted strings in your source, but otherwise it works
BH> quite well.
This is exactly what my pygettext.py script is for. It understands
Python syntax and all the ways to spell a string. You'd use it
instead of xgettext to generate the .po files, then stuff like the GNU
gettext tools and Martin's intl module from there.
http://www.python.org/~bwarsaw/software/Code/pytgettext.py
-Barry
More information about the Python-list
mailing list