Open mtrakal opened 1 year ago
OK, I understand the problem, but I think it's not trivial to fix it.
According to my short investigation:
ICU message syntax
, where plural rules could be defined in this way: https://support.crowdin.com/icu-message-syntax/#pluralvuei18n
which we're using for translating within the app, "ICU" seems to be possible to be supported via a custom formatter, see https://kazupon.github.io/vue-i18n/guide/formatting.html#custom-formattingSo probably this would be the way to go, however it's some effort to implement where I currently don't have the ressources for it. But you're welcome to try it and to open a PR if it's successful. Otherwise I think we have to live with imperfect translation for now. But in general great, that you're translating the app to Czech! 👍
Corwdin supports plurals by default, which looks really named ICU Plurals:
When you have access to Arasaac crowdin: https://crowdin.com/translate/arasaac/14/en-cs#3172
I think it should be used: https://kazupon.github.io/vue-i18n/guide/pluralization.html#accessing-the-number-via-the-pre-defined-argument pluralization not custom formatting.
I'm sorry, but I'm not a JS developer, it's too far from by my scope (Android in Kotlin). So I can create more issues, than help :)
Sure, it's ok to use it as is now with just one type (non-pluralization), it's just way how to improve it :)
I think it should be used: https://kazupon.github.io/vue-i18n/guide/pluralization.html#accessing-the-number-via-the-pre-defined-argument pluralization not custom formatting.
I've also seen this, but the pluralization format in vue-i18n
looks very different from that supported by crowdin, so I don't see how to directly combine them. Maybe the way to go is to write some javascript within a custom pluralization which parses the ICU format from crowdin.
On some places is used text like "250 elements", but it should be plular string in that case.
Crowdin: https://crowdin.com/translate/asterics-grid/14/en-cs#1784
Current state: I'm not able to properly translate this string, because in Czech we use more variants (the same will be in Polish, Slovak almost any other language).
0 prvkŮ 1 prvEk 2 prvkY 3 prvkY 4 prvkY 5 prvkŮ 1000 prvkŮ
plural for {zero}, {one}, {few}, {many}, {others} (based on country): https://localizely.com/language-plural-rules/
On image is shown:
250 prvky
but should be250 prvků
but if I translate it toprvků
it will not work for 1-4 elements.