From 1177a40e68b6661d6d2cb4aefdd9a805459cd936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 25 Jan 2010 22:00:07 +0100 Subject: Fix i18n locales order test. --- activesupport/lib/active_support/railtie.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/railtie.rb') diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index bc0f99869c..a80fa77e1e 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -33,6 +33,7 @@ module I18n railtie_name :i18n # Initialize I18n load paths to an array + config.i18n.engines_load_path = [] config.i18n.load_path = [] initializer :initialize_i18n do @@ -47,7 +48,10 @@ module I18n # the load_path which should be appended to what's already set instead of overwritten. config.after_initialize do |app| app.config.i18n.each do |setting, value| - if setting == :load_path + case setting + when :engines_load_path + app.config.i18n.load_path.unshift(*value) + when :load_path I18n.load_path += value else I18n.send("#{setting}=", value) -- cgit v1.2.3