summaryrefslogtreecommitdiffstats
path: root/lib/redmine/i18n.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-06-17 00:56:48 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-06-17 00:56:48 +0000
commit67fcd6eea7c4827d33e2ddbd0519b2120097c3b3 (patch)
tree6151cb6b91455d35642c6e6a0dbd1dfcf53e3144 /lib/redmine/i18n.rb
parentd893bdcd768e22f203a7212fcb8a8400eb044c3f (diff)
downloadredmine-67fcd6eea7c4827d33e2ddbd0519b2120097c3b3.tar.gz
redmine-67fcd6eea7c4827d33e2ddbd0519b2120097c3b3.zip
replace RAILS_ROOT to Rails.root at lib/redmine/i18n.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6082 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/i18n.rb')
-rw-r--r--lib/redmine/i18n.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index f0cc529b0..29ff3281b 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -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]