1 require 'action_view/helpers/tag_helper'
5 module TranslationHelper
6 def translate(key
, options
= {})
8 I18n
.translate(key
, options
)
9 rescue I18n
::MissingTranslationData => e
10 keys
= I18n
.send(:normalize_translation_keys, e
.locale
, e
.key
, e
.options
[:scope])
11 content_tag('span', keys
.join(', '), :class => 'translation_missing')