[sugar] Non English fallbacks for translations

Sayamindu Dasgupta sayamindu at gmail.com
Thu Oct 16 18:18:54 EDT 2008


Hello,
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.

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
http://dev.laptop.org/~sayamindu/scp_multilang_mockup.png

Thanks,
Sayamindu


-- 
Sayamindu Dasgupta
[http://sayamindu.randomink.org/ramblings]


More information about the Sugar mailing list