[Bugs] #3211 UNSP: Finance i18n errors

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Fri Oct 21 00:19:28 EDT 2011


#3211: Finance i18n errors
------------------------------------------+---------------------------------
    Reporter:  cjl                        |          Owner:  godiard                    
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  Finance                    |        Version:  Unspecified                
    Severity:  Unspecified                |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------
 Finance in Spanish testing by dsd:

 "Next Year" must be "Año siguiente", not "Siguiente Año".  The same for
 "Previous Year", should be "Año anterior", not "Anterior Año".  And also
 "This Year" should be "Este año", not "Esto Año".

 This is an internationalization error in the activity.  It assumes an
 English-like syntax of adjective (previous/this/next) + self.period (day,
 week, year, forever)

 Lines 454-457 of finance.py

 # Update the label self.period to reflect the period.
 self.prevperiodbtn.set_tooltip(_('Previous') + ' ' + self.period)
 self.thisperiodbtn.set_tooltip(_('This') + ' ' + self.period)
 self.nextperiodbtn.set_tooltip(_('Next') + ' ' + self.period)


 Lines 388-402 of finance.py

 def update_header(self):

 if self.period == _('Day'):
         text = self.period_start.strftime("%B %d, %Y")
 elif self.period == _('Week'):
         text = _('Week of') + self.period_start.strftime(" %B %d, %Y")
 elif self.period == _('Month'):
         text = self.period_start.strftime("%B, %Y")
 elif self.period == _('Year'):
         text = self.period_start.strftime("%Y")
 elif self.period == _('Forever'):
         text = _('Forever')


 There seems to be a similar erroneous compositing/concatenation of strings
 with fixed syntax at Lines 227-234 of finance.py

 Proper internationalization practice would not use concatenated strings.
 It is preferred to spell out all of the permutations to allow the
 localizers to correctly represent the output string in their native
 language's syntactic structure, even if this means more strings to work
 on.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3211>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list