Bug 1299070 - Move l10n.ELLIPSIS behind getter;r=bgrins draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 01 Sep 2016 16:26:09 +0200
changeset 408703 d96b452667b65330aac15a084772b252235ab689
parent 408583 cba87d584348ee62004f8d7893529c9b37a6bded
child 408704 6277ce8081acc98ea633997c3722bd42991e9c01
push id28273
push userjdescottes@mozilla.com
push dateThu, 01 Sep 2016 14:44:44 +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") });