[Sugar-devel] [PATCH] sl#2815: Localization fixes.

Chris Leonard cjlhomeaddress at gmail.com
Wed Feb 1 09:35:31 EST 2012


On Tue, Jan 31, 2012 at 7:38 AM, Sascha Silbe <silbe at activitycentral.com> wrote:
> Excerpts from David Mason's message of 2012-01-31 03:16:14 +0100:
>
>
> David, I'm assuming you replied in private accidentally, so I'm bringing
> the thread back on-list.
>
>> > Similar to your previous patch [1], gettext already flags this as a
>> > format string. As this particular example is a bit more complicated,
>> > I'm less averse to accepting the patch, but I'd still prefer a solution
>> > that tells translators how to properly handle them without requiring us to
>> > mention that for each and every format string in the code.
>>
>> We've just implemented a validator in zanata's translation editor that will warn translators when there is any change in printf style variables. I based it on the validator in translation toolkit, and I believe a similar validator is also available in pootle. Having translators performing translations through Zanata (www.zanata.org) or Pootle, or use translation toolkit or running msgmerge with appropriate options, could make handling of variables in translations a lot cleaner.
>
> Sugar Labs already uses a Pootle instance [1], which Chris (who
> requested the changes discussed in this thread) maintains.
>
> Chris, what are the exact cases where format strings are troublesome? Is
> it with translators using translation tools outside of Pootle (which
> tools exactly?) or when translating inside Pootle?


The particular string in question was

"%(hour)d:%(min).2d remaining"

The tools handle this properly, however, it had been my observation
that translators had a tendency to translate the variable names (hour
and minutes) on this particular string, so I felt it was worth asking
for the translator's comment.  It is as simple as that.

When the string was improperly translated, it would be flagged by the
pofilter checks from the Translate Toolkit built into the Review tab
of Poolte, so it was relatively straight-forward to find and correct.

I'm sure Zanata is a fine tool, but we've developed a L10n community
around our Pootle instance and they are familiar with Pootle and we
are pretty good at managing our Pootle instance and it's interactions
with Gitorious, so I do not see any reason at present to consider
switching, but I will spend some time looking over Zanata to better
understand what it has to offer.

cjl
Sugar labs Translation Team Coordinator


More information about the Sugar-devel mailing list