
key :many instead of :other in pluralize
Reported by Edgar Suarez | August 30th, 2008 @ 09:22 PM
following the pastie http://pastie.org/253107 found in http://groups.google.com/group/r...
errors:
template:
header:
one: "1 error prohibited this {{model}} from being saved"
many: "{{count}} errors prohibited this {{model}} from being saved"
throws an InvalidPluralizationData exception because it is looking for the key :other instead of :many
def pluralize(locale, entry, count)
return entry unless entry.is_a?(Hash) and count
# raise InvalidPluralizationData.new(entry, count) unless entry.is_a?(Hash)
key = :zero if count == 0 && entry.has_key?(:zero)
key ||= count == 1 ? :one : :other
raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key)
entry[key]
end
So changing the 'many' key for 'other' works propperly but I think it should be working for many as well.
errors:
template:
header:
one: "1 error prohibited this {{model}} from being saved"
other: "{{count}} errors prohibited this {{model}} from being saved"
Comments and changes to this ticket
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff