Bug 1440188 - Fix eslint error from adding intl/l10n to eslint. r=gandalf
MozReview-Commit-ID: 8um44N5dZUv
--- a/intl/l10n/Localization.jsm
+++ b/intl/l10n/Localization.jsm
@@ -113,18 +113,16 @@ class L10nError extends Error {
* available in L10nRegistry, with locales requested by the user to
* generate the iterator over MessageContexts.
*
* In the future, we may want to allow certain modules to override this
* with a different negotitation strategy to allow for the module to
* be localized into a different language - for example DevTools.
*/
function defaultGenerateMessages(resourceIds) {
- const availableLocales = L10nRegistry.getAvailableLocales();
-
const appLocales = Services.locale.getAppLocalesAsLangTags();
return L10nRegistry.generateContexts(appLocales, resourceIds);
}
/**
* The `Localization` class is a central high-level API for vanilla
* JavaScript use of Fluent.
* It combines language negotiation, MessageContext and I/O to
@@ -248,24 +246,24 @@ class Localization {
const [val] = await this.formatValues([[id, args]]);
return val;
}
/**
* Register weak observers on events that will trigger cache invalidation
*/
registerObservers() {
- Services.obs.addObserver(this, 'intl:app-locales-changed', true);
+ Services.obs.addObserver(this, "intl:app-locales-changed", true);
}
/**
* Unregister observers on events that will trigger cache invalidation
*/
unregisterObservers() {
- Services.obs.removeObserver(this, 'intl:app-locales-changed');
+ Services.obs.removeObserver(this, "intl:app-locales-changed");
}
/**
* Default observer handler method.
*
* @param {String} subject
* @param {String} topic
* @param {Object} data