Re: [system-monitor] string changes



i should have pointed at
http://live.gnome.org/TranslationProject/DevGuidelines/Plurals earlier.
i think everything is also perfectly described other there... :-)

Am Sonntag, den 06.01.2008, 17:06 +0100 schrieb Benoît Dejean:
> Le dimanche 06 janvier 2008 à 15:22 +0100, Andre Klapper a écrit :
> > in English, a noun differs only in its singular and plural forms. that
> > does not work for a lot of languages, so yes, please use ngettext.
> 
> I know, but i don't get it.
> If i read you correctly, we should then use ngettext on every string
> with a plural.

no, because languages have only one word for a non-defined number of
things, like when you write "windows", without any number or "%u" in
front of it.

the problem is when you have a string like "%u windows". even if it
always plural, you must use ngettext because for example in czech, the
translation of "%u seconds" is "%u okna" for 2 < %u < 4 and "%u oken"
for %u >= 5. it totally depends on the value of %u, that is what
ngettext is about.

see in gnome-system-monitor/trunk/po/cs.po:
"Plural-Forms:  nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
or in gnome-system-monitor/trunk/po/ar.po:
"Plural-Forms: nplurals=4; plural=n==1 ? 0 : n==2 ? 1 : n>=3 && n<=10 ? 2 : 3\n"
or in gnome-system-monitor/trunk/po/sl.po:
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"

another example (cannot come up with an explicit language though): some
languages may also have different words for "windows" in the cases of
{1,11,21,31,...}windows and {2,12,22,32,...}windows.

andre

-- 
 mailto:ak-47 gmx net | failed
 http://www.iomc.de/  | http://blogs.gnome.org/aklapper

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]