[Bugs] #2354 UNSP: Activities list view and Journal view crashes in Arabic

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Sep 21 11:11:49 EDT 2010


#2354: Activities list view and Journal view crashes in Arabic
------------------------------------------+---------------------------------
    Reporter:  erikos                     |          Owner:  erikos                     
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar-toolkit              |        Version:  0.90.x                     
    Severity:  Unspecified                |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------

Comment(by sascha_silbe):

 Replying to [comment:1 erikos]:
 > Python 2.6 contains a new way for formatting, described
 [http://docs.python.org/library/stdtypes.html here] and
 [http://docs.python.org/whatsnew/2.6.html#pep-3101-advanced-string-
 formatting here].

 That's not necessary, older versions of Python can do formatting using
 dictionaries quite fine:

 {{{
 >>> "%(seconds)d seconds elapsed" % {'seconds': 5}
 '5 seconds elapsed'
 >>> "seconds elapsed" % {'seconds': 5}
 'seconds elapsed'
 >>> "%(second)d seconds elapsed" % {'seconds': 5}
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 KeyError: 'second'
 >>>
 }}}

 > However this might have issues when using with gettext as described in
 [http://bugs.python.org/issue8359#msg103023 this] python bug.

 As mentioned in the bug report you cited, the above method works fine with
 gettext.

 In case the formatting fails, we should fall back to the next-most
 preferred language, down to C = original string if necessary.

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


More information about the Bugs mailing list