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

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Sep 21 10:49:34 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 erikos):

 If
 [http://lists.laptop.org/pipermail/localization/2010-September/002696.html
 translators] put zero length strings into the translations we might for a
 simple fix just check if there is a conversion specifier in the returned
 string and otherwise just display the string.

 Something like:
 {{{
 diff --git a/src/sugar/util.py b/src/sugar/util.py
 index b947c0a..d531a2a 100644
 --- a/src/sugar/util.py
 +++ b/src/sugar/util.py
 @@ -274,7 +274,12 @@ def timestamp_to_elapsed_string(timestamp,
 max_levels=2):
                  translation = gettext.dngettext('sugar-toolkit',
                                                  name_singular,
                                                  name_plural,
 -                                                elapsed_units) %
 elapsed_units
 +                                                elapsed_units)
 +                try:
 +                    translation % elapsed_units
 +                except TypeError:
 +                    pass
 +
                  _i18n_timestamps_cache[key] = translation
                  time_period += translation
 }}}

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


More information about the Bugs mailing list