什么等同于 rails 7 中的 `Rails.config.action_view.raise_on_missing_translations`?
What is equivalent to `Rails.config.action_view.raise_on_missing_translations` in rails 7?
我想在我的 rails 应用程序配置中打开它:
Rails.config.action_view.raise_on_missing_translations = true
尽管如此,我意识到这已被弃用。什么是等效的?
Deprecate config.action_view.raise_on_missing_translations
in favor of
config.i18n.raise_on_missing_translations
.
New generalized configuration option now determines whether an error should be raised for missing translations in controllers and views.
你应该可以这样说:
config.i18n.raise_on_missing_translations = true
Rails 7 removes the deprecated configuration option:
6.1 Removals
- Remove deprecated
Rails.config.action_view.raise_on_missing_translations
我想在我的 rails 应用程序配置中打开它:
Rails.config.action_view.raise_on_missing_translations = true
尽管如此,我意识到这已被弃用。什么是等效的?
Deprecate
config.action_view.raise_on_missing_translations
in favor ofconfig.i18n.raise_on_missing_translations
.New generalized configuration option now determines whether an error should be raised for missing translations in controllers and views.
你应该可以这样说:
config.i18n.raise_on_missing_translations = true
Rails 7 removes the deprecated configuration option:
6.1 Removals
- Remove deprecated
Rails.config.action_view.raise_on_missing_translations