diff options
author | Clemens Kofler <clemens@railway.at> | 2008-07-29 21:47:02 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-29 21:47:02 -0500 |
commit | fea7771d2294bd810d04c03c125ceac5d6bb9806 (patch) | |
tree | 1836d7a52cc6c8ed1205a29289e2d068a9b94a0e /actionpack/lib/action_view/locale | |
parent | d9452d3ab3063c5e96dfd80cf6056c49192081b3 (diff) | |
download | rails-fea7771d2294bd810d04c03c125ceac5d6bb9806.tar.gz rails-fea7771d2294bd810d04c03c125ceac5d6bb9806.tar.bz2 rails-fea7771d2294bd810d04c03c125ceac5d6bb9806.zip |
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 <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_view/locale')
-rw-r--r-- | actionpack/lib/action_view/locale/en-US.rb | 35 |
1 files changed, 28 insertions, 7 deletions
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:" - } - } + } + } } |