From 1f5086258616239fd7998012f6efab685089fca5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Jan 2014 14:46:22 +0000 Subject: [PATCH] Use Rails.application.config.i18n.load_path for adding plugin locales (#12753). Patch by Takeshi Yaegashi. git-svn-id: http://svn.redmine.org/redmine/trunk@12482 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index ea61cef7e..2cd8e5646 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -79,7 +79,7 @@ module Redmine #:nodoc: # Adds plugin locales if any # YAML translation files should be found under /config/locales/ - ::I18n.load_path += Dir.glob(File.join(p.directory, 'config', 'locales', '*.yml')) + Rails.application.config.i18n.load_path += Dir.glob(File.join(p.directory, 'config', 'locales', '*.yml')) # Prepends the app/views directory of the plugin to the view path view_path = File.join(p.directory, 'app', 'views')