Opened 12 years ago

Closed 12 years ago

#3211 closed defect (duplicate)

Finance i18n errors

Reported by: cjl Owned by: godiard
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Finance Version: Unspecified
Severity: Unspecified Keywords:
Cc: dsd Distribution/OS: Unspecified
Bug Status: 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

# 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

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

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.

Change History (1)

comment:1 Changed 12 years ago by cjl

  • Resolution set to duplicate
  • Status changed from new to closed

Closing as dupe of #3190

Note: See TracTickets for help on using tickets.