[Sugar-devel] [Feature] Starting an activity in a different locale than the system locale

Gonzalo Odiard gonzalo at laptop.org
Tue Feb 26 07:38:22 EST 2013


I think is a nice feature to have.
The tricky part should be how solve the UI.
Probably, can be done if we implement the new launcher screen,
instead of the menu in the home and the flashing animation.

Gonzalo


On Tue, Feb 19, 2013 at 7:20 AM, Simon Schampijer <simon at schampijer.de>wrote:

> Hi,
>
> when talking about the 'grab watch hands' feature [1] in the Clock
> activity I came across the desire to show the written clock information
> (e.g. ten minutes to 10 am) in different languages.
>
> To make that easily manageable without reloading translations on run-time
> I was wondering if there would be a general desire to run activities in
> different locales independent from the system. One scenario would be that a
> teacher in a Spanish speaking country would start the Clock activity in the
> English locale to teach the clock in English.
>
> The question is, if starting an activity in a different locale than the
> system locale that would be an interesting feature in general. Advantages
> would be that the locale of the system does not change, making
> experimenting with languages not as disruptive. Would people think that
> would be a pedagogical interesting feature?
>
> Technically, one of doing this would be to set the 'LANG/LANGUAGE' env
> variable in sugar-activity, reading the config from a system file. That
> file could be modified in an activity section (e.g. control panel or the
> activity list view...)
>
> diff --git a/bin/sugar-activity b/bin/sugar-activity
> index abaa091..070a196 100644
> --- a/bin/sugar-activity
> +++ b/bin/sugar-activity
> @@ -104,6 +104,8 @@ def main():
>      os.environ['SUGAR_BUNDLE_ID'] = bundle.get_bundle_id()
>      os.environ['SUGAR_BUNDLE_NAME'**] = bundle.get_name()
>      os.environ['SUGAR_BUNDLE_**VERSION'] = str(bundle.get_activity_**
> version())
> +    os.environ['LANG'] = 'de_DE'
> +    os.environ['LANGUAGE'] = 'de_DE'
>
>      # must be done early, some activities set translations globally, SL
> #3654
>      locale_path = i18n.get_locale_path(bundle.**get_bundle_id())
>
>
> Regards,
>    Simon
>
> [1] http://bugs.sugarlabs.org/**ticket/1959<http://bugs.sugarlabs.org/ticket/1959>
> ______________________________**_________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.**org <Sugar-devel at lists.sugarlabs.org>
> http://lists.sugarlabs.org/**listinfo/sugar-devel<http://lists.sugarlabs.org/listinfo/sugar-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130226/2ba94ee2/attachment.html>


More information about the Sugar-devel mailing list