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

Ajay Garg ajay at activitycentral.com
Fri Jan 20 01:37:55 EST 2012


Ahh,, that's an interesting scenario ...

So, what could be the solution ??!! ; may be re-phrase the information as ::
                      Time remaining : 1:46

instead of
                      1:46 remaining

In this, "Time remaining" could be localized, while "1:46" will be a mere value.


*However, the question pops up - how to handle Right-To-Left languages then* ?

I will be grateful if someone could enlighten the way to go about in such cases.


Regards,
Ajay




On Fri, Jan 20, 2012 at 8:37 AM, Gonzalo Odiard <gonzalo at laptop.org> wrote:
> This patch does not solve the bug and introduce a new l10n problem.
> You put the 'remaining' string at the end, and can exist languages where
> should be in different order.
>
> Gonzalo
>
> On Thu, Jan 19, 2012 at 6:35 PM, Ajay Garg <ajay at activitycentral.com> wrote:
>>
>> Signed-off-by: Ajay Garg <ajay at activitycentral.com>
>> ---
>>  extensions/deviceicon/battery.py |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/extensions/deviceicon/battery.py
>> b/extensions/deviceicon/battery.py
>> index 260cb12..63530fe 100644
>> --- a/extensions/deviceicon/battery.py
>> +++ b/extensions/deviceicon/battery.py
>> @@ -155,8 +155,9 @@ class BatteryPalette(Palette):
>>                 minutes_remaining = self._time // 60
>>                 remaining_hourpart = minutes_remaining // 60
>>                 remaining_minpart = minutes_remaining % 60
>> -                secondary_text = _('%(hour)d:%(min).2d remaining') % \
>> +                time_value = '%(hour)d:%(min).2d ' % \
>>                         {'hour': remaining_hourpart, 'min':
>> remaining_minpart}
>> +                secondary_text = time_value + _('remaining')
>>         else:
>>             secondary_text = _('Charged')
>>
>> --
>> 1.7.4.4
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


More information about the Sugar-devel mailing list