Already reported
The core has some same lables like new posts counter in main menu with the same bug.
Already reported
The core has some same lables like new posts counter in main menu with the same bug.
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?
But do they even have a âfewâ property?
i still havenât been able to find where that is coming from.
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
Itâs coming from the pluralization rules:
https://github.com/discourse/discourse/blob/master/lib/javascripts/locale/ru.js
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.
Then we should fix our scripts to do that @techAPJ
I submitted a PR that should fix this as soon as the translations are pushed to Transifex.
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.
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?