[sugar] Non English fallbacks for translations
Thu Oct 16 21:07:07 EDT 2008
On Fri, Oct 17, 2008 at 7:18 AM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
> We have had this discussion before: we need to support multiple
> languages in a specific order while handling translations, eg: Aymara:
> Spanish: English
> I want to get this done for 9.1, and fiddled around with sugar code
> for sometime, and got the following screenshot (from Memorize
> activity): http://dev.laptop.org/~sayamindu/sugar_multilang.png
> (Restart Game is not translated into Aymara, so it shows up in
> Spanish as Reiniciar Juego, while the rest is in Aymara)
> With some work, I think I'll be able to come up with a patch which
> would enable this for sugar as well as the activities.
> However, there are two questions:
> a) This breaks existing i18n code. This means, activities which call
> "from gettext import gettext as _" will not be able to use
> translations. Removing that import line would work fine though. Is
> that OK ? There's a slightly ugly workaround that works in the initial
> tests that I did, but with that, activities with "from gettext import
> gettext as _" in the code will support only one non English language
> at a time.
Original GNU gettext already has fallback feature. (see
To me, it seems straightforward to make it happen in Sugar/activities
once the fallback mechanism is implemented in Python library.
I think the breaking i18n code in apps/sugar you suggested should not
be the way to go.
Am I missing something?
> b) We would need to change the control panel to support slection of >1
> languages. Eben, do you have any recommendation on how this should be
> done ? I have a mockup at
Also Etoys/Squeak has its own gettext implementation. So Etoys
needs to understand how current language settings will be exposed to
activities. I am assuming GNU gettext way (e.g. setting LANGUAGES to
> Sayamindu Dasgupta
> Sugar mailing list
> Sugar at lists.laptop.org
More information about the Sugar-devel