зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479377 - Provide fallbacks for switch language in Prefs message r=gandalf
MozReview-Commit-ID: G3oeSWl1Rtf --HG-- extra : rebase_source : 7f2f208793a601b3ada1971cda827f50f3a8fda3
This commit is contained in:
Родитель
1c14c56cce
Коммит
dd3400571a
|
@ -235,10 +235,15 @@ if (AppConstants.MOZ_UPDATER) {
|
|||
// We store this in a global so tests can await it.
|
||||
var promiseLoadHandlersList;
|
||||
|
||||
// Load the preferences string bundle for a given locale.
|
||||
// Load the preferences string bundle for a given locale with fallbacks.
|
||||
function getBundleForLocale(locale) {
|
||||
let locales = Array.from(new Set([
|
||||
locale,
|
||||
...Services.locale.getRequestedLocales(),
|
||||
Services.locale.lastFallbackLocale,
|
||||
]));
|
||||
function generateContexts(resourceIds) {
|
||||
return L10nRegistry.generateContexts([locale], resourceIds);
|
||||
return L10nRegistry.generateContexts(locales, resourceIds);
|
||||
}
|
||||
return new Localization([
|
||||
"browser/preferences/preferences.ftl",
|
||||
|
|
Загрузка…
Ссылка в новой задаче