Exception: I18n::Disabled
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- ArgumentError
- I18n::Disabled
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/exceptions.rb
Instance Method Summary collapse
-
#initialize(method) ⇒ Disabled
constructor
A new instance of Disabled.
Constructor Details
#initialize(method) ⇒ Disabled
Returns a new instance of Disabled.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/exceptions.rb', line 19 def initialize(method) super(<<~MESSAGE) I18n.#{method} is currently disabled, likely because your application is still in its loading phase. This method is meant to display text in the user locale, so calling it before the user locale has been set is likely to display text from the wrong locale to some users. If you have a legitimate reason to access i18n data outside of the user flow, you can do so by passing the desired locale explicitly with the `locale` argument, e.g. `I18n.#{method}(..., locale: :en)` MESSAGE end |