Permalink
Browse files

i18n: reduce translation block scope in init.rb

It made redmine not able to find the plugin settings sometimes.
  • Loading branch information...
1 parent da71187 commit cbe70f1c881cd526b76c385687a8a337649b68be @nackd nackd committed Apr 27, 2012
Showing with 21 additions and 21 deletions.
  1. +21 −21 init.rb
View
42 init.rb
@@ -1,29 +1,29 @@
require 'redmine'
-Rails.configuration.after_initialize do
- I18n.with_locale(Setting.default_language) do
- Redmine::Plugin.register :redmine_traceability do
+Redmine::Plugin.register :redmine_traceability do
+ Rails.configuration.after_initialize do
+ I18n.with_locale(Setting.default_language) do
name I18n.t :'traceability.plugin_name'
description I18n.t :'traceability.plugin_description'
- author 'Emergya'
- version '1.0'
-
- settings :default => {'tracker0' => nil, 'tracker1' => nil},
- :partial => 'settings/traceability'
+ end
+ end
+ author 'Emergya'
+ version '1.0'
- # This plugin adds a project module
- # It can be enabled/disabled at project level (Project settings -> Modules)
- project_module :traceability do
- # This permission has to be explicitly given
- # It will be listed on the permissions screen
- permission :view_mt, {:mt => [:index]}
- end
+ settings :default => {'tracker0' => nil, 'tracker1' => nil, 'tracker2' => nil},
+ :partial => 'settings/traceability'
- # A new item is added to the project menu
- menu :project_menu, :traceability,
- {:controller => 'mt', :action => 'index'},
- :caption => :'traceability.menu_item_name',
- :param => :project_id
- end
+ # This plugin adds a project module
+ # It can be enabled/disabled at project level (Project settings -> Modules)
+ project_module :traceability do
+ # This permission has to be explicitly given
+ # It will be listed on the permissions screen
+ permission :view_mt, {:mt => [:index]}
end
+
+ # A new item is added to the project menu
+ menu :project_menu, :traceability,
+ {:controller => 'mt', :action => 'index'},
+ :caption => :'traceability.menu_item_name',
+ :param => :project_id
end

0 comments on commit cbe70f1

Please sign in to comment.