diff options
author | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-07-06 21:20:02 +0200 |
---|---|---|
committer | Sven Fuchs <svenfuchs@artweb-design.de> | 2008-07-06 21:20:02 +0200 |
commit | 84816ae981a8598e5e401eb1b9b805de840fefc9 (patch) | |
tree | 8b995401f92c8dcd8c53e3f332687219480e4def /actionpack/lib/action_view/helpers/translation_helper.rb | |
parent | c9ed2c9bd24b9f4cdfcb692151f87ba900469e71 (diff) | |
download | rails-84816ae981a8598e5e401eb1b9b805de840fefc9.tar.gz rails-84816ae981a8598e5e401eb1b9b805de840fefc9.tar.bz2 rails-84816ae981a8598e5e401eb1b9b805de840fefc9.zip |
align with changes in i18n
Diffstat (limited to 'actionpack/lib/action_view/helpers/translation_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/translation_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb index 0bfe6bf771..c13c2dfc04 100644 --- a/actionpack/lib/action_view/helpers/translation_helper.rb +++ b/actionpack/lib/action_view/helpers/translation_helper.rb @@ -4,11 +4,11 @@ module ActionView module Helpers module TranslationHelper def translate(*args) - key, locale, options = I18n.send :process_translate_arguments, *args - I18n.translate key, locale, options.merge(:raise => true) + args << args.extract_options!.merge(:raise => true) + I18n.translate *args rescue I18n::MissingTranslationData => e - keys = I18n.send :normalize_translation_keys, locale, key, options[:scope] + keys = I18n.send :normalize_translation_keys, e.locale, e.key, e.options[:scope] content_tag('span', keys.join(', '), :class => 'translation_missing') end end |