Missing plural formatting

Just working through the OJS _locale file and realised that when gd was added as a locale, the right plural forms weren’t associted with the locale. For example I only see
subscriptionTypes.year
subscriptionTypes.years
but gd requires 4 forms (ONE, TWO, FEW, OTHER) cf the plural rules on CLDR Language Plural Rules

Could an admin fix this please? Cheers :slight_smile:

Hi @akerbeltz,

Unfortunately, for the moment, OJS doesn’t support this kind of granularity in plurals. (We only recently moved to using the .po format for localization, rather than the homebrew XML format we used before that, and have not yet adopted all the capabilities of the .po format and gettext backing libraries.) I’d suggest choosing the best option for the moment and watching for movement on this github issue.

Regards,
Alec Smecher
Public Knowledge Project Team

Ugh ok, thanks, I’ve subscribed to the issue on github. Based on experience, how quickly/slowly do such infra bugs move?

Hi @akerbeltz,

This one’s likely to take a while, I’m afraid; it’s a big change and there aren’t many cases where the current solution has been reported not to work well. However, the dev team is definitely trying to replace its own stack with standard tools and libraries, and that will eventually come to our use of the .po file format.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I would not take the lack of error reports as a sign that all is well. Most translators simply don’t know this is an issue that CAN be fixed. Of the languages I’ve seen in OJS, many will be affected by bad plurals, in particular all Slavonic language (Czech, Russian etc) which have got very complex plural rules. This isn’t really a nice-to-have, it looks pretty naff to users in 2020 if plurals are wrong.

Hi @akerbeltz,

I hear you, and do plan to adopt more of the gettext toolset in facilitation of this. We’re making small steps in this direction all the time (the most recent, for example, being the introduction of the full Laravel stack to our dependencies list, and the addition of a temporary work-around to the Laravel __ translation helper until we reconcile ours with it). That is to say, we’re working towards it but are also steering a fairly big ship and it’ll take time to turn it.

I tried to learn Czech once, and can confirm that the pluralization rules are daunting!

Regards,
Alec Smecher
Public Knowledge Project Team