module I18n::Backend class Simple protected def pluralize(locale, entry, count) return entry unless entry.is_a?(Hash) and count key = :zero if count == 0 && entry.has_key?(:zero) key ||= count == 1 ? :one : (2..4).include?(count) ? :few : :other raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key) entry[key] end end # class end # module