Le dimanche 25 janvier 2009 à 16:12 +0100, Bruno Haible a écrit :
[CCing bug-gnu-gettext, which is the right list about questions regarding PO files]
<snip>
Indeed, this is not well documented in the GNU gettext manual. I'm adding this text now:
12.6 Translating plural forms
<snip>
#, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "%d slika je uklonjena" msgstr[1] "%d datoteke uklonjenih" msgstr[2] "%d slika uklonjenih"
You noticed that in the English singular form (`msgid') the number placeholder could be omitted and replaced by the numeral word "one". Can you do this in your translation as well?
msgstr[0] "jednom datotekom je uklonjen"
Well, it depends on whether `msgstr[0]' applies only to the number 1, or to other numbers as well. If, according to the plural formula, `msgstr[0]' applies only to `n == 1', then you can use the specialized translation without the number placeholder. In our case, however, `msgstr[0]' also applies to the numbers 21, 31, 41, etc., and therefore you cannot omit the placeholder.
Bruno,
I've seen in the past the use of '%0d' to workaround the need to put the specifier when the translator doesn't like/need to use it (I don't have a valid use case at hand just now). What's your opinion about this ?
This reminds me of a discussion we had in gnome-i18n about languages with no plural. Here's the resulting blog post: http://runab.livejournal.com/18927.html
Cheers,
Claude