]> source.dussan.org Git - redmine.git/commitdiff
Use Rails.application.config.i18n.load_path for adding plugin locales (#12753).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Jan 2014 14:46:22 +0000 (14:46 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Jan 2014 14:46:22 +0000 (14:46 +0000)
Patch by Takeshi Yaegashi.

git-svn-id: http://svn.redmine.org/redmine/trunk@12482 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/plugin.rb

index ea61cef7e6477e11c7ce0d3282cddb09526696bd..2cd8e564650c333d8b74398a67e78c4bb6a187bf 100644 (file)
@@ -79,7 +79,7 @@ module Redmine #:nodoc:
 
       # Adds plugin locales if any
       # YAML translation files should be found under <plugin>/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')