Bug 1660392 - [l10nregistry] part6: Move Localization to use WebIDL L10nRegistry. r=platform-i18n-reviewers,nordzilla

Depends on D102372

Differential Revision: https://phabricator.services.mozilla.com/D105416
This commit is contained in:
Zibi Braniecki 2021-07-30 16:47:48 +00:00
parent ded73fe965
commit 1eead2ccc2

View File

@ -21,7 +21,6 @@
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
/* global console */
const { L10nRegistry } = ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm");
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
@ -183,12 +182,12 @@ class CachedSyncIterable extends CachedIterable {
*/
function defaultGenerateBundles(resourceIds) {
const appLocales = Services.locale.appLocalesAsBCP47;
return L10nRegistry.generateBundles(appLocales, resourceIds);
return L10nRegistry.getInstance().generateBundles(appLocales, resourceIds);
}
function defaultGenerateBundlesSync(resourceIds) {
const appLocales = Services.locale.appLocalesAsBCP47;
return L10nRegistry.generateBundlesSync(appLocales, resourceIds);
return L10nRegistry.getInstance().generateBundlesSync(appLocales, resourceIds);
}
function maybeReportErrorToGecko(error) {