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

Simon Schampijer simon at schampijer.de
Thu Feb 9 03:56:06 EST 2012


On 02/01/2012 03:35 PM, Chris Leonard wrote:
> 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.

I think the TRANS string does handle this case fine. I have pushed the 
change.

Regards,
    Simon


More information about the Sugar-devel mailing list