diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-25 11:11:08 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-08-25 11:11:08 +0200 |
commit | e464f9b6b93daa847a7d6fa1c3af63c8cef3f3e2 (patch) | |
tree | 6fcd3b1a2c30a2c25b85915af5a4277765f26858 /activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb | |
parent | 90a9637d41016c0d230ba36657e83a4f8d54cc46 (diff) | |
parent | fb20d6f09d5e91280bf2b5888a7299b50dba7a7b (diff) | |
download | rails-e464f9b6b93daa847a7d6fa1c3af63c8cef3f3e2.tar.gz rails-e464f9b6b93daa847a7d6fa1c3af63c8cef3f3e2.tar.bz2 rails-e464f9b6b93daa847a7d6fa1c3af63c8cef3f3e2.zip |
Merge commit 'rails/master' into i18n
Diffstat (limited to 'activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb')
-rwxr-xr-x | activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb b/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb index 0e2a2d7051..d4adbde727 100755 --- a/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb +++ b/activesupport/lib/active_support/vendor/i18n-0.0.1/i18n.rb @@ -9,14 +9,14 @@ require 'i18n/backend/simple' require 'i18n/exceptions' module I18n - @@backend = nil + @@backend = Backend::Simple @@default_locale = 'en-US' @@exception_handler = :default_exception_handler class << self # Returns the current backend. Defaults to +Backend::Simple+. def backend - @@backend ||= Backend::Simple.new + @@backend end # Sets the current backend. Used to set a custom backend. @@ -183,8 +183,8 @@ module I18n # keys are Symbols. def normalize_translation_keys(locale, key, scope) keys = [locale] + Array(scope) + [key] - keys = keys.map{|key| key.to_s.split(/\./) } - keys.flatten.map{|key| key.to_sym} + keys = keys.map{|k| k.to_s.split(/\./) } + keys.flatten.map{|k| k.to_sym} end end end |