A platform for community discussion. Free, open, simple.
FIX: English locale must not fall back to any other locale
Gerhard Schlager19edc4abb844
diff --git a/lib/i18n/backend/fallback_locale_list.rb b/lib/i18n/backend/fallback_locale_list.rbindex d0abe59c06c..e1b3d25ebbb 100644--- a/lib/i18n/backend/fallback_locale_list.rb+++ b/lib/i18n/backend/fallback_locale_list.rb@@ -12,7 +12,7 @@ module I18nsite_locale = SiteSetting.default_locale.to_symlocale_list =- if locale == site_locale || site_locale == :en+ if locale == site_locale || site_locale == :en || fallback_locale == :en[locale, fallback_locale, :en]elsesite_fallback_locale = LocaleSiteSetting.fallback_locale(site_locale)diff --git a/spec/lib/i18n/fallback_locale_list_spec.rb b/spec/lib/i18n/fallback_locale_list_spec.rbindex 004ebfc0e59..793ac8b2a0a 100644--- a/spec/lib/i18n/fallback_locale_list_spec.rb+++ b/spec/lib/i18n/fallback_locale_list_spec.rb@@ -27,6 +27,7 @@ describe I18n::Backend::FallbackLocaleList doexpect(list[:ru]).to eq([:ru, :de, :en])expect(list[:de]).to eq([:de, :en])expect(list[:en]).to eq([:en])+ expect(list[:en_US]).to eq([:en_US, :en])endcontext "when plugin registered fallback locale" do