-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
No plural form for dates with russian translation #8327
Comments
Problem somewhere here: https://github.com/go-gitea/gitea/blob/master/options/locale/locale_ru-RU.ini#L1804 |
Please go to https://crowdin.com/project/gitea to correct that. |
Sounds good, but, how gitea engine uses plural forms? Sorry, GO is not my favorite language ;) |
@KarelWintersky I don't know anything about the Russian language, but currently Gitea handles two cases: gitea/options/locale/locale_ru-RU.ini Line 1797 in 149758c
The second, plural, is gitea/options/locale/locale_ru-RU.ini Line 1804 in 149758c
Perhaps Otherwise, can you paste a screen capture showing the wrong string and what it should look like? |
However, the spelling of the word "days" depends on their number: 1 day -- 1 день Similarly with weeks, months, years. The plural form changes depending on the numeral. This packages, I think, can solve problem: https://github.com/go-playground/universal-translator |
@lunny This is a complex case that can't be handled by Crowdin; the usual singular/plural duality does not apply to Russian. Perhaps we should re-label this issue? (kind/bug? kind/enhancement?) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
So we could depend on package https://github.com/go-playground/locales and use %s on these translation strings about days. |
I don't know GOlang syntax, but... I think, it looks like missed
definitions at https://github.com/go-playground/locales/blob/master/ru_RU/ru_RU.go#L45 |
Lot of languages has more complex rules for plural form then English. From supported languages by gitea Czech, Latvian, Lithuanian, Polish, Russian, Serbian, Ukrainian - have complex rules French, Persian, Portuguese - are using singular for zero Other supported languages have same rules as English or have same form for one and many, so they must duplicate the translation. see https://unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html So, it should be better to rename this issue to add general support for plural forms of all these languages and incorporate some existing mechanism. There are many other situations in Gitea, not just dates.
Translators must chose form which is less wrong, but stil wrong. |
Did #23988 fix this? |
It needs this (for a complete solution, but not only the date/time) |
[x]
): anyDescription
Problem with plural forms of dates on russian translation:
Обновлено 2 дней назад
must be "2 дня"Same:
i.e. correct code (PHP, sorry):
and usage:
pluralForm(days, [ 'день', 'дня', 'дней' ])
and so on.Screenshots
https://try.gitea.io/explore/repos?page=2&sort=recentupdate&q=
The text was updated successfully, but these errors were encountered: