[sugar] Non English fallbacks for translations

Korakurider korakurider
Thu Oct 16 21:07:07 EDT 2008


Hi

On Fri, Oct 17, 2008 at 7:18 AM, Sayamindu Dasgupta <sayamindu at gmail.com> wrote:
> 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.

  Original GNU gettext already has fallback feature. (see
http://www.gnu.org/software/gettext/manual/gettext.html#The-LANGUAGE-variable)
 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
> http://dev.laptop.org/~sayamindu/scp_multilang_mockup.png
  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
"fr:es")

>
> Thanks,
> Sayamindu
>
>
> --
> Sayamindu Dasgupta
> [http://sayamindu.randomink.org/ramblings]
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>



More information about the Sugar-devel mailing list