[Sugar-devel] [PATCH] localization support for GNOME version

Walter Bender walter.bender at gmail.com
Wed Feb 16 12:12:25 EST 2011


On Wed, Feb 16, 2011 at 11:58 AM, Sascha Silbe
<sascha-ml-reply-to-2011-2 at silbe.org> wrote:
> Excerpts from Walter Bender's message of Wed Feb 16 17:16:35 +0100 2011:
>
> [bindtextdomain() etc.]
>> That is exactly what we do already. The problem is that es is not
>> recognized as a valid locale for setting LC_NUMERIC.
>
> gettext and locale specific functions are more or less independent of
> each other. The latter are initialized using [1]:
>
> locale.setlocale(locale.LC_ALL, '')
>
> Sugar does not do this as part of the activity framework (though we
> probably should).
>
> However TurtleArt already uses setlocale() in tawindow.TurtleArtWindow.
> The only idea I have right now is that you might be using locale
> dependent functions before TurtleArtWindow is instantiated. Try moving
> the setlocale() call out of TurtleArtWindow. The setlocale() call
> affects the entire process, so it shouldn't be hidden in a random
> constructor anyway.

In v106, I include the bindtextdomain calls...
The tawindow construct is the top-level construct that is shared by
both the GNOME and Sugar codepaths.

Regardless, I agree that set locale should be in Sugar itself. I think
I filed a ticket about this a while ago... will look when I come up
for air.

-walter

>
> Sascha
>
> [1] http://docs.python.org/library/locale.html#locale.setlocale
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list