Set a default scope for 'My page' block names translations (#3057).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2659 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
66839c12dd
commit
dea072f506
|
@ -108,7 +108,7 @@ class MyController < ApplicationController
|
|||
session[:page_layout] = @blocks
|
||||
%w(top left right).each {|f| session[:page_layout][f] ||= [] }
|
||||
@block_options = []
|
||||
BLOCKS.each {|k, v| @block_options << [l_or_humanize(v), k.dasherize]}
|
||||
BLOCKS.each {|k, v| @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]}
|
||||
end
|
||||
|
||||
# Add a block to user's page
|
||||
|
|
|
@ -22,7 +22,7 @@ module Redmine
|
|||
def self.additional_blocks
|
||||
@@additional_blocks ||= Dir.glob("#{RAILS_ROOT}/vendor/plugins/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file|
|
||||
name = File.basename(file).split('.').first.gsub(/^_/, '')
|
||||
h[name] = name
|
||||
h[name] = name.to_sym
|
||||
h
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue