Skip to content

Commit

Permalink
Add i18n support for Field::HasMany
Browse files Browse the repository at this point in the history
  • Loading branch information
jhang-jhe-wei authored and nickcharlton committed Feb 2, 2022
1 parent b49efe4 commit 2a1a6cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/fields/has_many/_index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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)) %>

0 comments on commit 2a1a6cf

Please sign in to comment.