Module: Localeapp::ForceExceptionHandlerInTranslationHelper

Defined in:
lib/localeapp/rails/force_exception_handler_in_translation_helper.rb

Instance Method Summary collapse

Instance Method Details

#translate(key, options = {}) ⇒ Object Also known as: t



16
17
18
19
20
21
22
23
# File 'lib/localeapp/rails/force_exception_handler_in_translation_helper.rb', line 16

def translate(key, options = {})
  full_key = [options[:scope], key].compact.join(".")
  if full_key =~ Localeapp.configuration.blacklisted_keys_pattern
    super(key, options)
  else
    super(key, {:raise => false}.merge(options))
  end
end