mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Add legacy and default values for LOCALE
This makes sure there is a value in `config.i18n.available_locales` so that i18n-js doesn't crash.
This commit is contained in:
@@ -70,7 +70,7 @@ module Openfoodnetwork
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
config.i18n.default_locale = ENV["LOCALE"]
|
||||
config.i18n.default_locale = ENV["LOCALE"] || ENV["I18N_LOCALE"] || "en"
|
||||
config.i18n.available_locales = ENV["AVAILABLE_LOCALES"].andand.split(',').andand.map(&:strip) || [config.i18n.default_locale]
|
||||
I18n.locale = config.i18n.locale = config.i18n.default_locale
|
||||
|
||||
|
||||
Reference in New Issue
Block a user