Open
Description
- Gitea version (or commit ref): 1.8.3
- Database (use
[x]
): any - Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
Description
Problem with plural forms of dates on russian translation:
Обновлено 2 дней назад
must be "2 дня"
Same:
- 1 день
- 2,3,4 дня
- 5-20 дней
- 21 день
- 22, 23, 24 дня
- 25 дней
i.e. correct code (PHP, sorry):
return
($number % 10 == 1 && $number % 100 != 11)
? $forms[0]
: (
($number % 10 >= 2 && $number % 10 <= 4 && ($number % 100 < 10 || $number % 100 >= 20))
? $forms[1]
: $forms[2]
);
and usage: pluralForm(days, [ 'день', 'дня', 'дней' ])
and so on.
Screenshots
https://try.gitea.io/explore/repos?page=2&sort=recentupdate&q=