Bug 1440188 - Fix eslint error from adding intl/l10n to eslint. r=gandalf draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Wed, 21 Feb 2018 18:36:30 -0800
changeset 758239 5d1a01c53a585bca9e396543bf29e3ee3b8565d9
parent 758214 8457ce0f237a52aa56abdfeaaede6d266255a8e0
push id99997
push userbmo:gandalf@aviary.pl
push dateThu, 22 Feb 2018 02:36:56 +0000
reviewersgandalf
bugs1440188
milestone60.0a1
Bug 1440188 - Fix eslint error from adding intl/l10n to eslint. r=gandalf MozReview-Commit-ID: 8um44N5dZUv
intl/l10n/Localization.jsm
--- 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