Skip to content


Model plural label fix: Count must be 'other' to apply :other key with every locale.  #1517

merged 1 commit into from

3 participants


Two for count doesn't apply right plural key (:other) for some languages.
For example, in russian locale it calls :few key and applies wrong translation.

 >> I18n.locale = :ru
 >> I18n.t 'activerecord.models.user', count: 2
 => "Пользователя"  #wrong
 >> I18n.t 'activerecord.models.user', count: 'other'
 => "Пользователи"  #right
 >> I18n.t.locale = :en 
 => I18n.t 'activerecord.models.user', count: 'other'
 => "Users"
@estum estum Model plural label fix
Count must be 'other' to apply :other key with every locale. 

I agree, this is very important.

@bbenezech bbenezech merged commit 026a145 into sferik:master

1 check passed

Details default The Travis build passed
@estum estum deleted the estum:patch-2 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 12, 2013
  1. @estum

    Model plural label fix

    estum committed
    Count must be 'other' to apply :other key with every locale. 
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rails_admin/config/model.rb
2 lib/rails_admin/config/model.rb
@@ -60,7 +60,7 @@ def object_label
register_instance_option :label_plural do
- (@label_plural ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(:count => 2, :default => label.pluralize)
+ (@label_plural ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(:count => 'other', :default => label.pluralize)
def pluralize(count)
Something went wrong with that request. Please try again.