Re: pygettext dilemma

[email protected] (François Pinard)
Newsgroups gmane.comp.python.internationalization
Message-ID <[email protected]>
[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.