mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
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:
parent
1c14c56cce
commit
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",
|
||||
|
Loading…
Reference in New Issue
Block a user