diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-23 19:43:57 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-08-23 21:23:00 +0200 |
commit | d6989aa0e1fe5e49fe1fccc3702aa7ff62a63faf (patch) | |
tree | 591897097513ca99f3655fe6b74bdd440f5adb0a | |
parent | b1f3c6e6ec08a40fc7153ee3ba78d51b466a58e6 (diff) | |
download | rails-d6989aa0e1fe5e49fe1fccc3702aa7ff62a63faf.tar.gz rails-d6989aa0e1fe5e49fe1fccc3702aa7ff62a63faf.tar.bz2 rails-d6989aa0e1fe5e49fe1fccc3702aa7ff62a63faf.zip |
I18n: use :other instead of :many as default key for pluralization to better conform w/ cldr pluralization rules
Signed-off-by: Michael Koziarski <michael@koziarski.com>
-rw-r--r-- | actionpack/lib/action_view/locale/en-US.yml | 22 | ||||
-rw-r--r-- | activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/lib/action_view/locale/en-US.yml b/actionpack/lib/action_view/locale/en-US.yml index 57987f4e02..eabdbf33d6 100644 --- a/actionpack/lib/action_view/locale/en-US.yml +++ b/actionpack/lib/action_view/locale/en-US.yml @@ -51,41 +51,41 @@ half_a_minute: "half a minute" less_than_x_seconds: one: "less than 1 second" - many: "less than {{count}} seconds" + other: "less than {{count}} seconds" x_seconds: one: "1 second" - many: "{{count}} seconds" + other: "{{count}} seconds" less_than_x_minutes: one: "less than a minute" - many: "less than {{count}} minutes" + other: "less than {{count}} minutes" x_minutes: one: "1 minute" - many: "{{count}} minutes" + other: "{{count}} minutes" about_x_hours: one: "about 1 hour" - many: "about {{count}} hours" + other: "about {{count}} hours" x_days: one: "1 day" - many: "{{count}} days" + other: "{{count}} days" about_x_months: one: "about 1 month" - many: "about {{count}} months" + other: "about {{count}} months" x_months: one: "1 month" - many: "{{count}} months" + other: "{{count}} months" about_x_years: one: "about 1 year" - many: "about {{count}} years" + other: "about {{count}} years" over_x_years: one: "over 1 year" - many: "over {{count}} years" + other: "over {{count}} years" activerecord: errors: template: header: one: "1 error prohibited this {{model}} from being saved" - many: "{{count}} errors prohibited this {{model}} from being saved" + other: "{{count}} errors prohibited this {{model}} from being saved" # The variable :count is also available body: "There were problems with the following fields:" diff --git a/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb b/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb index 63ef55631f..6c7c54777c 100644 --- a/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +++ b/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb @@ -104,7 +104,7 @@ module I18n 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 : :many + key ||= count == 1 ? :one : :other raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key) entry[key] end |