[Bugs] #2385 UNSP: Turtle Art should respect locale when rendering decimal point

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Sep 29 10:37:29 EDT 2010


#2385: Turtle Art should respect locale when rendering decimal point
------------------------------------------+---------------------------------
    Reporter:  walter                     |          Owner:  walter                     
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  Turtleart                  |        Version:  Unspecified                
    Severity:  Unspecified                |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------

Comment(by sascha_silbe):

 Replying to [comment:5 erikos]:

 > {{{[erikos at pennylane ~]$ python}}}
 > {{{Python 2.6.4 (r264:75706, Jun  4 2010, 18:20:16)}}}
 > {{{[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2}}}
 > {{{Type "help", "copyright", "credits" or "license" for more
 information.}}}
 > {{{>>> import locale}}}}}}
 > {{{>>> locale.getdefaultlocale()}}}
 > {{{('de_DE', 'UTF8')}}}
 > {{{>>> locale.localeconv()['decimal_point']}}}
 > {{{'.'}}}

 This works as [http://docs.python.org/library/locale.html#background-
 details-hints-tips-and-caveats designed] (by
 [http://www.opengroup.org/onlinepubs/009695399/functions/setlocale.html
 POSIX]): all programs start in the C locale and need to call
 {{{setlocale()}}} first for any locale environment variable to take
 effect.
 The [http://docs.python.org/library/locale.html#locale.setlocale
 recommended way] to do that is to set LC_ALL to the empty string:

 {{{
     locale.setlocale(locale.LC_ALL, '')
 }}}

 I would expect {{{sugar.activity.main}}} to do that for all activities
 that use our framework.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/2385#comment:6>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list