diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-13 09:53:25 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-13 09:53:25 +0200 |
commit | f26380b7757666fa793c150538e8444a640d29aa (patch) | |
tree | b5a57505bd458d762751f57422852f5bff8f83ab /activesupport/lib | |
parent | bfa143fd4d15544e788d25ec163f9cc57a1e2a03 (diff) | |
download | rails-f26380b7757666fa793c150538e8444a640d29aa.tar.gz rails-f26380b7757666fa793c150538e8444a640d29aa.tar.bz2 rails-f26380b7757666fa793c150538e8444a640d29aa.zip |
switch to using I18n.load_translations instead of requiring plain ruby files
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/locale/en-US.rb | 49 |
2 files changed, 27 insertions, 26 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index 51067e910e..6056067efd 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -58,8 +58,8 @@ require 'active_support/base64' require 'active_support/time_with_zone' -I18n.backend.populate do - require 'active_support/locale/en-US.rb' +I18n.populate do + I18n.load_translations File.dirname(__FILE__) + '/active_support/locale/en-US.rb' end Inflector = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Inflector', 'ActiveSupport::Inflector') diff --git a/activesupport/lib/active_support/locale/en-US.rb b/activesupport/lib/active_support/locale/en-US.rb index 51324a90bf..ed457d6f4f 100644 --- a/activesupport/lib/active_support/locale/en-US.rb +++ b/activesupport/lib/active_support/locale/en-US.rb @@ -1,28 +1,29 @@ -I18n.backend.store_translations :'en-US', { - :support => { - :array => { - :sentence_connector => 'and' - } - }, - :date => { - :formats => { - :default => "%Y-%m-%d", - :short => "%b %d", - :long => "%B %d, %Y", +{ :'en-US' => { + :support => { + :array => { + :sentence_connector => 'and' + } }, - :day_names => Date::DAYNAMES, - :abbr_day_names => Date::ABBR_DAYNAMES, - :month_names => Date::MONTHNAMES, - :abbr_month_names => Date::ABBR_MONTHNAMES, - :order => [:year, :month, :day] - }, - :time => { - :formats => { - :default => "%a, %d %b %Y %H:%M:%S %z", - :short => "%d %b %H:%M", - :long => "%B %d, %Y %H:%M", + :date => { + :formats => { + :default => "%Y-%m-%d", + :short => "%b %d", + :long => "%B %d, %Y", + }, + :day_names => Date::DAYNAMES, + :abbr_day_names => Date::ABBR_DAYNAMES, + :month_names => Date::MONTHNAMES, + :abbr_month_names => Date::ABBR_MONTHNAMES, + :order => [:year, :month, :day] }, - :am => 'am', - :pm => 'pm' + :time => { + :formats => { + :default => "%a, %d %b %Y %H:%M:%S %z", + :short => "%d %b %H:%M", + :long => "%B %d, %Y %H:%M", + }, + :am => 'am', + :pm => 'pm' + } } }
\ No newline at end of file |