[Bugs] #3190 UNSP: bad string concatenation for translators
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Fri Oct 21 13:22:26 EDT 2011
#3190: bad string concatenation for translators
------------------------------------------+---------------------------------
Reporter: dsd | 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
------------------------------------------+---------------------------------
Changes (by cjl):
* cc: cjl (added)
Comment:
Closing #3211 dupe
"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/3190#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list