Skip to content

Commit

Permalink
Model label should be pluralized with locale
Browse files Browse the repository at this point in the history
Right now it uses `locale: :en`. So it might be incorrectly pluralized.
  • Loading branch information
Kabie committed May 8, 2014
1 parent 6ca05c6 commit 0333946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_admin/config/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def object_label
end

register_instance_option :label_plural do
(@label_plural ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(count: Float::INFINITY, default: label.pluralize)
(@label_plural ||= {})[::I18n.locale] ||= abstract_model.model.model_name.human(count: Float::INFINITY, default: label.pluralize(::I18n.locale))
end

def pluralize(count)
Expand Down

0 comments on commit 0333946

Please sign in to comment.