diff options
-rw-r--r-- | actionpack/lib/action_view.rb | 5 | ||||
-rw-r--r-- | activemodel/lib/active_model.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record.rb | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/i18n.rb | 1 |
4 files changed, 10 insertions, 6 deletions
diff --git a/actionpack/lib/action_view.rb b/actionpack/lib/action_view.rb index 438f53ede9..3823f87027 100644 --- a/actionpack/lib/action_view.rb +++ b/actionpack/lib/action_view.rb @@ -76,7 +76,8 @@ module ActionView ENCODING_FLAG = '#.*coding[:=]\s*(\S+)[ \t]*' end -require 'active_support/i18n' require 'active_support/core_ext/string/output_safety' -I18n.load_path << "#{File.dirname(__FILE__)}/action_view/locale/en.yml" +ActiveSupport.on_load(:i18n) do + I18n.load_path << "#{File.dirname(__FILE__)}/action_view/locale/en.yml" +end diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index 2586147a20..7503fb7929 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -59,5 +59,6 @@ module ActiveModel end end -require 'active_support/i18n' -I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml' +ActiveSupport.on_load(:i18n) do + I18n.load_path << File.dirname(__FILE__) + '/active_model/locale/en.yml' +end diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index ed26b4899f..210820062b 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -22,7 +22,6 @@ #++ require 'active_support' -require 'active_support/i18n' require 'active_model' require 'arel' require 'active_record_deprecated_finders' @@ -145,4 +144,6 @@ ActiveSupport.on_load(:active_record) do Arel::Table.engine = self end -I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' +ActiveSupport.on_load(:i18n) do + I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' +end diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb index f9c5e5e2f8..188653bd9b 100644 --- a/activesupport/lib/active_support/i18n.rb +++ b/activesupport/lib/active_support/i18n.rb @@ -6,4 +6,5 @@ rescue LoadError => e raise e end +ActiveSupport.run_load_hooks(:i18n) I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml" |