From 2a1a6cff409269292f2d58e1f448a6f14eaab6a2 Mon Sep 17 00:00:00 2001 From: wells Date: Fri, 14 Jan 2022 12:53:01 +0800 Subject: [PATCH] Add i18n support for Field::HasMany --- app/views/fields/has_many/_index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/fields/has_many/_index.html.erb b/app/views/fields/has_many/_index.html.erb index 4a20a75802..572f16316c 100644 --- a/app/views/fields/has_many/_index.html.erb +++ b/app/views/fields/has_many/_index.html.erb @@ -16,4 +16,4 @@ as a count of how many objects are associated through the relationship. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany %> -<%= pluralize(field.data.size, field.attribute.to_s.humanize.downcase.singularize) %> +<%= pluralize(field.data.size, t("activerecord.models.#{field.attribute.to_s.singularize}", default: field.attribute.to_s.humanize.downcase.singularize, count: field.data.size)) %>