[Python-Dev] Re: [Patches] Translating doc strings
Barry A. Warsaw
bwarsaw@python.org
Fri, 2 Jun 2000 09:37:42 -0400 (EDT)
>>>>> "MvL" == Martin von Loewis <loewis@informatik.hu-berlin.de> writes:
MvL> No, I plan to use the Python gettext module, which is
MvL> currently being integrated into Python. It will either use
MvL> the system's gettext library, or read mo files using pure
MvL> Python.
pygettext is in Tools/i18n, and I've been working with James
Henstridge and Peter Funk on getting a standard gettext module
integrated into the core. A few other things have bumped that down on
my list, but it's still there.
We'll still need xgettext to scan the C code. Also, marking Python
module docstrings is a bit problematic. I've resorted to Something
Really Ugly:
-------------------- snip snip --------------------
try:
import fintl
_ = fintl.gettext
except ImportError:
def _(s): return s
__doc__ = _("""pygettext -- Python equivalent of xgettext(1)
...")
-------------------- snip snip --------------------
Yuck.
-Barry