Exception: I18n::MissingTranslationData

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/vendor/i18n/lib/i18n/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale, key, options) ⇒ MissingTranslationData

Returns a new instance of MissingTranslationData.



14
15
16
17
18
19
# File 'lib/vendor/i18n/lib/i18n/exceptions.rb', line 14

def initialize(locale, key, options)
  @key, @locale, @options = key, locale, options
  keys = I18n.send(:normalize_translation_keys, locale, key, options[:scope])
  keys << 'no key' if keys.size < 2
  super "translation missing: #{keys.join(', ')}"
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



13
14
15
# File 'lib/vendor/i18n/lib/i18n/exceptions.rb', line 13

def key
  @key
end

#localeObject (readonly)

Returns the value of attribute locale.



13
14
15
# File 'lib/vendor/i18n/lib/i18n/exceptions.rb', line 13

def locale
  @locale
end

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/vendor/i18n/lib/i18n/exceptions.rb', line 13

def options
  @options
end