From a75f3245a048176b162b9408505ef2b44f3ef9bc Mon Sep 17 00:00:00 2001 From: Maikel Date: Fri, 3 May 2024 15:07:47 +1000 Subject: [PATCH] Revert "Fix Duplicate Language Display on New User Creation" --- lib/open_food_network/i18n_config.rb | 2 +- spec/lib/open_food_network/i18n_config_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/open_food_network/i18n_config.rb b/lib/open_food_network/i18n_config.rb index 838a4308cb..d0d71d0450 100644 --- a/lib/open_food_network/i18n_config.rb +++ b/lib/open_food_network/i18n_config.rb @@ -17,7 +17,7 @@ module OpenFoodNetwork # All locales that can be accessed by the application, including fallbacks. def self.available_locales - (selectable_locales + [default_locale]).uniq + (selectable_locales + [default_locale, source_locale]).uniq end # The default locale that is used when the user doesn't have a preference. diff --git a/spec/lib/open_food_network/i18n_config_spec.rb b/spec/lib/open_food_network/i18n_config_spec.rb index 457ce35a49..b69aa8b745 100644 --- a/spec/lib/open_food_network/i18n_config_spec.rb +++ b/spec/lib/open_food_network/i18n_config_spec.rb @@ -77,7 +77,7 @@ module OpenFoodNetwork end it "provides the default available locales" do - expect(I18nConfig.available_locales).to eq ["en_GB"] + expect(I18nConfig.available_locales).to eq ["en_GB", "en"] end end @@ -92,7 +92,7 @@ module OpenFoodNetwork end it "provides the default available locales" do - expect(I18nConfig.available_locales).to eq ["es", "fr", "de"] + expect(I18nConfig.available_locales).to eq ["es", "fr", "de", "en"] end end end