Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Localization] Add counts localization for non-English languages #888

Open
SadmL opened this issue Oct 17, 2024 · 3 comments
Open

[Localization] Add counts localization for non-English languages #888

SadmL opened this issue Oct 17, 2024 · 3 comments
Labels
enhancement New feature or request i18n

Comments

@SadmL
Copy link

SadmL commented Oct 17, 2024

Problem I have

In Russian and in other slavic languages (and not only them, I guess) we have different word endings (+suffixes sometimes).
As I wrote on Crowdin:

1 post = 1 пост (same applyable for 11, 21, 31 and so on)
2 - 4 post(s) = 2 - 4 пост(а) (12-14, 22-24, 32-34 and so on)
5 - 10 post(s) = 5 - 10 пост(ов) (15-20, 25-30, 35-40 and so on)

I don't like using multiple endings in round squares, it's look meh.
Example - Подпис(ка/ки/ок) (Follow/2-4 Follows/5-10 Follows)

Solution I'd like

Using formulas like this, as far as I understand
изображение
Thing is I don't know how to adapt it for other languages if they have different rules for count.
I guess, only if separate this formulas for different languages (if it possible on Crowdin), but it is additional mind load for dev how to manage it properly...

Alternatives considered

No response

Other

No response

@SadmL SadmL added the enhancement New feature or request label Oct 17, 2024
@cheeaun
Copy link
Owner

cheeaun commented Oct 17, 2024

@cheeaun cheeaun added the i18n label Oct 17, 2024
@SadmL
Copy link
Author

SadmL commented Oct 17, 2024

Um, if I understand it correctly, in case of slavic languages it will be
{0, plural, =0 {# "translated word in needed form"} one {# "translated word in needed form"} few {# "translated word in needed form"} other {# "translated word in needed form"}}
for counts
"0" in this case is starting point to count (?)

@cheeaun
Copy link
Owner

cheeaun commented Oct 20, 2024

Seems like the starting zero in {0, plural… is the variable, like {count, plural…, but it became "0" due to the library unable to extract a readable variable name out of the code… 😅

I suppose you can ignore the starting "0" for now. I'll look into making them more readable, maybe changing the "0" to "repliesCount" for example, but a bunch of strings will have to be retranslated again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request i18n
Projects
None yet
Development

No branches or pull requests

2 participants