Feature Requests item #2846508, was opened at 2009-08-28 16:48
Message generated for change (Tracker Item Submitted) made by vvinet
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=284650…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Vincent Vinet (vvinet)
Assigned to: Nobody/Anonymous (nobody)
Summary: Replace in-code translations by gettext
Initial Comment:
Having thousands of lines of translations in the text is not very elegant, plus it
requires people to look at the code to make translations.
Using gettext could make this a lot easier to manage.
Attached is a patch that changes the family.py to use gettext translations in some places,
as well as a simple script to generate and compile translation files.
Since the translation is not dependant on the user's locale, but on the wiki's,
the i18n.py file created by the patch allows choosing the language to get the translation
from, and then getting the translation string.
In order to translate, "Category" for a French wiki, for example, you just need
to do _GT("fr").ugettext("Category") where _GT is a short alias for
the get_translation function in i18n.py
The .po file for "fr" language code is partly filled up for some of the
translations.
Sorry if this does not cover all strings so far. It only covers those I needed so far. If
there is interest for this feature, I can help to continue the integration, as well as
automatically generate the .po files for every language based on the current namespace
dictionary.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=284650…