]> source.dussan.org Git - redmine.git/commitdiff
replace RAILS_ROOT to Rails.root at lib/redmine/i18n.rb.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 17 Jun 2011 00:56:48 +0000 (00:56 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 17 Jun 2011 00:56:48 +0000 (00:56 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6082 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/i18n.rb

index f0cc529b04c7e785bead0778a49a3603172be92b..29ff3281b32374652e479b87bf1f1f7399dffbb9 100644 (file)
@@ -56,11 +56,11 @@ module Redmine
     def month_name(month)
       ::I18n.t('date.month_names')[month]
     end
-    
+
     def valid_languages
-      @@valid_languages ||= Dir.glob(File.join(RAILS_ROOT, 'config', 'locales', '*.yml')).collect {|f| File.basename(f).split('.').first}.collect(&:to_sym)
+      @@valid_languages ||= Dir.glob(File.join(Rails.root, 'config', 'locales', '*.yml')).collect {|f| File.basename(f).split('.').first}.collect(&:to_sym)
     end
-    
+
     def find_language(lang)
       @@languages_lookup = valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k }
       @@languages_lookup[lang.to_s.downcase]