[Localization] Arabic translation
Simon Schampijer
simon at schampijer.de
Tue Sep 21 10:33:26 EDT 2010
On 09/21/2010 03:04 PM, Khaled Hosny wrote:
> Hi all,
>
>
> On Tue, Sep 21, 2010 at 02:48:30PM +0200, Simon Schampijer wrote:
>> Hi,
>>
>> in the arabic translation I found items that look wrong the translations
>> should include the '%d' days, weeks, months (أسبوع%.0s) [1]. And
>> actually, why do we have several forms here, are there languages that
>> have more than one singular and plural form? And which one is picked by
>> gettext if?
>
> Please check [1] for explanations about handling of plural forms in
> gettext.
Bert and Khaled, thanks for the pointers. Tomeu just told me that czech
has more than one plural forms, too. Point taken :)
> As for the %.0s, we are using it as place holder since the first three
> plural forms in Arabic (0, 1 and 2) should not contain the numeral value
> as the Arabic word used already denote the number. %.0s will just print
> nothing (a zero length string), it is just a hack to prevent application
> crashing. A better solution is to used named variable, %(week)d or
> something, and this will allow reordering and omitting unused
> variables, which is often needed in translations.
Hmm, ok. Actually we do 'crash' with this hack [1]. As the current Sugar
code expect the conversion specifier to be present.
There is a new formatter in Python 2.6 [2], however a python bug report
[3] suggest that there are still issues when used with gettext and that
using named variables would work fine. However either change would need
changes in the string itself, so we would have to port the existing
translations or ask translators to translate another time.
Regards,
Simon
[1] http://bugs.sugarlabs.org/ticket/2354
[2]
http://docs.python.org/whatsnew/2.6.html#pep-3101-advanced-string-formatting
[3] http://bugs.python.org/issue8359#msg103023
More information about the Localization
mailing list