diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-06-21 11:27:19 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-06-21 11:27:19 +0200 |
commit | c1e2506494107892a0962b8491cd234f77949c08 (patch) | |
tree | aa333cb3d8a6ff05088b6a524e30f04169aaf5f5 /activesupport | |
parent | 585c8c17c303fc46fcf014a644a541eae6cb5ffd (diff) | |
download | rails-c1e2506494107892a0962b8491cd234f77949c08.tar.gz rails-c1e2506494107892a0962b8491cd234f77949c08.tar.bz2 rails-c1e2506494107892a0962b8491cd234f77949c08.zip |
Changed process of storing translations from the
client libraries to the backend: clients now can pass a block to
backend#populate which can contain code to load and register translations.
This makes sense for backends that persist their translations (e.g. to db)
so the repeated loading and passing of translations throughout the server
startup would be wasted resources.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support.rb | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/lang/en-US.rb | 2 | ||||
m--------- | activesupport/lib/active_support/vendor/i18n-0.0.1 | 0 |
3 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index acdb3056d2..0de948dda9 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -55,7 +55,10 @@ require 'active_support/multibyte' require 'active_support/base64' require 'active_support/time_with_zone' -require 'active_support/lang/en-US.rb' + +I18n.backend.populate do + require 'active_support/lang/en-US.rb' +end Inflector = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Inflector', 'ActiveSupport::Inflector') Dependencies = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('Dependencies', 'ActiveSupport::Dependencies') diff --git a/activesupport/lib/active_support/lang/en-US.rb b/activesupport/lib/active_support/lang/en-US.rb index 5b8e04363e..aa06fe14bd 100644 --- a/activesupport/lib/active_support/lang/en-US.rb +++ b/activesupport/lib/active_support/lang/en-US.rb @@ -1,4 +1,4 @@ -I18n.backend.set_translations :'en-US', { +I18n.backend.store_translations :'en-US', { :support => { :array => { :sentence_connector => 'and' diff --git a/activesupport/lib/active_support/vendor/i18n-0.0.1 b/activesupport/lib/active_support/vendor/i18n-0.0.1 -Subproject 1af3435539b4a0729c13d21c5df037a635fe98c +Subproject 8e43afa38aa007d1de6d6acf44d43143c403d13 |