From 0333946393c2990c080d59353c450006c8c6a7bd Mon Sep 17 00:00:00 2001 From: Kabie Date: Thu, 8 May 2014 13:35:57 +0800 Subject: [PATCH] Model label should be pluralized with locale Right now it uses `locale: :en`. So it might be incorrectly pluralized. --- lib/rails_admin/config/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rails_admin/config/model.rb b/lib/rails_admin/config/model.rb index 61631d0399..b098853dd9 100644 --- a/lib/rails_admin/config/model.rb +++ b/lib/rails_admin/config/model.rb @@ -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)