From 84816ae981a8598e5e401eb1b9b805de840fefc9 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Sun, 6 Jul 2008 21:20:02 +0200 Subject: align with changes in i18n --- actionpack/lib/action_view/helpers/translation_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/helpers/translation_helper.rb') 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 -- cgit v1.2.3