[Routing] collecting translations of driving-instructions

Eddy Petrișor eddy.petrisor at gmail.com
Wed Feb 25 15:29:42 GMT 2009


Marcus Wolschon a scris:
> 
> Hello,
> 
> I started the page:
> http://wiki.openstreetmap.org/wiki/Sample_driving_instructions
> 
> to collect translations of driving-instructions for all our
> routing and navigation -programs to use.
> It is clear that not every project has developers speaking
> every language, so we may as well collect a pool of translations.
> 
> I tried to give the pages an easy to parse structure,
> so that a simple script can extract the translations and
> build the .properties, .po or whatever files the individual
> program uses.

It is very nice what you're trying to do, but I must warn you that some
languages, such as Serbian, have different forms for the plural
depending on the number of counted items. Same is for Russian, iirc.

Here is the plural formula for russian and some examples:

nplurals=3;
plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 ||
n%100>=20) ? 1 : 2);\n"

As you can see, there are two different plural forms + 1 for singular:

msgid "%i player connected"
msgid_plural "%i players connected"
msgstr[0] "%i игрок присоединился"
msgstr[1] "%i игрока присоединились"
msgstr[2] "%i игроков присоединились"


msgid "%s has won %u point of energy!"
msgid_plural "%s has won %u points of energy!"
msgstr[0] "%s получил %u единицу энергии!"
msgstr[1] "%s получил %u единицы энергии!"
msgstr[2] "%s получил %u единиц энергии!"


Thus, is incorrect to give only a plural form for such languages.

Please look at the ngettext formulas to understand more about this
subject and probably copy that model to properly support such languages.


Note that Romanian is also in such a case, but is not that problematic
since the differentiation appears at count values over X20 (i.e. 20,
120, 220) which are quite big compared with Russian (4) or Serbian (5).

-- 
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/routing/attachments/20090225/7f2f982f/attachment.pgp>


More information about the Routing mailing list