Fixes menu translation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2497 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
95ba220b79
commit
9819a6bfd1
@ -99,7 +99,6 @@ module Redmine
|
|||||||
item.url
|
item.url
|
||||||
end
|
end
|
||||||
caption = item.caption(project)
|
caption = item.caption(project)
|
||||||
caption = l_or_humanize(caption, :prefix => 'label_') if caption.is_a?(Symbol)
|
|
||||||
if block_given?
|
if block_given?
|
||||||
yield item, caption, url, (current_menu_item == item.name)
|
yield item, caption, url, (current_menu_item == item.name)
|
||||||
else
|
else
|
||||||
@ -186,7 +185,7 @@ module Redmine
|
|||||||
@url = url
|
@url = url
|
||||||
@condition = options[:if]
|
@condition = options[:if]
|
||||||
@param = options[:param] || :id
|
@param = options[:param] || :id
|
||||||
@caption = options[:caption] || @name
|
@caption = options[:caption]
|
||||||
@html_options = options[:html] || {}
|
@html_options = options[:html] || {}
|
||||||
# Adds a unique class to each menu item based on its name
|
# Adds a unique class to each menu item based on its name
|
||||||
@html_options[:class] = [@html_options[:class], @name.to_s.dasherize].compact.join(' ')
|
@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 = @name.to_s.humanize if c.blank?
|
||||||
c
|
c
|
||||||
else
|
else
|
||||||
@caption
|
if @caption.nil?
|
||||||
|
l_or_humanize(name, :prefix => 'label_')
|
||||||
|
else
|
||||||
|
@caption.is_a?(Symbol) ? l(@caption) : @caption
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user