diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 4 | ||||
-rw-r--r-- | actionpack/test/template/translation_helper_test.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index 28f8ce3d53..f3e173004a 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -28,6 +28,10 @@ module ActionController end after_dispatch :flush_logger if Base.logger && Base.logger.respond_to?(:flush) + + to_prepare do + I18n.reload! + end end # Backward-compatible class method takes CGI-specific args. Deprecated diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index 7b94221ec0..1b28a59288 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -10,8 +10,8 @@ class TranslationHelperTest < Test::Unit::TestCase end def test_delegates_to_i18n_setting_the_raise_option - I18n.expects(:translate).with(:foo, 'en-US', :raise => true) - translate :foo, 'en-US' + I18n.expects(:translate).with(:foo, :locale => 'en-US', :raise => true) + translate :foo, :locale => 'en-US' end def test_returns_missing_translation_message_wrapped_into_span |