Re: Plural support in translations
pablo-4qZELD6FgxhWk0Htik3J/[email protected]
| Newsgroups | gmane.linux.mandrake.cooker.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Kaixo! On Wed, Jan 31, 2007 at 01:30:00AM +0800, Abel Cheung wrote: >> zh_CN.po:"Plural-Forms: nplurals=1; plural=0;\n" >> zh_TW.po:"Plural-Forms: nplurals=1; plural=0;\n" > > For Chinese, it is not unconditional to have single plural form. > Single plural form is only used in cases of specifying a quantity > of something, like: 1 horse, 2 horses, 5 pieces of paper etc. That is exactly the intended use of ngettext. > If sentences in ngettext() call include certain words like > his/her -> their, then the plural form is the same as English, > since the singular/plural forms of his/her are different in Chinese > as well. Actually, there are various erroneous use of ngettex, I should talk about the developpers about it. ngettext should be used only with a number, eg "%d horse(s)", and not if you want to make a difference between "none/one/several"; that is because ngettext only guarantees that it will return a translated return associated with a number, there is no guarantee that there will be a given return only in case of "none" or "one"; several languages have a same return for "1" and "11" and "21" etc. and even for languages with a simple two forms singular/plural some use the singular form for "none", while others use the plural form (in terms of the "plural-forms" formula, some are plural=(n > 1), while others are plural=(n != 1) In rpmdrake for example: msgid "The following package is needed:" msgid_plural "One of the following packages is needed:" is an incorrect usage of ngettext; it would be better to have to separate calls to normal gettext; as the distinction "only one" vs "one among many" is not a case of grammatical difference of a same word (like "man" vs "men" in English) but a different wording. And also, there is no guarantee that all languages have a special case return of ngettext for n=1. Actually almost all slavic languages don't have a special case for n=1, which means that the same translation will be used when there is only 1 package or 1 among 21. In Welsh po files there is actually a special case for n=2, then generic case for all the others, which makes it impossible to have a translation of the intended difference "only one" vs "one amon many". -- Ki ça vos våye bén, Pablo Saratxaga http://chanae.walon.org/pablo/ PGP Key available, key ID: 0xD9B85466 [you can write me in Walloon, Spanish, French, English, Catalan or Esperanto] [min povas skribi en valona, esperanta, angla aux latinidaj lingvoj]
signature.asc
(application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFFwd41pSX1mtm4VGYRAmMFAJ9dZcAXGKRzsjIQNlDV/KuN0eUAMwCdFY4t hTYIKxwhJGDAoKkK1+bhyYc= =TYo1 -----END PGP SIGNATURE-----