Commit fae3bc42 authored by jplang's avatar jplang

Set a default scope for 'My page' block names translations (#3057).

git-svn-id: https://svn.redmine.org/redmine/trunk@2659 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1c42bcac
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment