Bug 1299070 - Move l10n.ELLIPSIS behind getter;r=bgrins
This avoids loading the ellipsis properties file on browser startup.
MozReview-Commit-ID: 8lfAeltfn10
--- 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") });