mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-14 23:47:48 +00:00
Ensure en is an I18n fallback in all environments
Since `en` is considered as the main fallback for all locales ensure that it is present in all environments. Note: Setting `config.i18n.fallbacks` to `true` means use the default locale which means that if a particular instance is not using an `en` based locale (the parent `en` locale is automatically derived as a fallback) then `en` will not be available as a fallback.
This commit is contained in:
@@ -29,6 +29,8 @@ Openfoodnetwork::Application.configure do
|
||||
# Expands the lines which load the assets
|
||||
config.assets.debug = false
|
||||
|
||||
config.i18n.fallbacks = [:en]
|
||||
|
||||
# Show emails using Letter Opener
|
||||
config.action_mailer.delivery_method = :letter_opener
|
||||
config.action_mailer.default_url_options = { host: "0.0.0.0:3000" }
|
||||
|
||||
@@ -56,7 +56,7 @@ Openfoodnetwork::Application.configure do
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation can not be found)
|
||||
config.i18n.fallbacks = [:en]
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
@@ -56,7 +56,7 @@ Openfoodnetwork::Application.configure do
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation can not be found)
|
||||
config.i18n.fallbacks = true
|
||||
config.i18n.fallbacks = [:en]
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
@@ -36,6 +36,7 @@ Openfoodnetwork::Application.configure do
|
||||
# Tests assume English text on the site.
|
||||
config.i18n.default_locale = "en"
|
||||
config.i18n.available_locales = ['en', 'es']
|
||||
config.i18n.fallbacks = [:en]
|
||||
I18n.locale = config.i18n.locale = config.i18n.default_locale
|
||||
|
||||
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
||||
|
||||
Reference in New Issue
Block a user