From bdf783b5a8b83b1d565027130de4743fda336523 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Sun, 10 Aug 2008 21:25:24 +0200 Subject: update i18n usage for pluralization hashes (api change) --- actionpack/lib/action_view/locale/en-US.rb | 57 +++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 12 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/locale/en-US.rb b/actionpack/lib/action_view/locale/en-US.rb index 2c3676dca8..0119b3d9c1 100644 --- a/actionpack/lib/action_view/locale/en-US.rb +++ b/actionpack/lib/action_view/locale/en-US.rb @@ -1,17 +1,47 @@ I18n.backend.store_translations :'en-US', { :datetime => { :distance_in_words => { - :half_a_minute => 'half a minute', - :less_than_x_seconds => ['less than 1 second', 'less than {{count}} seconds'], - :x_seconds => ['1 second', '{{count}} seconds'], - :less_than_x_minutes => ['less than a minute', 'less than {{count}} minutes'], - :x_minutes => ['1 minute', '{{count}} minutes'], - :about_x_hours => ['about 1 hour', 'about {{count}} hours'], - :x_days => ['1 day', '{{count}} days'], - :about_x_months => ['about 1 month', 'about {{count}} months'], - :x_months => ['1 month', '{{count}} months'], - :about_x_years => ['about 1 year', 'about {{count}} year'], - :over_x_years => ['over 1 year', 'over {{count}} years'] + :half_a_minute => 'half a minute', + :less_than_x_seconds => { + :one => 'less than 1 second', + :many => 'less than {{count}} seconds' + }, + :x_seconds => { + :one => '1 second', + :many => '{{count}} seconds' + }, + :less_than_x_minutes => { + :one => 'less than a minute', + :many => 'less than {{count}} minutes' + }, + :x_minutes => { + :one => '1 minute', + :many => '{{count}} minutes' + }, + :about_x_hours => { + :one => 'about 1 hour', + :many => 'about {{count}} hours' + }, + :x_days => { + :one => '1 day', + :many => '{{count}} days' + }, + :about_x_months => { + :one => 'about 1 month', + :many => 'about {{count}} months' + }, + :x_months => { + :one => '1 month', + :many => '{{count}} months' + }, + :about_x_years => { + :one => 'about 1 year', + :many => 'about {{count}} years' + }, + :over_x_years => { + :one => 'over 1 year', + :many => 'over {{count}} years' + } } }, :number => { @@ -46,7 +76,10 @@ I18n.backend.store_translations :'en-US', { }, :active_record => { :error => { - :header_message => ["1 error prohibited this {{object_name}} from being saved", "{{count}} errors prohibited this {{object_name}} from being saved"], + :header_message => { + :one => "1 error prohibited this {{object_name}} from being saved", + :many => "{{count}} errors prohibited this {{object_name}} from being saved" + }, :message => "There were problems with the following fields:" } } -- cgit v1.2.3