]> source.dussan.org Git - redmine.git/commitdiff
Set a default scope for 'My page' block names translations (#3057).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2009 13:33:54 +0000 (13:33 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 5 Apr 2009 13:33:54 +0000 (13:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2659 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/my_controller.rb
lib/redmine/views/my_page/block.rb

index 5ae55e6ff538d098e66cdcc38167a57138fa18f1..fdf509544c65771f97a084b9af6380075fb926cf 100644 (file)
@@ -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
index a9a52a052eb9b22a4c3f0ae076929c0ac2b45373..b6ca29f97c348d9e56f0532664b2f6acd9aa6179 100644 (file)
@@ -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