Polls labels Russian pluralization missing translations

Already reported

The core has some same lables like new posts counter in main menu with the same bug.

1 Like

Is this a bug, or simply not translated yet?

I may have missed it, but I couldn’t find “few” anywhere in the plugin.
Closest I could find was in the plugins clients.__.yml files eg.

en:
  js:
    poll:
      voters:
        zero: "voters"
        one: "voter"
        other: "voters"

Pluralization is weird, try looking at crazy welsh for example

This is just a missing translation, there is no concept of “few” # like there is in Russian in English

But it’s not possible to translate those strings in Transifex. I guess we have to figure out if this is a bug in Transifex and hope that they fix it someday or if something can/should be done with the translation files in Discourse.

https://meta.discourse.org/t/a-better-poll-bar-chart-feature/28008/91?u=gerhard

Hmmm do we even ship polls to transifex?

Yes, the locale files of the poll plugin are available on Transifex.

1 Like

But do they even have a “few” property?

i still haven’t been able to find where that is coming from.

1 Like

Some languages have differing pluralization rules

Eg Arabic nplurals == 6

http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html

You can’t fit 6 buckets into 3 buckets

We need to figure out how to communicate this to transifex cc @neil @techAPJ

1 Like

It’s coming from the pluralization rules:

The Russian locale uses one, few and other.
The English locale uses one and other.

Transifex doesn’t detect a string as pluralized when the English locale file contains pluralizations different from one and other (e.g. it uses zero). That’s why few is not available in Transifex for those strings in the Russian locale.

I don’t think there’s a need for that. They already support up to 6 plural forms and all the supported languages should be configured correctly on their side.
If I’m not mistaken removing all the zero and many keys from the English locale should be enough.

1 Like

Then we should fix our scripts to do that @techAPJ

1 Like

I submitted a PR that should fix this as soon as the translations are pushed to Transifex.
https://github.com/discourse/discourse/pull/3574

BTW: Should the following keys be pluralized too?
https://github.com/gschlager/discourse/blob/patch-2/plugins/poll/config/locales/client.en.yml#L30-L34
If I’m not mistaken count will never be 1 for those keys, so the missing pluralization doesn’t matter for languages like English or German. But I imagine it could be a problem for languages like Russian…

I messaged the Transifex support and asked if they can change the algorithm that detects pluralization to support the special case of “zero”. If they can’t do that we’d need to rename all “zero” keys in the locale files and change the calls to I18n.t for those keys… There’s only one “many” key in the locale files and that’s a valid one.

4 Likes

Any updates here? There are also the same issues in the main Russian translation.

Unfortunately not. My PR hasn’t been merged yet.
I’m not sure how the team intends to fix the pluralization problems in the main translation files.

@kuchaev_iv Can you take a look at the following strings? Should they be pluralized too in order to create a proper Russian translation?
https://github.com/discourse/discourse/blob/master/plugins/poll/config/locales/client.en.yml#L23-L26