summaryrefslogtreecommitdiffstats
path: root/lib/redmine/plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/plugin.rb')
-rw-r--r--lib/redmine/plugin.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb
index 0fc6985f4..c04ba334c 100644
--- a/lib/redmine/plugin.rb
+++ b/lib/redmine/plugin.rb
@@ -67,6 +67,9 @@ module Redmine #:nodoc:
p.instance_eval(&block)
# Set a default name if it was not provided during registration
p.name(id.to_s.humanize) if p.name.nil?
+ # Adds plugin locales if any
+ # YAML translation files should be found under <plugin>/config/locales/
+ ::I18n.load_path += Dir.glob(File.join(RAILS_ROOT, 'vendor', 'plugins', id.to_s, 'config', 'locales', '*.yml'))
registered_plugins[id] = p
end