mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
More realistic test env for translations
Most production servers don't use the source locale `en`. Even if the default language is English, they use a local variant like `en_AU` or `en_GB` to customise some of the translations. However the environment is configured, the app should always fallback to `en` if no other translation is available.
This commit is contained in:
4
.env
4
.env
@@ -10,10 +10,10 @@ TIMEZONE="Melbourne"
|
||||
DEFAULT_COUNTRY_CODE="AU"
|
||||
|
||||
# Locale for translation.
|
||||
LOCALE="en"
|
||||
LOCALE="en_AU"
|
||||
|
||||
# For multilingual - ENV doesn't have array so pass it as string with commas
|
||||
AVAILABLE_LOCALES="en,es"
|
||||
AVAILABLE_LOCALES="en_AU,es"
|
||||
|
||||
# Spree zone.
|
||||
CHECKOUT_ZONE="Australia"
|
||||
|
||||
@@ -141,7 +141,7 @@ RSpec.configure do |config|
|
||||
|
||||
# Reset locale for all specs.
|
||||
config.around(:each) do |example|
|
||||
I18n.with_locale(:en) { example.run }
|
||||
I18n.with_locale(:en_AU) { example.run }
|
||||
end
|
||||
|
||||
# Reset all feature toggles to prevent leaking.
|
||||
|
||||
Reference in New Issue
Block a user