зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1410733 - Add an en-US locale as a hard fallback for LocaleService::RequestedLocales. r=jfkthame
MozReview-Commit-ID: LPS3PaeykEh --HG-- extra : rebase_source : fd2ef3aaa10c809e93d4fe1bf9f962689c1bb9aa
This commit is contained in:
Родитель
d7d7a3bbb9
Коммит
63fc064db9
|
@ -292,6 +292,16 @@ LocaleService::GetRequestedLocales(nsTArray<nsCString>& aRetVal)
|
|||
{
|
||||
if (mRequestedLocales.IsEmpty()) {
|
||||
ReadRequestedLocales(mRequestedLocales);
|
||||
|
||||
// en-US is a LastResort locale. LastResort locale is a fallback locale
|
||||
// for the requested locale chain. In the future we'll want to make the
|
||||
// fallback chain differ per-locale. For now, it'll always fallback on en-US.
|
||||
//
|
||||
// Notice: This is not the same as DefaultLocale,
|
||||
// which follows the default locale the build is in.
|
||||
if (!mRequestedLocales.Contains("en-US")) {
|
||||
mRequestedLocales.AppendElement("en-US");
|
||||
}
|
||||
}
|
||||
|
||||
aRetVal = mRequestedLocales;
|
||||
|
|
Загрузка…
Ссылка в новой задаче