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:
Jean-Philippe Lang 2009-04-05 13:33:54 +00:00
parent 66839c12dd
commit dea072f506
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ class MyController < ApplicationController
session[:page_layout] = @blocks session[:page_layout] = @blocks
%w(top left right).each {|f| session[:page_layout][f] ||= [] } %w(top left right).each {|f| session[:page_layout][f] ||= [] }
@block_options = [] @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 end
# Add a block to user's page # Add a block to user's page

View File

@ -22,7 +22,7 @@ module Redmine
def self.additional_blocks def self.additional_blocks
@@additional_blocks ||= Dir.glob("#{RAILS_ROOT}/vendor/plugins/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file| @@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(/^_/, '') name = File.basename(file).split('.').first.gsub(/^_/, '')
h[name] = name h[name] = name.to_sym
h h
end end
end end