[Python-Dev] Re: [Patches] Translating doc strings

Martin von Loewis loewis@informatik.hu-berlin.de
Fri, 2 Jun 2000 14:33:07 +0200 (MET DST)


> Do you plan to use GNU gettext here ? (This would cause the
> translated version of Python to fall under GPL, AFAIK)

No, I plan to use the Python gettext module, which is currently being
integrated into Python. It will either use the system's gettext
library, or read mo files using pure Python.

> I'd propose to use the existing doc-strings as keys to=20
> a translation mapping. This assures that existing doc-strings
> remain intact and that the actual translation process is
> done at query time, e.g. by using a help() built-in function.

This is more or less what I've planned. I'd propose to call the
function doc, with an interface like

>>> doc(time.time)
time() -> Gleitkommazahl

Gib die aktuelle Zeit in Sekunden seit Beginn der Epoche zur=FCck.
Sekundenbruchteile sind vorhanden, falls die Systemuhr sie bereitstellt.

It won't use a dictionary, though, but the underlying gettext query
mechanism. Exact naming and parameters are certainly subject to
discussion, my proposal would be

doc(object, doprint=3D1, translate=3D1)

so that users save quite some typing over

>>> print time.time.__doc__=20
time() -> floating point number

Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.

> This will only work iff the translations can be submitted
> via the usual "post to patches with dislcaimer" method...
> aren't the GNU people interested in putting the translations
> under the GPL ?

Is it really necessary to have the translations posted to
patches@python.org? Or would it be sufficient if translators express
their disclaimer in some other way.

I don't think the translation teams are "the GNU people"; the
translators accepted to assign their copyright to the FSF for the
translations they did - I'd assume at least some of them would also
accept maintaining the copyright, or assigning it to the Python
Consortium (or whoever else wants it). It's more that the Python
distributor would need to make suggestions what the copyright on
translations should be - I'm sure that could be clearly communicated
to the translators.

Regards,
Martin