From fea7771d2294bd810d04c03c125ceac5d6bb9806 Mon Sep 17 00:00:00 2001 From: Clemens Kofler Date: Tue, 29 Jul 2008 21:47:02 -0500 Subject: Updated NumberHelper: Full i18n support (except number_to_phone), consolidated API (almost all methods now support :precision, :delimiter and :separator). Added deprecation notices for old API. Added tests for new options [#716 state:resolved] Signed-off-by: Joshua Peek --- actionpack/lib/action_view/locale/en-US.rb | 35 ++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_view/locale') diff --git a/actionpack/lib/action_view/locale/en-US.rb b/actionpack/lib/action_view/locale/en-US.rb index 3adb199681..2c3676dca8 100644 --- a/actionpack/lib/action_view/locale/en-US.rb +++ b/actionpack/lib/action_view/locale/en-US.rb @@ -14,19 +14,40 @@ I18n.backend.store_translations :'en-US', { :over_x_years => ['over 1 year', 'over {{count}} years'] } }, - :currency => { + :number => { :format => { - :unit => '$', - :precision => 2, + :precision => 3, :separator => '.', - :delimiter => ',', - :format => '%u%n', + :delimiter => ',' + }, + :currency => { + :format => { + :unit => '$', + :precision => 2, + :format => '%u%n' + } + }, + :human => { + :format => { + :precision => 1, + :delimiter => '' + } + }, + :percentage => { + :format => { + :delimiter => '' + } + }, + :precision => { + :format => { + :delimiter => '' + } } }, :active_record => { :error => { :header_message => ["1 error prohibited this {{object_name}} from being saved", "{{count}} errors prohibited this {{object_name}} from being saved"], :message => "There were problems with the following fields:" - } - } + } + } } -- cgit v1.2.3