Include default locale in fallbacks explicitly
We were getting a warning because it won't be included by default in
Rails 6.1:
DEPRECATION WARNING: Using I18n fallbacks with an empty `defaults` sets
the defaults to include the `default_locale`. This behavior will change
in Rails 6.1 . If you desire the default locale to be included in the
defaults, please explicitly configure it with
`config.i18n.fallbacks.defaults = [I18n.default_locale]` or
`config.i18n.fallbacks = [I18n.default_locale, {...}]`. If you want to
opt-in to the new behavior, use `config.i18n.fallbacks.defaults = [nil,
{...}] `.
This commit is contained in:
@@ -97,7 +97,7 @@ module Consul
|
||||
"zh-CN",
|
||||
"zh-TW"]
|
||||
config.i18n.available_locales = available_locales
|
||||
config.i18n.fallbacks = {
|
||||
config.i18n.fallbacks = [I18n.default_locale, {
|
||||
"ca" => "es",
|
||||
"es-PE" => "es",
|
||||
"eu" => "es",
|
||||
@@ -107,7 +107,7 @@ module Consul
|
||||
"oc" => "fr",
|
||||
"pt-BR" => "es",
|
||||
"val" => "es"
|
||||
}
|
||||
}]
|
||||
|
||||
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**[^custom]*", "*.{rb,yml}")]
|
||||
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "custom", "**", "*.{rb,yml}")]
|
||||
|
||||
Reference in New Issue
Block a user