From 51d90e782b94adc166099ac36f6821471c62d8a1 Mon Sep 17 00:00:00 2001 From: Sergio Souza Date: Wed, 27 Mar 2024 09:49:47 -0300 Subject: [PATCH 1/2] remove the source_locale from the avaliable_locales method --- lib/open_food_network/i18n_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_food_network/i18n_config.rb b/lib/open_food_network/i18n_config.rb index d0d71d0450..838a4308cb 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, source_locale]).uniq + (selectable_locales + [default_locale]).uniq end # The default locale that is used when the user doesn't have a preference. From 947772599790166627282b4fabae0bccaaba4f53 Mon Sep 17 00:00:00 2001 From: Sergio Souza Date: Tue, 16 Apr 2024 18:02:13 -0300 Subject: [PATCH 2/2] update tests for avaliable_locales --- spec/lib/open_food_network/i18n_config_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/open_food_network/i18n_config_spec.rb b/spec/lib/open_food_network/i18n_config_spec.rb index b69aa8b745..457ce35a49 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", "en"] + expect(I18nConfig.available_locales).to eq ["en_GB"] 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", "en"] + expect(I18nConfig.available_locales).to eq ["es", "fr", "de"] end end end