Skip to content

Commit

Permalink
Add and set PLURAL_MANY_COUNT to 2.1. (#634)
Browse files Browse the repository at this point in the history
This improves grammar on index pages for many non-English locales.
  • Loading branch information
k3rni authored and nickcharlton committed Mar 17, 2017
1 parent 990dbd4 commit dec63c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/administrate/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module Administrate
module ApplicationHelper
PLURAL_MANY_COUNT = 2.1

def render_field(field, locals = {})
locals.merge!(field: field)
render locals: locals, partial: field.to_partial_path
Expand All @@ -12,7 +14,7 @@ def display_resource_name(resource_name)
constantize.
model_name.
human(
count: 0,
count: PLURAL_MANY_COUNT,
default: resource_name.to_s.pluralize.titleize,
)
end
Expand Down

0 comments on commit dec63c2

Please sign in to comment.