Exception: I18n::MissingTranslationData
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- ArgumentError
- I18n::MissingTranslationData
- Defined in:
- lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(locale, key, opts = nil) ⇒ MissingTranslationData
constructor
A new instance of MissingTranslationData.
Constructor Details
#initialize(locale, key, opts = nil) ⇒ MissingTranslationData
Returns a new instance of MissingTranslationData.
22 23 24 25 26 27 |
# File 'lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb', line 22 def initialize(locale, key, opts = nil) @key, @locale, @options = key, locale, opts || {} keys = I18n.normalize_keys(locale, key, [:scope]) keys << 'no key' if keys.size < 2 super "translation missing: #{keys.join(', ')}" end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
21 22 23 |
# File 'lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb', line 21 def key @key end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
21 22 23 |
# File 'lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb', line 21 def locale @locale end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
21 22 23 |
# File 'lib/active_support/vendor/i18n-0.4.1/i18n/exceptions.rb', line 21 def @options end |