[Trac #1075] gettext-like docstring translation matrix

Zarro Boogs per Child bugtracker at laptop.org
Thu Mar 15 22:52:42 EDT 2007


#1075: gettext-like docstring translation matrix
---------------------------+------------------------------------------------
 Reporter:  orospakr       |       Owner:  orospakr 
     Type:  enhancement    |      Status:  new      
 Priority:  normal         |   Milestone:  Untriaged
Component:  documentation  |    Keywords:           
---------------------------+------------------------------------------------
 A translation matrix of docstrings in the module for the most commonly
 used public Python APIs seems to be about the only feasible way to
 implement any kind of internationalisation for the development
 environment.  Sugar, Hippo, and the Python standard library are likely
 candidates for this treatment.

 I propose a gettext like database for each relevant Python module that
 contains translated docstrings.  Entries would be keyed by the name of the
 Python module/class/function name to which the doctring belongs and an ISO
 639 Alpha2 or Alpha3 language code.  This way, the Python module itself
 need not be modified by translators, and the docstrings there would be
 authors' choice (generally English for official stuff, I imagine).

 The module could contain a "base" language code, so the system could
 accommodate modules with docstrings written in a language other than
 English.

 Develop activity would provide some built-in documentation browsing
 functionality that leverages this system (probably not an
 "Intellisense"-like thing though, because that is a pain to implement with
 Python in general).

 Epydoc and other tools could also be readily modified to print translated
 API references using this data.

 The tool itself could readily (and cleanly) implemented in Python, using
 AST reflection to discover docstrings in modules.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1075>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list