Attention, Bruno, Kaya, and Yuri,
As I previously mentioned, poedit warns me that your .po files had the
Plural-Forms directive in the header set unusually for your languages.
There is a discussion of plural forms here:
https://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms
For Portuguese, I think poedit just gives a false warning. The file has
this directive:
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
That is appropriate with a language like English with a distinction of one
and more-than-one, and according to the gettext documentation, Portuguese
is like that. (And pt_BR.po has the same directive too.)
Turkish is also like that, but the file has:
"Plural-Forms: nplurals=1; plural=0;\n"
That line works for a language with no number distinctions like Chinese.
The gettext documentation explains that Turkish does not change noun forms
when they occur after a numeral, but there are some examples in
audacity.pot that are not like that. For instance:
#: src/PluginManager.cpp
msgid "Enable this plug-in?"
msgid_plural "Enable these plug-ins?"
msgstr[0] "Bu uygulama ekleri etkinleştirilsin mi?"
Should there be a msgstr[1] with a Turkish plural form? The tr.po header
must be edited so that msgmerge with audacity.pot will then make the
msgstr[1] for you to fill in.
Finally Ukrainian. gettext documentation says this:
"Three forms, special cases for numbers ending in 1 and 2, 3, 4, except
those ending in 1[1-4]
The header entry would look like this:
Plural-Forms: nplurals=3; \
plural=n%10==1 && n%100!=11 ? 0 : \
n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
Languages with this property include:
Slavic family
Russian, Ukrainian, Belarusian, Serbian, Croatian"
That expression means you map a number to a place in the msgstr[] table
thus:
return 0 for 1, 21, 31, ...
return 1 for 2, 3, 4, 22, 23, 24, 32, 33, 34, ...
return 2 for 5 through 20, 25 through 30, 35 through 40, ...
(and similarly for each century)
>From what I know of Russian, the first case is where you use nominative
singular, the second genitive singular, the last, genitive plural. (Unless
the noun phrase as a whole is in an oblique case, not nominative.)
Is it correct that Ukrainian has identical rules? But uk.po has this
instead:
"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n"
In other words:
return 0 for 21, 31, ...
return 1 in no case
return 2 for 2
return 3 for 1 and 3
For all other numbers, return out-of-bounds! This can't be right.
For all these languages, tell me you think your Plural-Forms is really
correct, despite the references above, and I will ignore the warning from
poedit. Or else, you still have opportunity to fix it. There are not very
many uses yet of msgid_plural -- only 6. But I hope to make more
consistent use of it in future. There may be places where it should be
used but isn't.
Or if it's only the one header line that needs correction, I can fix that
by hand.
PRL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-translation mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-translation