[I18n-sig] Re: pygettext dilemma
François Pinard
pinard@iro.umontreal.ca
12 Aug 2001 20:41:34 -0400
[Martin v. Loewis]
> > One problem is that Python does not seem to automatically concatenate
> > a sequence of strings as a single one, when in docstring position.
> What version did you use to try this? It works fine for me:
Oops! You are right. Sorry, I made my tests wrong:
Python 2.1 (#1, Jul 3 2001, 21:59:44)
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> def bonjour():
... 'chez '
... 'vous!'
... pass
...
>>> bonjour.__doc__
'chez '
>>> def bonjour():
... 'chez ' 'vous!'
... pass
...
>>> bonjour.__doc__
'chez vous!'
>>>
So, there is no problem, and:
''""" LONG DOC STRING """
could be marked as translatable exactly like this. This could allow
sorting out between docstrings meant to be translated, from the others,
one string at a time, rather than one module at a time.
--
François Pinard http://www.iro.umontreal.ca/~pinard