Obromios
Obromios

Reputation: 16373

How to set raise_on_missing_translations for I18n

In rails 6.1.6.1 I have the following deprecation warning

DEPRECATION WARNING: action_view.raise_on_missing_translations is deprecated and will be removed in Rails 7.0. Set i18n.raise_on_missing_translations instead. Note that this new setting also affects how missing translations are handled in controllers.

How do I set the raise_on_missing_translations option, and where do I set it (e.g. in an initializer)?

Upvotes: 5

Views: 641

Answers (1)

mechnicov
mechnicov

Reputation: 15248

Set config like this in application.rb or in specific environments:

config.i18n.raise_on_missing_translations = true

Upvotes: 6

Related Questions