svenfuchs / rails-i18n

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff
http://rails-i18n.org
MIT License
3.99k stars 2.77k forks source link

Russian: wrong display of the number in Russian language #855

Open afuno opened 5 years ago

afuno commented 5 years ago
ru:
  general:
    pluralization:
      subtopic:
        one: 1 подтема (1)
        few: "%{count} подтемы (2)"
        many: "%{count} подтем (3)"
        other: "%{count} подтем (4)"
. = t('general.pluralization.subtopic', count: '21')
. = t('general.pluralization.subtopic', count: '22')
. = t('general.pluralization.subtopic', count: 21)

Output:

21 подтем (4)    # ok - it is a string
22 подтем (4)    # ok - it is a string
1 подтема (1)    # not ok
afuno commented 5 years ago

https://github.com/svenfuchs/rails-i18n/blob/86942a876dfe5c53782dcc1b117acb946099c674/lib/rails_i18n/common_pluralizations/east_slavic.rb#L18-L22

mod10 = n % 10

The variable mod10 has a value of 1. This is a problem.

dmitry commented 5 years ago

I don't see a problem here:

1 - одна подтема
11 - одинадцать подтем # probably here is the problem, but everything is ok with value 1
21 - двадцать одна подтема
31 - тридцать одна подтема
digitalfrost commented 1 month ago

Can this ticket be closed? Is this still an issue?