diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 5ae55e6ff..fdf509544 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -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 diff --git a/lib/redmine/views/my_page/block.rb b/lib/redmine/views/my_page/block.rb index a9a52a052..b6ca29f97 100644 --- a/lib/redmine/views/my_page/block.rb +++ b/lib/redmine/views/my_page/block.rb @@ -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