Skip to content

Commit

Permalink
Bug 1491209 - Do not inject last fallback locale into requested local…
Browse files Browse the repository at this point in the history
…es. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D5839

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Zibi Braniecki committed Sep 14, 2018
1 parent a277337 commit 3a33723
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions intl/locale/LocaleService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,6 @@ ReadRequestedLocales(nsTArray<nsCString>& aRetVal)
aRetVal.AppendElement(defaultLocale);
}

// Last fallback locale is a locale for the requested locale chain.
// In the future we'll want to make the fallback chain differ per-locale.
//
// Notice: This is not the same as DefaultLocale,
// which follows the default locale the build is in.
LocaleService::GetInstance()->GetLastFallbackLocale(str);
if (!aRetVal.Contains(str)) {
aRetVal.AppendElement(str);
}
return true;
}

Expand Down
3 changes: 1 addition & 2 deletions intl/locale/tests/unit/test_localeService.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ add_test(function test_getRequestedLocales_sanitize() {
Assert.equal(locales[1], "pl");
Assert.equal(locales[2], "de-AT");
Assert.equal(locales[3], "und");
Assert.equal(locales[4], localeService.lastFallbackLocale);
Assert.equal(locales.length, 5);
Assert.equal(locales.length, 4);

Services.prefs.clearUserPref(PREF_REQUESTED_LOCALES);

Expand Down

0 comments on commit 3a33723

Please sign in to comment.