Exception: I18n::MissingTranslationData

Inherits:
ArgumentError show all
Defined in:
lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/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/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/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/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb', line 13

def key
  @key
end

#localeObject (readonly)

Returns the value of attribute locale.



13
14
15
# File 'lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb', line 13

def locale
  @locale
end

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb', line 13

def options
  @options
end