Bug 1461590 Always use lower case for language pack resource: substitutions draft
authorAndrew Swan <aswan@mozilla.com>
Tue, 15 May 2018 12:33:38 -0700
changeset 795411 ce42499a17fb
parent 794866 c96b4323d7b8
push id109963
push useraswan@mozilla.com
push dateTue, 15 May 2018 19:33:50 +0000
bugs1461590
milestone62.0a1
Bug 1461590 Always use lower case for language pack resource: substitutions MozReview-Commit-ID: L5gF7mPW3Jl
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1931,17 +1931,17 @@ class Langpack extends ExtensionData {
   async startup(reason) {
     this.chromeRegistryHandle = null;
     if (this.startupData.chromeEntries.length > 0) {
       const manifestURI = Services.io.newURI("manifest.json", null, this.rootURI);
       this.chromeRegistryHandle =
         aomStartup.registerChrome(manifestURI, this.startupData.chromeEntries);
     }
 
-    const langpackId = this.startupData.langpackId;
+    const langpackId = this.startupData.langpackId.toLowerCase();
     const l10nRegistrySources = this.startupData.l10nRegistrySources;
 
     resourceProtocol.setSubstitution(langpackId, this.rootURI);
 
     for (const [sourceName, basePath] of Object.entries(l10nRegistrySources)) {
       L10nRegistry.registerSource(new FileSource(
         `${sourceName}-${langpackId}`,
         this.startupData.languages,