diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 11:31:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 11:31:22 +0000 |
commit | 9819a6bfd1bf1ed6c208bb66f5f98855e5e5cebc (patch) | |
tree | f9f0716c61c991896d16b3a8b47d38f8d05010a1 | |
parent | 95ba220b79e272407734d7cf25db9d50bfc2c3c3 (diff) | |
download | redmine-9819a6bfd1bf1ed6c208bb66f5f98855e5e5cebc.tar.gz redmine-9819a6bfd1bf1ed6c208bb66f5f98855e5e5cebc.zip |
Fixes menu translation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2497 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/menu_manager.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/redmine/menu_manager.rb b/lib/redmine/menu_manager.rb index 353a1f3a8..d6688ffe2 100644 --- a/lib/redmine/menu_manager.rb +++ b/lib/redmine/menu_manager.rb @@ -99,7 +99,6 @@ module Redmine item.url end caption = item.caption(project) - caption = l_or_humanize(caption, :prefix => 'label_') if caption.is_a?(Symbol) if block_given? yield item, caption, url, (current_menu_item == item.name) else @@ -186,7 +185,7 @@ module Redmine @url = url @condition = options[:if] @param = options[:param] || :id - @caption = options[:caption] || @name + @caption = options[:caption] @html_options = options[:html] || {} # Adds a unique class to each menu item based on its name @html_options[:class] = [@html_options[:class], @name.to_s.dasherize].compact.join(' ') @@ -198,7 +197,11 @@ module Redmine c = @name.to_s.humanize if c.blank? c else - @caption + if @caption.nil? + l_or_humanize(name, :prefix => 'label_') + else + @caption.is_a?(Symbol) ? l(@caption) : @caption + end end end |