[Bugs] #979 UNSP: Browse activity does not start if LANG=C

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Tue Jul 28 16:39:14 EDT 2009


#979: Browse activity does not start if LANG=C
------------------------------------------+---------------------------------
    Reporter:  cyberorg                   |          Owner:  erikos                     
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  Browse                     |        Version:  Unspecified                
    Severity:  Unspecified                |     Resolution:                             
    Keywords:  r?                         |   Distribution:  Unspecified                
Status_field:  Unconfirmed                |  
------------------------------------------+---------------------------------

Comment(by alsroot):

 Replying to [comment:3 sascha_silbe]:
 > Does the patch actually work?
 at least for me

 > I noticed a few issues:
 >
 > 1. locale.setlocale() is not called. From the locale.getdefaultlocale()
 documentation:
 >
 > > According to POSIX, a program which has not called setlocale(LC_ALL,
 "") runs using the portable 'C' locale. Calling setlocale(LC_ALL, "") lets
 it use the default locale as defined by the LANG variable. Since we don't
 want to interfere with the current locale setting we thus emulate the
 behavior in the way described above.

 I guess python does it otherwise gettext shouldn't work at all
 anyway locale.getdefaultlocale() returns right value

 > 2. lang.split('_') returns a list with one element for lang='C', so
 lang[1] would cause an !IndexError.
 >

 for LANG=C, locale.getdefaultlocale() returns (None, None), so
 lang.split('_') doesn't start at all

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/979#comment:4>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list