Mercurial > hg > soundsoftware-site
comparison lib/redmine/plugin.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
77 # Set a default directory if it was not provided during registration | 77 # Set a default directory if it was not provided during registration |
78 p.directory(File.join(self.directory, id.to_s)) if p.directory.nil? | 78 p.directory(File.join(self.directory, id.to_s)) if p.directory.nil? |
79 | 79 |
80 # Adds plugin locales if any | 80 # Adds plugin locales if any |
81 # YAML translation files should be found under <plugin>/config/locales/ | 81 # YAML translation files should be found under <plugin>/config/locales/ |
82 ::I18n.load_path += Dir.glob(File.join(p.directory, 'config', 'locales', '*.yml')) | 82 Rails.application.config.i18n.load_path += Dir.glob(File.join(p.directory, 'config', 'locales', '*.yml')) |
83 | 83 |
84 # Prepends the app/views directory of the plugin to the view path | 84 # Prepends the app/views directory of the plugin to the view path |
85 view_path = File.join(p.directory, 'app', 'views') | 85 view_path = File.join(p.directory, 'app', 'views') |
86 if File.directory?(view_path) | 86 if File.directory?(view_path) |
87 ActionController::Base.prepend_view_path(view_path) | 87 ActionController::Base.prepend_view_path(view_path) |