Bug 1557950 - Port Bug 1555662: Register L10nRegistry sources using categories. r=jorgk, f=zibi
authorRichard Marti <richard.marti@gmail.com>
Sat, 08 Jun 2019 15:19:28 +0200
changeset 35807 984499e7eacc4e8dbabb68fc4391ea21ad084a36
parent 35806 8980d7fbb2580cd41ec71f5f8245abd849b42a7a
child 35808 d81765c682d0508cf305ed3cccd5c3a033cd46b2
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1557950, 1555662
Bug 1557950 - Port Bug 1555662: Register L10nRegistry sources using categories. r=jorgk, f=zibi
mail/components/mailGlue.js
mail/installer/package-manifest.in
--- a/mail/components/mailGlue.js
+++ b/mail/components/mailGlue.js
@@ -7,17 +7,16 @@
 
 var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
 var {LightweightThemeConsumer} = ChromeUtils.import("resource://gre/modules/LightweightThemeConsumer.jsm");
 var {TBDistCustomizer} = ChromeUtils.import("resource:///modules/TBDistCustomizer.jsm");
 var {MailMigrator} = ChromeUtils.import("resource:///modules/MailMigrator.jsm");
 var {ExtensionSupport} = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
-var {L10nRegistry, FileSource} = ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm");
 var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 var {RemoteSecuritySettings} = ChromeUtils.import("resource://gre/modules/psm/RemoteSecuritySettings.jsm");
 
 // lazy module getters
 
 XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
   return Services.strings.createBundle("chrome://branding/locale/brand.properties");
 });
@@ -141,20 +140,16 @@ MailGlue.prototype = {
   // nsIMailGlue implementation
   sanitize(aParentWindow) {
     this._sanitizer.sanitize(aParentWindow);
   },
 
   _onProfileStartup() {
     TBDistCustomizer.applyPrefDefaults();
 
-    let locales = Services.locale.packagedLocales;
-    const appSource = new FileSource("app", locales, "resource:///localization/{locale}/");
-    L10nRegistry.registerSource(appSource);
-
     // handle any migration work that has to happen at profile startup
     MailMigrator.migrateAtProfileStartup();
 
     // check if we're in safe mode
     if (Services.appinfo.inSafeMode) {
       Services.ww.openWindow(null, "chrome://messenger/content/safeMode.xul",
                              "_blank", "chrome,centerscreen,modal,resizable=no", null);
     }
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -392,16 +392,18 @@
 #endif
 @RESPATH@/features/wetransfer@extensions.thunderbird.net/
 
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/cryptoComponents.manifest
 @RESPATH@/components/Push.manifest
 
+@RESPATH@/components/l10n-registry.manifest
+
 ; Remote control protocol
 #ifdef ENABLE_MARIONETTE
 @RESPATH@/chrome/marionette@JAREXT@
 @RESPATH@/chrome/marionette.manifest
 @RESPATH@/components/marionette.manifest
 @RESPATH@/components/marionette.js
 @RESPATH@/defaults/pref/marionette.js
 #endif