Martin once wrote, that Moodle mechanism is more flexible compared to gettext so I guess plurals should be handled correctly just as PHP ngettext would handle them if used strictly enough. (I know this is not the case - at least the second part - so this is more or less rhetorical.)
In addition to plural and singular, Slovenian language (and I know few other languages as well) has separate forms for dual and even plural forms are different depending on "n".
Has anybody faced such issues translating Moodle and managed to solve them?
Martin, will you address this issue in code or is there any workaround? I've been playing with filters but it just doesn't make sense.
// What follows just illustrates the issue
Let's look at message.php:
$string['messages'] = 'Messages'; or
$string['readmessages'] = '$a read messages';
those strings work in English for 0, 2 or more messages. In Slovenian we would need different forms for:
n=1 sporoèilo
n=2 sporoèili
n=3 or 4 sporoèila
n=0 or n>4 sporoèil
with extra rule that n should be treated as MOD 100 This basically means that we have borken translation for at least 3 cases of n (2,3 and 4) that are quite frequent.
This could be defined as
"Plural-Forms: nplurals=4; \
plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
in GNU Gettext and used with ngettext, but one should design app & messages correctly.