Bug 1299070 - Move l10n.ELLIPSIS behind getter;r=bgrins
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 01 Sep 2016 16:26:09 +0200
changeset 409697 7aaba7598abbdb64c0f0e48f3ba26c1a659008e4
parent 409680 401ea746b1a9d515032b66d1368510d09e4e5a8e
child 409698 e9ca1d928e35ae987bf3265408b48f04620badf5
push id28517
push userjdescottes@mozilla.com
push dateSun, 04 Sep 2016 12:30:27 +0000
reviewersbgrins
bugs1299070
milestone51.0a1
Bug 1299070 - Move l10n.ELLIPSIS behind getter;r=bgrins This avoids loading the ellipsis properties file on browser startup. MozReview-Commit-ID: 8lfAeltfn10
devtools/shared/l10n.js
--- a/devtools/shared/l10n.js
+++ b/devtools/shared/l10n.js
@@ -167,17 +167,16 @@ function localizeMarkup(root) {
       }
     }
 
     element.removeAttribute("data-localization");
   }
 }
 
 const sharedL10N = new LocalizationHelper("devtools-shared/locale/shared.properties");
-const ELLIPSIS = sharedL10N.getStr("ellipsis");
 
 /**
  * A helper for having the same interface as LocalizationHelper, but for more
  * than one file. Useful for abstracting l10n string locations.
  */
 function MultiLocalizationHelper(...stringBundleNames) {
   let instances = stringBundleNames.map(bundle => {
     return new LocalizationHelper(bundle);
@@ -205,9 +204,9 @@ function MultiLocalizationHelper(...stri
         return null;
       };
     });
 }
 
 exports.LocalizationHelper = LocalizationHelper;
 exports.localizeMarkup = localizeMarkup;
 exports.MultiLocalizationHelper = MultiLocalizationHelper;
-exports.ELLIPSIS = ELLIPSIS;
+Object.defineProperty(exports, "ELLIPSIS", { get: () => sharedL10N.getStr("ellipsis") });