Bug 1795307 - Migrate intl/locale imports to ESM. r=aleca
Differential Revision: https://phabricator.services.mozilla.com/D159394 --HG-- extra : amend_source : f86b60db40e0094a317c6028a087d87b0e1fc2dc
This commit is contained in:
Родитель
08e0dbba5c
Коммит
8ab1088f3b
|
@ -8,7 +8,7 @@
|
|||
// Wrap in a block to prevent leaking to window scope.
|
||||
{
|
||||
const { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
const { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
|
||||
/**
|
||||
* An observer for the calendar event data source. This keeps the unifinder
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
/* import-globals-from ../../../../toolkit/content/globalOverlay.js */
|
||||
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
/* import-globals-from ../item-editing/calendar-item-editing.js */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
/* import-globals-from ../calendar-ui-utils.js */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
/* import-globals-from calendar-identity-utils.js */
|
||||
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
|
||||
/**
|
||||
* The calendar to modify, is retrieved from window.arguments[0].calendar
|
||||
|
|
|
@ -30,7 +30,7 @@ var {
|
|||
countOccurrences,
|
||||
hasUnsupported,
|
||||
} = ChromeUtils.import("resource:///modules/calendar/calRecurrenceUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// Wrap in a block to prevent leaking to window scope.
|
||||
{
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
|
||||
/**
|
||||
* A calendar-notifications-setting provides controls to config notifications
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* checkRecurrenceRule, countOccurrences
|
||||
*/
|
||||
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["CalAlarm"];
|
||||
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
var { cal } = ChromeUtils.import("resource:///modules/calendar/calUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
|
||||
var { PluralForm } = ChromeUtils.importESModule("resource://gre/modules/PluralForm.sys.mjs");
|
||||
|
||||
var { CalendarTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/calendar/CalendarTestUtils.jsm"
|
||||
|
|
|
@ -33,11 +33,10 @@ import { Socket } from "resource:///modules/socket.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PluralForm",
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
ircHandlers: "resource:///modules/ircHandlers.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
@ -45,10 +44,6 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource://gre/modules/DownloadUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ircHandlers: "resource:///modules/ircHandlers.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "_conv", () =>
|
||||
l10nHelper("chrome://chat/locale/conversations.properties")
|
||||
);
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
"use strict";
|
||||
|
||||
var { MailUtils } = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { TagUtils } = ChromeUtils.import("resource:///modules/TagUtils.jsm");
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* get it wrong and it may eventually want to migrate.
|
||||
*/
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
/* import-globals-from mailWindow.js */
|
||||
/* import-globals-from nsContextMenu.js */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
const { FacetUtils } = ChromeUtils.import(
|
||||
"resource:///modules/gloda/Facet.jsm"
|
||||
);
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
const { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
const { Gloda } = ChromeUtils.import("resource:///modules/gloda/Gloda.jsm");
|
||||
|
||||
|
|
|
@ -29,13 +29,9 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource://gre/modules/DownloadUtils.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PluralForm",
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
ProcessType: "resource://gre/modules/ProcessType.sys.mjs",
|
||||
});
|
||||
|
||||
|
|
|
@ -22,11 +22,14 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
Gloda: "resource:///modules/gloda/GlodaPublic.jsm",
|
||||
GlodaConstants: "resource:///modules/gloda/GlodaConstants.jsm",
|
||||
GlodaIndexer: "resource:///modules/gloda/GlodaIndexer.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,8 +14,8 @@ var nsActEvent = Components.Constructor(
|
|||
const { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
const { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
// This module provides a link between the move/copy code and the activity
|
||||
|
|
|
@ -14,8 +14,8 @@ var nsActEvent = Components.Constructor(
|
|||
const { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
const { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
// This module provides a link between the pop3 service code and the activity
|
||||
|
|
|
@ -17,8 +17,8 @@ var { encodeABTermValue } = ChromeUtils.import(
|
|||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
var searchSessionContractID = "@mozilla.org/messenger/searchSession;1";
|
||||
|
|
|
@ -28,6 +28,7 @@ XPCOMUtils.defineLazyGetter(this, "AddrBookUtils", function() {
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
|
@ -40,7 +41,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
GlodaMsgSearcher: "resource:///modules/gloda/GlodaMsgSearcher.jsm",
|
||||
ICAL: "resource:///modules/calendar/Ical.jsm",
|
||||
MailE10SUtils: "resource:///modules/MailE10SUtils.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
VCardProperties: "resource:///modules/VCardUtils.jsm",
|
||||
VCardPropertyEntry: "resource:///modules/VCardUtils.jsm",
|
||||
});
|
||||
|
|
|
@ -35,8 +35,8 @@ var { MimeParser } = ChromeUtils.import("resource:///modules/mimeParser.jsm");
|
|||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
|
|
|
@ -15,11 +15,9 @@ var { MailServices } = ChromeUtils.import(
|
|||
var { DownloadUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/DownloadUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PluralForm",
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
});
|
||||
|
||||
// This is the list of notifications that the account manager window observes
|
||||
var events = [
|
||||
|
|
|
@ -7,9 +7,8 @@ import { IMServices } from "resource:///modules/IMServices.sys.mjs";
|
|||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
);
|
||||
import { PluralForm } from "resource://gre/modules/PluralForm.sys.mjs";
|
||||
|
||||
const { clearTimeout, setTimeout } = ChromeUtils.import(
|
||||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
|
|
|
@ -13,10 +13,14 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AccountCreationUtils:
|
||||
"resource:///modules/accountcreation/AccountCreationUtils.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
|
||||
UIDensity: "resource:///modules/UIDensity.jsm",
|
||||
UIFontSize: "resource:///modules/UIFontSize.jsm",
|
||||
});
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
var gCookiesWindow = {
|
||||
|
|
|
@ -16,6 +16,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
|
||||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
@ -24,7 +25,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|||
AMTelemetry: "resource://gre/modules/AddonManager.jsm",
|
||||
ExtensionData: "resource://gre/modules/Extension.jsm",
|
||||
ExtensionParent: "resource://gre/modules/ExtensionParent.jsm",
|
||||
PluralForm: "resource://gre/modules/PluralForm.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ var EXPORTED_SYMBOLS = ["MailUtils"];
|
|||
const { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
const { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
|
|
@ -9,8 +9,8 @@ const EXPORTED_SYMBOLS = [
|
|||
"QuickFilterSearchListener",
|
||||
];
|
||||
|
||||
const { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
const { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
const { AppConstants } = ChromeUtils.import(
|
||||
"resource://gre/modules/AppConstants.jsm"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
var gAlertListener = null;
|
||||
|
|
|
@ -16,8 +16,8 @@ var kCurrentColor = "";
|
|||
var kDefaultColor = "#363959";
|
||||
var gNeedToRestoreFolderSelection = false;
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
var { MailServices } = ChromeUtils.import(
|
||||
"resource:///modules/MailServices.jsm"
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["PluralStringFormatter", "makeFriendlyDateAgo"];
|
||||
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
function PluralStringFormatter(aBundleURI) {
|
||||
|
|
|
@ -19,8 +19,8 @@ var { AppConstants } = ChromeUtils.import(
|
|||
var { FileUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/FileUtils.sys.mjs"
|
||||
);
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
var FeedSubscriptions = {
|
||||
|
|
|
@ -8,8 +8,8 @@ var { MailServices } = ChromeUtils.import(
|
|||
"resource:///modules/MailServices.jsm"
|
||||
);
|
||||
var { MailUtils } = ChromeUtils.import("resource:///modules/MailUtils.jsm");
|
||||
var { PluralForm } = ChromeUtils.import(
|
||||
"resource://gre/modules/PluralForm.jsm"
|
||||
var { PluralForm } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PluralForm.sys.mjs"
|
||||
);
|
||||
|
||||
// The actual filter that we're editing if it is a _saved_ filter or prefill;
|
||||
|
|
Загрузка…
Ссылка в новой задаче