Thanks to Yuri, I was led to study this page:
https://www.gnu.org/software/gettext/manual/gettext.html#Translating-plural-forms
... and I haven't read it all but I learned enough about how to get good
translations of plurals.
Translators, are you all familiar with what's at that link (section 12.6)?
Maybe you know it from translating other programs, but it is a feature of
the gettext utilities that Audacity has not yet taken advantage of.
At last I figured out the missing options we need for xgettext, so that
msgid_plural does get generated from uses of wxPLURAL. Now my local
generated version of audacity.pot includes:
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
... near the top, which can be replaced with something language appropriate
(see section 11.2.6 of the link); and later...
#: src/Project.cpp:5734
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgstr[1] ""
#: src/Project.cpp:5735
msgid "minute"
msgid_plural "minutes"
msgstr[0] ""
msgstr[1] ""
... and the translator replaces the msgstr lines with some number of lines
determined by the Plural-Forms header, maybe more or fewer than two.
Thus Ukrainian, for instance, could apply its rules declining "hour" in one
of several different ways, as required by the numeral, while Chinese with
no plurals could supply just one form.
There are only two uses of wxPLURAL in the code now, which generated what's
above, but Yuri has convinced me that we should rely on this macro more.
I repeat, I will make an updated .pot for 2.2.0, mostly to fill some gaps
in the translation, adding (and removing) strings, but making very few
changed strings, even if bad grammar still results in your language.
But I hope to address plurals more thoroughly when development opens for
the next version. That will involve many changes of translated strings.
Some of you might then take the opportunity to work on the .po updates
early.
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
Audacity-translation@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-translation