Re: Plural forms in translations



Claude Paroz wrote:
Le vendredi 07 mars 2008 à 15:15 +0530, Runa Bhattacharjee a écrit :
Hi Claude,

Claude Paroz wrote:
Hi all,

I noticed today that several translations (especially Marathi, Bengali,
Hindi, Indonesian and others) have problems because of the plural form. See e.g. http://l10n.gnome.org/languages/mr/gnome-2-22

Please, do not commit translations into GNOME SVN without checking first
that they pass 'msgfmt' check command:

msgfmt -vvc -o /dev/null mr.po

When there is a plural string, like this:

msgid "There is a tab with errors"
msgid_plural "There are %d tabs with errors"

You have to add the %d format string in your translation (if it is
present in the original string). At runtime, %d will be replaced by a
real number.

Please, correct the files as soon as possible.


Thanks for bringing this up. I have been updating the bn_IN.po files the past week after passing it with msgfmt, but none of the files show an errors:

[runab runab file-roller]$ msgfmt -cv -o /dev/null bn_IN.po 259 translated messages.

Weird.
$ msgfmt -vvc -o /dev/null bn_IN.po bn_IN.po:124: number of format specifications in 'msgid' and 'msgstr[1]'
does not match
msgfmt: found 1 fatal error
259 translated messages.

$ msgfmt --version
msgfmt (GNU gettext-tools) 0.16.1

In the particular case of file-roller bn_IN.po, the problem is that
msgstr[1] (translated plural form) is empty at line 125.


Yup, got it now. The msgfmt version I was using is this:
$ msgfmt --version
msgfmt (GNU gettext-tools) 0.14.6

The above error is thrown on my local file with the 0.16.1 version.

In any case, for languages which do not have a plural form, the problem might still persist in case the editor settings are set to "not require the plural forms". I get the following screen with only one placeholder for the msgstr string. [1]

regards
Runa

[1] http://runa.randomink.org/misc/file-roller-bn_IN%20-%20KBabel.png



--
blog: http://runab.livejournal.com
irc: mishti or runa_b on Freenode



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