Bug 1440490 - Move l10n related functions into calL10NUtils.jsm - part 3 - migrate getCalString. r=MakeMyDay
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 22 Feb 2018 07:43:54 +0100
changeset 31381 5250ba1d9d41e15629fe93b30b150562a303de1c
parent 31380 6e8d7aef9631f3d31a92c1262c74fe5595e415af
child 31382 4151d5bee5b7d4a491556ea4e3ed57f36fb4ed62
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersMakeMyDay
bugs1440490
Bug 1440490 - Move l10n related functions into calL10NUtils.jsm - part 3 - migrate getCalString. r=MakeMyDay MozReview-Commit-ID: 4rjjnuh2Du6
calendar/base/content/calendar-base-view.xml
calendar/base/content/calendar-clipboard.js
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-item-bindings.xml
calendar/base/content/calendar-management.js
calendar/base/content/calendar-month-view.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-statusbar.js
calendar/base/content/calendar-task-editing.js
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-view-core.xml
calendar/base/content/calendar-views.js
calendar/base/content/calendar-views.xml
calendar/base/content/dialogs/calendar-alarm-dialog.js
calendar/base/content/dialogs/calendar-conflicts-dialog.xul
calendar/base/content/dialogs/calendar-creation.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-migration-dialog.js
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-properties-dialog.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/import-export.js
calendar/base/content/today-pane.js
calendar/base/content/widgets/calendar-alarm-widget.xml
calendar/base/content/widgets/minimonth.xml
calendar/base/modules/calItipUtils.jsm
calendar/base/modules/calPrintUtils.jsm
calendar/base/modules/calUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calDateTimeFormatter.js
calendar/base/src/calIcsParser.js
calendar/base/src/calTimezoneService.js
calendar/import-export/calHtmlExport.js
calendar/import-export/calIcsImportExport.js
calendar/import-export/calListFormatter.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/providers/caldav/calDavCalendar.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/mouseoverPreviews.js
calendar/resources/content/publish.js
calendar/test/mozmill/testAlarmDefaultValue.js
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -876,22 +876,22 @@
 
       <property name="date">
         <getter><![CDATA[
             return this.mDate;
         ]]></getter>
         <setter><![CDATA[
             this.mDate = val;
             let dateFormatter = cal.getDateFormatter();
-            let label = cal.calGetString("calendar", "dayHeaderLabel", [
+            let label = cal.l10n.getCalString("dayHeaderLabel", [
                 dateFormatter.shortDayName(val.weekday),
                 dateFormatter.formatDateWithoutYear(val)
             ]);
             this.shortName.setAttribute("value", label);
-            label = cal.calGetString("calendar", "dayHeaderLabel", [
+            label = cal.l10n.getCalString("dayHeaderLabel", [
                 dateFormatter.dayName(val.weekday),
                 dateFormatter.formatDateWithoutYear(val)
             ]);
             this.longName.setAttribute("value", label);
             return val;
         ]]></setter>
       </property>
 
--- a/calendar/base/content/calendar-clipboard.js
+++ b/calendar/base/content/calendar-clipboard.js
@@ -223,29 +223,29 @@ function pasteFromClipboard() {
                                    .filter(cal.acl.userCanAddItemsToCalendar)
                                    .filter((aCal) => {
                                        let status = aCal.getProperty("currentStatus");
                                        return Components.isSuccessCode(status);
                                    });
                 if (calendars.length > 1) {
                     let args = {};
                     args.calendars = calendars;
-                    args.promptText = cal.calGetString("calendar", "pastePrompt");
+                    args.promptText = cal.l10n.getCalString("pastePrompt");
 
                     if (validPasteText) {
-                        pasteText = cal.calGetString("calendar", pasteText);
-                        let note = cal.calGetString("calendar", "pasteNotifyAbout", [pasteText]);
+                        pasteText = cal.l10n.getCalString(pasteText);
+                        let note = cal.l10n.getCalString("pasteNotifyAbout", pasteText);
                         args.promptNotify = note;
 
-                        args.labelExtra1 = cal.calGetString("calendar", "pasteDontNotifyLabel");
+                        args.labelExtra1 = cal.l10n.getCalString("pasteDontNotifyLabel");
                         args.onExtra1 = (aCal) => {
                             destCal = aCal;
                             notify = Ci.calIItipItem.NONE;
                         };
-                        args.labelOk = cal.calGetString("calendar", "pasteAndNotifyLabel");
+                        args.labelOk = cal.l10n.getCalString("pasteAndNotifyLabel");
                         args.onOk = (aCal) => {
                             destCal = aCal;
                             notify = Ci.calIItipItem.AUTO;
                         };
                     } else {
                         args.onOk = (aCal) => { destCal = aCal; };
                     }
 
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -810,21 +810,21 @@ function removeCalendarCommandController
  * @return {Boolean}                        True, to show the popup menu.
  */
 function setupContextItemType(aEvent, aItems) {
     function adaptModificationMenuItem(aMenuItemId, aItemType) {
         let menuItem = document.getElementById(aMenuItemId);
         if (menuItem) {
             menuItem.setAttribute(
                 "label",
-                cal.calGetString("calendar", `delete${aItemType}Label`)
+                cal.l10n.getCalString(`delete${aItemType}Label`)
             );
             menuItem.setAttribute(
                 "accesskey",
-                cal.calGetString("calendar", `delete${aItemType}Accesskey`)
+                cal.l10n.getCalString(`delete${aItemType}Accesskey`)
             );
         }
     }
     if (aItems.some(cal.item.isEvent) && aItems.some(cal.item.isToDo)) {
         aEvent.target.setAttribute("type", "mixed");
         adaptModificationMenuItem("calendar-item-context-menu-delete-menuitem",
                                   "Item");
     } else if (aItems.length && cal.item.isEvent(aItems[0])) {
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -22,19 +22,19 @@ var calendarExtract = {
             let langName = localeParts[2];
 
             try {
                 langName = cal.calGetString("languageNames", langName, null, "global");
             } catch (ex) {
                 // If no language name is found that is ok, keep the technical term
             }
 
-            let label = cal.calGetString("calendar", "extractUsing", [langName]);
+            let label = cal.l10n.getCalString("extractUsing", [langName]);
             if (localeParts[3] != "") {
-                label = cal.calGetString("calendar", "extractUsingRegion", [langName, localeParts[3]]);
+                label = cal.l10n.getCalString("extractUsingRegion", [langName, localeParts[3]]);
             }
 
             langs.push([label, localeParts[1]]);
         }
 
         // sort
         let pref = "calendar.patterns.last.used.languages";
         let lastUsedLangs = Preferences.get(pref, "");
--- a/calendar/base/content/calendar-item-bindings.xml
+++ b/calendar/base/content/calendar-item-bindings.xml
@@ -84,17 +84,17 @@
                 this.setAttribute("hidden", "true");
             } else {
                 const kDefaultTimezone = cal.dtz.defaultTimezone;
                 let localTime = date.getInTimezone(kDefaultTimezone);
                 let formatter = cal.getDateFormatter();
                 itemDateTimeLabel.value = formatter.formatDateTime(localTime);
                 if (!date.timezone.isFloating && date.timezone.tzid != kDefaultTimezone.tzid) {
                     // we additionally display the original datetime with timezone
-                    let orgTime = cal.calGetString("calendar", "datetimeWithTimezone", [
+                    let orgTime = cal.l10n.getCalString("datetimeWithTimezone", [
                         formatter.formatDateTime(date),
                         date.timezone.tzid
                     ]);
                     itemDateTimeLabel.value += " (" + orgTime + ")";
                 }
                 this.removeAttribute("hidden");
             }
         ]]></setter>
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -37,41 +37,41 @@ function promptDeleteCalendar(aCalendar)
     let calMgr = cal.getCalendarManager();
     let calendars = calMgr.getCalendars({});
     if (calendars.length <= 1) {
         // If this is the last calendar, don't delete it.
         return;
     }
 
     let modes = new Set(aCalendar.getProperty("capabilities.removeModes") || ["unsubscribe"]);
-    let title = cal.calGetString("calendar", "removeCalendarTitle");
+    let title = cal.l10n.getCalString("removeCalendarTitle");
 
     let textKey, b0text, b2text;
     let removeFlags = 0;
     let promptFlags = (nIPS.BUTTON_POS_0 * nIPS.BUTTON_TITLE_IS_STRING) +
                       (nIPS.BUTTON_POS_1 * nIPS.BUTTON_TITLE_CANCEL);
 
     if (modes.has("delete") && !modes.has("unsubscribe")) {
         textKey = "removeCalendarMessageDelete";
         promptFlags += nIPS.BUTTON_DELAY_ENABLE;
-        b0text = cal.calGetString("calendar", "removeCalendarButtonDelete");
+        b0text = cal.l10n.getCalString("removeCalendarButtonDelete");
     } else if (modes.has("delete")) {
         textKey = "removeCalendarMessageDeleteOrUnsubscribe";
         promptFlags += (nIPS.BUTTON_POS_2 * nIPS.BUTTON_TITLE_IS_STRING);
-        b0text = cal.calGetString("calendar", "removeCalendarButtonUnsubscribe");
-        b2text = cal.calGetString("calendar", "removeCalendarButtonDelete");
+        b0text = cal.l10n.getCalString("removeCalendarButtonUnsubscribe");
+        b2text = cal.l10n.getCalString("removeCalendarButtonDelete");
     } else if (modes.has("unsubscribe")) {
         textKey = "removeCalendarMessageUnsubscribe";
         removeFlags |= cICM.REMOVE_NO_DELETE;
-        b0text = cal.calGetString("calendar", "removeCalendarButtonUnsubscribe");
+        b0text = cal.l10n.getCalString("removeCalendarButtonUnsubscribe");
     } else {
         return;
     }
 
-    let text = cal.calGetString("calendar", textKey, [aCalendar.name]);
+    let text = cal.l10n.getCalString(textKey, [aCalendar.name]);
     let res = Services.prompt.confirmEx(window, title, text, promptFlags,
                                         b0text, null, b2text, null, {});
 
     if (res != 1) { // Not canceled
         if (textKey == "removeCalendarMessageDeleteOrUnsubscribe" && res == 0) {
             // Both unsubscribing and deleting is possible, but unsubscribing was
             // requested. Make sure no delete is executed.
             removeFlags |= cICM.REMOVE_NO_DELETE;
@@ -112,17 +112,17 @@ function loadCalendarManager() {
 /**
  * Creates the initial "Home" calendar if no calendar exists.
  */
 function initHomeCalendar() {
     let calMgr = cal.getCalendarManager();
     let composite = cal.view.getCompositeCalendar(window);
     let url = Services.io.newURI("moz-storage-calendar://");
     let homeCalendar = calMgr.createCalendar("storage", url);
-    homeCalendar.name = cal.calGetString("calendar", "homeCalendarName");
+    homeCalendar.name = cal.l10n.getCalString("homeCalendarName");
     calMgr.registerCalendar(homeCalendar);
     Preferences.set("calendar.list.sortOrder", homeCalendar.id);
     composite.addCalendar(homeCalendar);
 
     // Wrapping this in a try/catch block, as if any of the migration code
     // fails, the app may not load.
     if (Preferences.get("calendar.migrator.enabled", true)) {
         try {
@@ -168,19 +168,19 @@ function updateSortOrderPref(event) {
  */
 function calendarListTooltipShowing(event) {
     let tree = document.getElementById("calendar-list-tree-widget");
     let calendar = tree.getCalendarFromEvent(event);
     let tooltipText = false;
     if (calendar) {
         let currentStatus = calendar.getProperty("currentStatus");
         if (!Components.isSuccessCode(currentStatus)) {
-            tooltipText = cal.calGetString("calendar", "tooltipCalendarDisabled", [calendar.name]);
+            tooltipText = cal.l10n.getCalString("tooltipCalendarDisabled", [calendar.name]);
         } else if (calendar.readOnly) {
-            tooltipText = cal.calGetString("calendar", "tooltipCalendarReadOnly", [calendar.name]);
+            tooltipText = cal.l10n.getCalString("tooltipCalendarReadOnly", [calendar.name]);
         }
     }
     setElementValue("calendar-list-tooltip", tooltipText, "label");
     return (tooltipText !== false);
 }
 
 /**
  * A handler called to set up the context menu on the calendar list.
@@ -225,27 +225,27 @@ function calendarListSetupContextMenu(ev
     if (calendar) {
         enableElement("list-calendars-context-edit");
         enableElement("list-calendars-context-publish");
 
         enableElement("list-calendars-context-togglevisible");
         setElementValue("list-calendars-context-togglevisible", false, "collapsed");
         let stringName = composite.getCalendarById(calendar.id) ? "hideCalendar" : "showCalendar";
         setElementValue("list-calendars-context-togglevisible",
-                        cal.calGetString("calendar", stringName, [calendar.name]),
+                        cal.l10n.getCalString(stringName, [calendar.name]),
                         "label");
         let accessKey = document.getElementById("list-calendars-context-togglevisible")
                                 .getAttribute(composite.getCalendarById(calendar.id) ?
                                               "accesskeyhide" : "accesskeyshow");
         setElementValue("list-calendars-context-togglevisible", accessKey, "accesskey");
 
         enableElement("list-calendars-context-showonly");
         setElementValue("list-calendars-context-showonly", false, "collapsed");
         setElementValue("list-calendars-context-showonly",
-                        cal.calGetString("calendar", "showOnlyCalendar", [calendar.name]),
+                        cal.l10n.getCalString("showOnlyCalendar", [calendar.name]),
                         "label");
 
         setupDeleteMenuitem("list-calendars-context-delete", calendar);
         // Only enable the delete calendars item if there is more than one
         // calendar. We don't want to have the last calendar deleted.
         setElementValue("list-calendars-context-delete", calendars.length < 2 && "true", "disabled");
     } else {
         disableElement("list-calendars-context-edit");
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -838,17 +838,17 @@
                             if (this.mDisplayDaysOff || !isDayOff) {
                                 weekLabelColumnPos = j;
                             }
                         }
                         // Build and set the label.
                         if (j == weekLabelColumnPos) {
                             weekLabel.removeAttribute("hidden");
                             let weekNumber = cal.getWeekInfoService().getWeekTitle(date);
-                            let weekString = cal.calGetString("calendar", "abbreviationOfWeek", [weekNumber]);
+                            let weekString = cal.l10n.getCalString("abbreviationOfWeek", [weekNumber]);
                             weekLabel.value = weekString;
                         } else {
                             weekLabel.hidden = true;
                         }
                     }
 
                     daybox.setAttribute("class", boxClass);
 
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -1964,19 +1964,19 @@
             let startstr = timeFormatter.formatTime(cal.dtz.jsDateToDateTime(jsTime, cal.dtz.floating));
             jsTime.setHours(endhr, endmin);
             let endstr = timeFormatter.formatTime(cal.dtz.jsDateToDateTime(jsTime, cal.dtz.floating));
 
             // Tasks without Entry or Due date have a string as first label
             // instead of the time.
             if (cal.item.isToDo(this.mDragState.dragOccurrence)) {
                 if (!this.mDragState.dragOccurrence.dueDate) {
-                    startstr = cal.calGetString("calendar", "dragLabelTasksWithOnlyEntryDate");
+                    startstr = cal.l10n.getCalString("dragLabelTasksWithOnlyEntryDate");
                 } else if (!this.mDragState.dragOccurrence.entryDate) {
-                    startstr = cal.calGetString("calendar", "dragLabelTasksWithOnlyDueDate");
+                    startstr = cal.l10n.getCalString("dragLabelTasksWithOnlyDueDate");
                 }
             }
             firstColumn.fgboxes.startlabel.setAttribute("value", startstr);
             lastColumn.fgboxes.endlabel.setAttribute("value", endstr);
 
         ]]></body>
       </method>
 
@@ -2390,17 +2390,17 @@
         <body><![CDATA[
             let evl = this.eventNameLabel;
             let item = this.mOccurrence;
 
             if (item.title && item.title != "") {
                 // Use <description> textContent so it can wrap.
                 evl.textContent = item.title;
             } else {
-                evl.textContent = cal.calGetString("calendar", "eventUntitled");
+                evl.textContent = cal.l10n.getCalString("eventUntitled");
             }
 
             let gripbar = document.getAnonymousElementByAttribute(this, "anonid", "gripbar1").boxObject.height;
             let height = document.getAnonymousElementByAttribute(this, "anonid", "eventbox").boxObject.height;
             evl.setAttribute("style", "max-height: " + Math.max(0, height-gripbar * 2) + "px");
         ]]></body>
       </method>
     </implementation>
--- a/calendar/base/content/calendar-statusbar.js
+++ b/calendar/base/content/calendar-statusbar.js
@@ -58,17 +58,17 @@ var gCalendarStatusFeedback = {
                 this.mCalendarStep = Math.trunc(100 / this.mCalendarCount);
             }
             this.mProgressMode = aProgressMode;
             this.mStatusProgressPanel.removeAttribute("collapsed");
             if (this.mProgressMode == Components.interfaces.calIStatusObserver.DETERMINED_PROGRESS) {
                 this.mStatusBar.removeAttribute("collapsed");
                 this.mStatusBar.setAttribute("mode", "determined");
                 this.mStatusBar.value = 0;
-                let commonStatus = cal.calGetString("calendar", "gettingCalendarInfoCommon");
+                let commonStatus = cal.l10n.getCalString("gettingCalendarInfoCommon");
                 this.showStatusString(commonStatus);
             }
             if (this.mThrobber) {
                 this.mThrobber.setAttribute("busy", true);
             }
         }
     },
 
@@ -94,18 +94,18 @@ var gCalendarStatusFeedback = {
             return;
         }
         if (this.spinning != Components.interfaces.calIStatusObserver.NO_PROGRESS) {
             if (this.spinning == Components.interfaces.calIStatusObserver.DETERMINED_PROGRESS) {
                 if (!this.mCalendars[aCalendar.id] || this.mCalendars[aCalendar.id] === undefined) {
                     this.mCalendars[aCalendar.id] = true;
                     this.mStatusBar.value = parseInt(this.mStatusBar.value, 10) + this.mCalendarStep;
                     this.mCurIndex++;
-                    let curStatus = cal.calGetString("calendar", "gettingCalendarInfoDetail",
-                                                     [this.mCurIndex, this.mCalendarCount]);
+                    let curStatus = cal.l10n.getCalString("gettingCalendarInfoDetail",
+                                                               [this.mCurIndex, this.mCalendarCount]);
                     this.showStatusString(curStatus);
                 }
             }
             if (this.mThrobber) {
                 this.mThrobber.setAttribute("busy", true);
             }
         }
     }
--- a/calendar/base/content/calendar-task-editing.js
+++ b/calendar/base/content/calendar-task-editing.js
@@ -68,24 +68,24 @@ var taskEdit = {
         }
 
         let calendar = getSelectedCalendar();
         edit.showsInstructions = true;
 
         if (calendar.getProperty("capabilities.tasks.supported") === false) {
             taskEdit.setupTaskField(edit,
                                     true,
-                                    cal.calGetString("calendar", "taskEditInstructionsCapability"));
+                                    cal.l10n.getCalString("taskEditInstructionsCapability"));
         } else if (cal.acl.isCalendarWritable(calendar)) {
             edit.showsInstructions = false;
             taskEdit.setupTaskField(edit, false, edit.savedValue || "");
         } else {
             taskEdit.setupTaskField(edit,
                                     true,
-                                    cal.calGetString("calendar", "taskEditInstructionsReadonly"));
+                                    cal.l10n.getCalString("taskEditInstructionsReadonly"));
         }
     },
 
     /**
      * Handler function to call when the quick-add textbox loses focus.
      *
      * @param aEvent    The DOM blur event
      */
@@ -102,28 +102,28 @@ var taskEdit = {
         if (!calendar) {
             // this must be a first run, we don't have a calendar yet
             return;
         }
 
         if (calendar.getProperty("capabilities.tasks.supported") === false) {
             taskEdit.setupTaskField(edit,
                                     true,
-                                    cal.calGetString("calendar", "taskEditInstructionsCapability"));
+                                    cal.l10n.getCalString("taskEditInstructionsCapability"));
         } else if (cal.acl.isCalendarWritable(calendar)) {
             if (!edit.showsInstructions) {
                 edit.savedValue = edit.value || "";
             }
             taskEdit.setupTaskField(edit,
                                     false,
-                                    cal.calGetString("calendar", "taskEditInstructions"));
+                                    cal.l10n.getCalString("taskEditInstructions"));
         } else {
             taskEdit.setupTaskField(edit,
                                     true,
-                                    cal.calGetString("calendar", "taskEditInstructionsReadonly"));
+                                    cal.l10n.getCalString("taskEditInstructionsReadonly"));
         }
         edit.showsInstructions = true;
     },
 
     /**
      * Handler function to call on keypress for the quick-add textbox.
      *
      * @param aEvent    The DOM keypress event
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -289,37 +289,37 @@
       <method name="duration">
         <parameter name="aTask"/>
         <body><![CDATA[
             if (aTask && aTask.dueDate && aTask.dueDate.isValid) {
                 let dur = aTask.dueDate.subtractDate(cal.dtz.now());
                 if (!dur.isNegative) {
                     let minutes = Math.ceil(dur.inSeconds / 60);
                     if (minutes >= 1440) { // 1 day or more
-                        let dueIn = PluralForm.get(dur.days, cal.calGetString("calendar", "dueInDays"));
+                        let dueIn = PluralForm.get(dur.days, cal.l10n.getCalString("dueInDays"));
                         return dueIn.replace("#1", dur.days);
                     } else if (minutes >= 60) { // 1 hour or more
-                        let dueIn = PluralForm.get(dur.hours, cal.calGetString("calendar", "dueInHours"));
+                        let dueIn = PluralForm.get(dur.hours, cal.l10n.getCalString("dueInHours"));
                         return dueIn.replace("#1", dur.hours);
                     } else {
                         // Less than one hour
-                        return cal.calGetString("calendar", "dueInLessThanOneHour");
+                        return cal.l10n.getCalString("dueInLessThanOneHour");
                     }
                 } else if (!aTask.completedDate || !aTask.completedDate.isValid) {
                     // Overdue task
                     let minutes = Math.ceil(-dur.inSeconds / 60);
                     if (minutes >= 1440) { // 1 day or more
-                        let dueIn = PluralForm.get(dur.days, cal.calGetString("calendar", "dueInDays"));
+                        let dueIn = PluralForm.get(dur.days, cal.l10n.getCalString("dueInDays"));
                         return "-" + dueIn.replace("#1", dur.days);
                     } else if (minutes >= 60) { // 1 hour or more
-                        let dueIn = PluralForm.get(dur.hours, cal.calGetString("calendar", "dueInHours"));
+                        let dueIn = PluralForm.get(dur.hours, cal.l10n.getCalString("dueInHours"));
                         return "-" + dueIn.replace("#1", dur.hours);
                     } else {
                         // Less than one hour
-                        return cal.calGetString("calendar", "dueInLessThanOneHour");
+                        return cal.l10n.getCalString("dueInLessThanOneHour");
                     }
                 }
             }
             // No due date specified
             return null;
         ]]></body>
       </method>
       <method name="getTaskAtRow">
@@ -584,17 +584,21 @@
                 let task = this.binding.mTaskArray[aRow];
                 if (!task) {
                     return false;
                 }
 
                 switch (aCol.element.getAttribute("itemproperty")) {
                     case "title":
                         // return title, or "Untitled" if empty/null
-                        return (task.title ? task.title.replace(/\n/g, " ") : cal.calGetString("calendar", "eventUntitled"));
+                        if (task.title) {
+                            return task.title.replace(/\n/g, " ");
+                        } else {
+                            return cal.l10n.getCalString("eventUntitled");
+                        }
                     case "entryDate":
                         return task.recurrenceInfo ? cal.calGetString("dateFormat", "Repeating") : this._formatDateTime(task.entryDate);
                     case "dueDate":
                         return task.recurrenceInfo ? cal.calGetString("dateFormat", "Repeating") : this._formatDateTime(task.dueDate);
                     case "completedDate":
                         return task.recurrenceInfo ? cal.calGetString("dateFormat", "Repeating") : this._formatDateTime(task.completedDate);
                     case "percentComplete":
                         return (task.percentComplete > 0 ? task.percentComplete + "%" : "");
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -61,47 +61,43 @@ var taskDetailsView = {
             displayElement("calendar-task-details-priority-normal", priority == 5);
             displayElement("calendar-task-details-priority-high", priority >= 1 && priority <= 4);
 
             let status = item.getProperty("STATUS");
             if (displayElement("calendar-task-details-status-row", status && status.length > 0)) {
                 let statusDetails = document.getElementById("calendar-task-details-status");
                 switch (status) {
                     case "NEEDS-ACTION": {
-                        statusDetails.value = cal.calGetString(
-                            "calendar",
-                            "taskDetailsStatusNeedsAction");
+                        statusDetails.value = cal.l10n.getCalString("taskDetailsStatusNeedsAction");
                         break;
                     }
                     case "IN-PROCESS": {
                         let percent = 0;
                         let property = item.getProperty("PERCENT-COMPLETE");
                         if (property != null) {
                             percent = parseInt(property, 10);
                         }
-                        statusDetails.value = cal.calGetString(
-                            "calendar",
-                            "taskDetailsStatusInProgress", [percent]);
+                        statusDetails.value = cal.l10n.getCalString(
+                            "taskDetailsStatusInProgress", [percent]
+                        );
                         break;
                     }
                     case "COMPLETED": {
                         if (item.completedDate) {
                             let completedDate = item.completedDate.getInTimezone(
                                                     cal.dtz.defaultTimezone);
-                            statusDetails.value = cal.calGetString(
-                                "calendar",
+                            statusDetails.value = cal.l10n.getCalString(
                                 "taskDetailsStatusCompletedOn",
-                                [dateFormatter.formatDateTime(completedDate)]);
+                                [dateFormatter.formatDateTime(completedDate)]
+                            );
                         }
                         break;
                     }
                     case "CANCELLED": {
-                        statusDetails.value = cal.calGetString(
-                            "calendar",
-                            "taskDetailsStatusCancelled");
+                        statusDetails.value = cal.l10n.getCalString("taskDetailsStatusCancelled");
                         break;
                     }
                     default: {
                         displayElement("calendar-task-details-status-row", false);
                         break;
                     }
                 }
             }
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -433,17 +433,17 @@ function updateListboxDeleteButton(listb
 function unitPluralForm(aLength, aUnit, aIncludeLength=true) {
     let unitProp = {
         minutes: "unitMinutes",
         hours: "unitHours",
         days: "unitDays",
         weeks: "unitWeeks"
     }[aUnit] || "unitMinutes";
 
-    return PluralForm.get(aLength, cal.calGetString("calendar", unitProp))
+    return PluralForm.get(aLength, cal.l10n.getCalString(unitProp))
                      .replace("#1", aIncludeLength ? aLength : "").trim();
 }
 
 /**
  * Update the given unit label to show the correct plural form.
  *
  * @param aLengthFieldId     The ID of the element containing the number
  * @param aLabelId           The ID of the label to update.
--- a/calendar/base/content/calendar-view-core.xml
+++ b/calendar/base/content/calendar-view-core.xml
@@ -142,17 +142,17 @@
       <property name="eventNameTextbox" readonly="true"
         onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'event-name-textbox');"/>
 
       <method name="setEditableLabel">
         <body><![CDATA[
             let evl = this.eventNameLabel;
             let item = this.mOccurrence;
             evl.value = (item.title ? item.title.replace(/\n/g, " ")
-                                    : cal.calGetString("calendar", "eventUntitled"));
+                                    : cal.l10n.getCalString("eventUntitled"));
         ]]></body>
       </method>
 
       <method name="setLocationLabel">
         <body><![CDATA[
             let locationLabel = document.getAnonymousElementByAttribute(this, "anonid", "event-location");
             let location = this.mOccurrence.getProperty("LOCATION");
             let showLocation = Preferences.get("calendar.view.showLocation", false);
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -33,17 +33,17 @@ var calendarViewController = {
      * Creates a new event
      * @see calICalendarViewController
      */
     createNewEvent: function(aCalendar, aStartTime, aEndTime, aForceAllday) {
         // if we're given both times, skip the dialog
         if (aStartTime && aEndTime && !aStartTime.isDate && !aEndTime.isDate) {
             let item = cal.createEvent();
             setDefaultItemValues(item, aCalendar, aStartTime, aEndTime);
-            item.title = cal.calGetString("calendar", "newEvent");
+            item.title = cal.l10n.getCalString("newEvent");
             doTransaction("add", item, item.calendar, null, null);
         } else {
             createEventWithDialog(aCalendar, aStartTime, null, null, null, aForceAllday);
         }
     },
 
     /**
      * Modifies the given occurrence
@@ -697,21 +697,21 @@ cal.navigationBar = {
             let weekLabel = document.getElementById("calendarWeek");
             if (aStartDate.nativeTime == aEndDate.nativeTime) {
                 intervalLabel.value = cal.getDateFormatter().formatDate(aStartDate);
             } else {
                 intervalLabel.value = currentView().getRangeDescription();
                 secondWeekNo = cal.getWeekInfoService().getWeekTitle(aEndDate);
             }
             if (secondWeekNo == firstWeekNo) {
-                weekLabel.value = cal.calGetString("calendar", "singleShortCalendarWeek", [firstWeekNo]);
-                weekLabel.tooltipText = cal.calGetString("calendar", "singleLongCalendarWeek", [firstWeekNo]);
+                weekLabel.value = cal.l10n.getCalString("singleShortCalendarWeek", [firstWeekNo]);
+                weekLabel.tooltipText = cal.l10n.getCalString("singleLongCalendarWeek", [firstWeekNo]);
             } else {
-                weekLabel.value = cal.calGetString("calendar", "severalShortCalendarWeeks", [firstWeekNo, secondWeekNo]);
-                weekLabel.tooltipText = cal.calGetString("calendar", "severalLongCalendarWeeks", [firstWeekNo, secondWeekNo]);
+                weekLabel.value = cal.l10n.getCalString("severalShortCalendarWeeks", [firstWeekNo, secondWeekNo]);
+                weekLabel.tooltipText = cal.l10n.getCalString("severalLongCalendarWeeks", [firstWeekNo, secondWeekNo]);
             }
             docTitle = intervalLabel.value;
         }
         if (document.getElementById("modeBroadcaster").getAttribute("mode") == "calendar") {
             document.title = (docTitle ? docTitle + " - " : "") +
                 cal.calGetString("brand", "brandFullName", null, "branding");
         }
         let viewTabs = document.getElementById("view-tabs");
--- a/calendar/base/content/calendar-views.xml
+++ b/calendar/base/content/calendar-views.xml
@@ -249,17 +249,17 @@
             }
             this.showDate(aDate);
         ]]></body>
       </method>
       <method name="getRangeDescription">
         <body><![CDATA[
             let monthName = cal.l10n.formatMonth(this.rangeStartDate.month + 1,
                                                  "calendar", "monthInYear");
-            return cal.calGetString("calendar", "monthInYear", [monthName, this.rangeStartDate.year]);
+            return cal.l10n.getCalString("monthInYear", [monthName, this.rangeStartDate.year]);
         ]]></body>
        </method>
       <method name="moveView">
         <parameter name="aNumber"/>
         <body><![CDATA[
             let dates = this.getDateList({});
             this.displayDaysOff = !this.mWorkdaysOnly;
 
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -220,31 +220,31 @@ function aboveSnoozeLimit(aDuration) {
     const LIMIT = Components.interfaces.calIAlarmService.MAX_SNOOZE_MONTHS;
 
     let currentTime = cal.dtz.now().getInTimezone(cal.dtz.UTC);
     let limitTime = currentTime.clone();
     limitTime.month += LIMIT;
 
     let durationUntilLimit = limitTime.subtractDate(currentTime);
     if (aDuration.compare(durationUntilLimit) > 0) {
-        let msg = PluralForm.get(LIMIT, cal.calGetString("calendar", "alarmSnoozeLimitExceeded"));
+        let msg = PluralForm.get(LIMIT, cal.l10n.getCalString("alarmSnoozeLimitExceeded"));
         cal.showError(msg.replace("#1", LIMIT), window);
         return true;
     }
     return false;
 }
 
 /**
  * Sets up the window title, counting the number of alarms in the window.
  */
 function setupTitle() {
     let alarmRichlist = document.getElementById("alarm-richlist");
     let reminders = alarmRichlist.childNodes.length;
 
-    let title = PluralForm.get(reminders, cal.calGetString("calendar", "alarmWindowTitle.label"));
+    let title = PluralForm.get(reminders, cal.l10n.getCalString("alarmWindowTitle.label"));
     document.title = title.replace("#1", reminders);
 }
 
 /**
  * Comparison function for the start date of a calendar item and
  * the start date of a calendar-alarm-widget.
  *
  * @param aItem                 A calendar item for the comparison of the start date property
--- a/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
+++ b/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
@@ -24,28 +24,28 @@
             document.getElementById("item-box").replaceWith(vbox);
         }
 
         let descr = document.getElementById("conflicts-description");
 
         // TODO These strings should move to DTD files, but we don't want to
         // disrupt string freeze right now. For that matter, this dialog
         // should be reworked!
-        docEl.title =  cal.calGetString("calendar", "itemModifiedOnServerTitle");
-        descr.textContent = cal.calGetString("calendar", "itemModifiedOnServer");
+        docEl.title =  cal.l10n.getCalString("itemModifiedOnServerTitle");
+        descr.textContent = cal.l10n.getCalString("itemModifiedOnServer");
 
         if (window.arguments[0].mode == "modify") {
-            descr.textContent += cal.calGetString("calendar", "modifyWillLoseData");
-            docEl.getButton("accept").setAttribute("label", cal.calGetString("calendar", "proceedModify"));
+            descr.textContent += cal.l10n.getCalString("modifyWillLoseData");
+            docEl.getButton("accept").setAttribute("label", cal.l10n.getCalString("proceedModify"));
         } else {
-            descr.textContent += cal.calGetString("calendar", "deleteWillLoseData");
-            docEl.getButton("accept").setAttribute("label", cal.calGetString("calendar", "proceedDelete"));
+            descr.textContent += cal.l10n.getCalString("deleteWillLoseData");
+            docEl.getButton("accept").setAttribute("label", cal.l10n.getCalString("proceedDelete"));
         }
 
-        docEl.getButton("cancel").setAttribute("label", cal.calGetString("calendar", "updateFromServer"));
+        docEl.getButton("cancel").setAttribute("label", cal.l10n.getCalString("updateFromServer"));
 
         window.sizeToContent();
     }
 
     function onAccept() {
         window.arguments[0].overwrite = true;
     }
 
--- a/calendar/base/content/dialogs/calendar-creation.js
+++ b/calendar/base/content/dialogs/calendar-creation.js
@@ -8,19 +8,19 @@ ChromeUtils.import("resource://calendar/
 
 /**
  * Shows the filepicker and creates a new calendar with a local file using the ICS
  * provider.
  */
 function openLocalCalendar() {
     const nsIFilePicker = Components.interfaces.nsIFilePicker;
     let picker = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
-    picker.init(window, cal.calGetString("calendar", "Open"), nsIFilePicker.modeOpen);
+    picker.init(window, cal.l10n.getCalString("Open"), nsIFilePicker.modeOpen);
     let wildmat = "*.ics";
-    let description = cal.calGetString("calendar", "filterIcs", [wildmat]);
+    let description = cal.l10n.getCalString("filterIcs", [wildmat]);
     picker.appendFilter(description, wildmat);
     picker.appendFilters(nsIFilePicker.filterAll);
 
     picker.open(rv => {
         if (rv != nsIFilePicker.returnOK || !picker.file) {
             return;
         }
         let calMgr = cal.getCalendarManager();
@@ -38,15 +38,15 @@ function openLocalCalendar() {
         // calendarCreation.js
         let fullPathRegex = new RegExp("([^/:]+)[.]ics$");
         let prettyName = picker.fileURL.spec.match(fullPathRegex);
         let name;
 
         if (prettyName) {
             name = decodeURIComponent(prettyName[1]);
         } else {
-            name = cal.calGetString("calendar", "untitledCalendarName");
+            name = cal.l10n.getCalString("untitledCalendarName");
         }
         openCalendar.name = name;
 
         calMgr.registerCalendar(openCalendar);
     });
 }
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -608,37 +608,47 @@ function setupAttendees() {
                 let partstat = attendee.participationStatus || "NEEDS-ACTION";
 
                 icon.setAttribute("partstat", partstat);
                 icon.setAttribute("usertype", userType);
                 icon.setAttribute("role", role);
                 cell.setAttribute("attendeeid", attendee.id);
                 cell.removeAttribute("hidden");
 
-                let userTypeString = cal.calGetString("calendar", "dialog.tooltip.attendeeUserType2." + userType,
-                                                      [attendee.toString()]);
-                let roleString = cal.calGetString("calendar", "dialog.tooltip.attendeeRole2." + role,
-                                                  [userTypeString]);
-                let partstatString = cal.calGetString("calendar", "dialog.tooltip.attendeePartStat2." + partstat,
-                                                      [label]);
-                let tooltip = cal.calGetString("calendar", "dialog.tooltip.attendee.combined",
-                                               [roleString, partstatString]);
+                let userTypeString = cal.l10n.getCalString(
+                    "dialog.tooltip.attendeeUserType2." + userType,
+                    [attendee.toString()]
+                );
+                let roleString = cal.l10n.getCalString(
+                    "dialog.tooltip.attendeeRole2." + role,
+                    [userTypeString]
+                );
+                let partstatString = cal.l10n.getCalString(
+                    "dialog.tooltip.attendeePartStat2." + partstat,
+                    [label]
+                );
+                let tooltip = cal.l10n.getCalString(
+                    "dialog.tooltip.attendee.combined",
+                    [roleString, partstatString]
+                );
 
                 let del = cal.itip.resolveDelegation(attendee, window.attendees);
                 if (del.delegators != "") {
-                    del.delegators = cal.calGetString("calendar",
-                                                      "dialog.attendee.append.delegatedFrom",
-                                                      [del.delegators]);
+                    del.delegators = cal.l10n.getCalString(
+                        "dialog.attendee.append.delegatedFrom",
+                        [del.delegators]
+                    );
                     label += " " + del.delegators;
                     tooltip += " " + del.delegators;
                 }
                 if (del.delegatees != "") {
-                    del.delegatees = cal.calGetString("calendar",
-                                                      "dialog.attendee.append.delegatedTo",
-                                                      [del.delegatees]);
+                    del.delegatees = cal.l10n.getCalString(
+                        "dialog.attendee.append.delegatedTo",
+                        [del.delegatees]
+                    );
                     tooltip += " " + del.delegatees;
                 }
 
                 text.setAttribute("value", label);
                 cell.setAttribute("tooltiptext", tooltip);
                 attCount++;
             }
             // we fill the row with placeholders if required
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
@@ -419,17 +419,17 @@ function updateEndTime() {
 
     propagateDateTime();
 
     if (warning) {
         let callback = function() {
             Services.prompt.alert(
                 null,
                 document.title,
-                cal.calGetString("calendar", "warningEndBeforeStart"));
+                cal.l10n.getCalString("warningEndBeforeStart"));
         };
         setTimeout(callback, 1);
     }
 }
 
 /**
  * Prompts the user to pick a new timezone for the starttime. The dialog is
  * opened modally.
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -641,17 +641,17 @@ function checkUntilDate() {
         setElementValue("repeat-until-date", repeatDate);
         checkUntilDate.warning = true;
         let callback = function() {
             // No warning when the dialog is being closed with the Cancel button.
             if (!checkUntilDate.warning) {
                 return;
             }
             Services.prompt.alert(null, document.title,
-                                  cal.calGetString("calendar", "warningUntilDateBeforeStart"));
+                                  cal.l10n.getCalString("warningUntilDateBeforeStart"));
             checkUntilDate.warning = false;
         };
         setTimeout(callback, 1);
     } else {
         gUntilDate = untilDate;
         updateRecurrenceControls();
     }
 }
--- a/calendar/base/content/dialogs/calendar-migration-dialog.js
+++ b/calendar/base/content/dialogs/calendar-migration-dialog.js
@@ -552,20 +552,20 @@ var gDataMigrator = {
         calendar.id = cal.getUUID();
 
         try {
             inputStream.init(icsFile, MODE_RDONLY, parseInt("0444", 8), {});
             items = icsImporter.importFromStream(inputStream, {});
         } catch(ex) {
             switch (ex.result) {
                 case Components.interfaces.calIErrors.INVALID_TIMEZONE:
-                    cal.showError(cal.calGetString("calendar", "timezoneError", [icsFile.path]), window);
+                    cal.showError(cal.l10n.getCalString("timezoneError", [icsFile.path]), window);
                     break;
                 default:
-                    cal.showError(cal.calGetString("calendar", "unableToRead") + icsFile.path + "\n"+ ex, window);
+                    cal.showError(cal.l10n.getCalString("unableToRead") + icsFile.path + "\n"+ ex, window);
             }
         } finally {
            inputStream.close();
         }
 
         // Defined in import-export.js
         putItemsIntoCal(calendar, items, icsFile.leafName);
 
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -69,17 +69,17 @@ function loadCalendarPrintDialog() {
  * settings.
  *
  * @param receiverFunc  The callback function to call on completion.
  */
 function getPrintSettings(receiverFunc) {
     let tempTitle = document.getElementById("title-field").value;
     let settings = {};
     let requiresFetch = true;
-    settings.title = tempTitle || cal.calGetString("calendar", "Untitled");
+    settings.title = tempTitle || cal.l10n.getCalString("Untitled");
     settings.layoutCId = document.getElementById("layout-field").value;
     settings.start = null;
     settings.end = null;
     settings.eventList = [];
     settings.printEvents = document.getElementById("events").checked;
     settings.printTasks = document.getElementById("tasks").checked;
     settings.printCompletedTasks = document.getElementById("completed-tasks").checked;
     settings.printTasksWithNoDueDate = document.getElementById("tasks-with-no-due-date").checked;
@@ -197,17 +197,17 @@ function getFilter(settings) {
 
 /**
  * Looks at the selections the user has made (start date, layout, etc.), and
  * updates the HTML in the iframe accordingly. This is also called when a
  * dialog UI element has changed, since we'll want to refresh the preview.
  */
 function refreshHtml(finishFunc) {
     getPrintSettings((settings) => {
-        document.title = cal.calGetString("calendar", "PrintPreviewWindowTitle", [settings.title]);
+        document.title = cal.l10n.getCalString("PrintPreviewWindowTitle", [settings.title]);
 
         let printformatter = Components.classes[settings.layoutCId]
                                        .createInstance(Components.interfaces.calIPrintFormatter);
         let html = "";
         try {
             let pipe = Components.classes["@mozilla.org/pipe;1"]
                                  .createInstance(Components.interfaces.nsIPipe);
             const PR_UINT32_MAX = 4294967295; // signals "infinite-length"
--- a/calendar/base/content/dialogs/calendar-properties-dialog.js
+++ b/calendar/base/content/dialogs/calendar-properties-dialog.js
@@ -130,17 +130,17 @@ function unsubscribeCalendar() {
     window.close();
 }
 
 function initRefreshInterval() {
     function createMenuItem(minutes) {
         let menuitem = createXULElement("menuitem");
         menuitem.setAttribute("value", minutes);
 
-        let everyMinuteString = cal.calGetString("calendar", "calendarPropertiesEveryMinute");
+        let everyMinuteString = cal.l10n.getCalString("calendarPropertiesEveryMinute");
         let label = PluralForm.get(minutes, everyMinuteString).replace("#1", minutes);
         menuitem.setAttribute("label", label);
 
         return menuitem;
     }
 
     setBooleanAttribute("calendar-refreshInterval-row", "hidden", !gCalendar.canRefresh);
 
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.js
@@ -116,24 +116,32 @@ function onLoad() {
         let text = cell.getElementsByTagName("label")[0];
         let icon = cell.getElementsByTagName("img")[0];
 
         let role = organizer.role || "REQ-PARTICIPANT";
         let userType = organizer.userType || "INDIVIDUAL";
         let partstat = organizer.participationStatus || "NEEDS-ACTION";
         let orgName = (organizer.commonName && organizer.commonName.length)
                        ? organizer.commonName : organizer.toString();
-        let userTypeString = cal.calGetString("calendar", "dialog.tooltip.attendeeUserType2." + userType,
-                                              [organizer.toString()]);
-        let roleString = cal.calGetString("calendar", "dialog.tooltip.attendeeRole2." + role,
-                                          [userTypeString]);
-        let partstatString = cal.calGetString("calendar", "dialog.tooltip.attendeePartStat2." + partstat,
-                                             [orgName]);
-        let tooltip = cal.calGetString("calendar", "dialog.tooltip.attendee.combined",
-                                       [roleString, partstatString]);
+        let userTypeString = cal.l10n.getCalString(
+            "dialog.tooltip.attendeeUserType2." + userType,
+            [organizer.toString()]
+        );
+        let roleString = cal.l10n.getCalString(
+            "dialog.tooltip.attendeeRole2." + role,
+            [userTypeString]
+        );
+        let partstatString = cal.l10n.getCalString(
+            "dialog.tooltip.attendeePartStat2." + partstat,
+            [orgName]
+        );
+        let tooltip = cal.l10n.getCalString(
+            "dialog.tooltip.attendee.combined",
+            [roleString, partstatString]
+        );
 
         text.setAttribute("value", orgName);
         cell.setAttribute("tooltiptext", tooltip);
         icon.setAttribute("partstat", partstat);
         icon.setAttribute("usertype", userType);
         icon.setAttribute("role", role);
     }
 
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -20,17 +20,17 @@ var MODE_TRUNCATE = 0x20;
  *                              into the calendar
  */
 function loadEventsFromFile(aCalendar) {
     const nsIFilePicker = Components.interfaces.nsIFilePicker;
 
     let picker = Components.classes["@mozilla.org/filepicker;1"]
                            .createInstance(nsIFilePicker);
     picker.init(window,
-                cal.calGetString("calendar", "filepickerTitleImport"),
+                cal.l10n.getCalString("filepickerTitleImport"),
                 nsIFilePicker.modeOpen);
     picker.defaultExtension = "ics";
 
     // Get a list of importers
     let contractids = [];
     let catman = Components.classes["@mozilla.org/categorymanager;1"]
                            .getService(Components.interfaces.nsICategoryManager);
     let catenum = catman.enumerateCategory("cal-importers");
@@ -84,29 +84,29 @@ function loadEventsFromFile(aCalendar) {
 
         try {
             inputStream.init(picker.file, MODE_RDONLY, parseInt("0444", 8), {});
             items = importer.importFromStream(inputStream, {});
         } catch (ex) {
             exception = ex;
             switch (ex.result) {
                 case Components.interfaces.calIErrors.INVALID_TIMEZONE:
-                    cal.showError(cal.calGetString("calendar", "timezoneError", [filePath]), window);
+                    cal.showError(cal.l10n.getCalString("timezoneError", [filePath]), window);
                     break;
                 default:
-                    cal.showError(cal.calGetString("calendar", "unableToRead") + filePath + "\n" + ex, window);
+                    cal.showError(cal.l10n.getCalString("unableToRead") + filePath + "\n" + ex, window);
             }
         } finally {
             inputStream.close();
         }
 
         if (!items.length && !exception) {
             // the ics did not contain any events, so there's no need to proceed. But we should
             // notify the user about it, if we haven't before.
-            cal.showError(cal.calGetString("calendar", "noItemsInCalendarFile", [filePath]), window);
+            cal.showError(cal.l10n.getCalString("noItemsInCalendarFile", [filePath]), window);
             return;
         }
 
         if (aCalendar) {
             putItemsIntoCal(aCalendar, items);
             return;
         }
 
@@ -117,17 +117,17 @@ function loadEventsFromFile(aCalendar) {
             // There's only one calendar, so it's silly to ask what calendar
             // the user wants to import into.
             putItemsIntoCal(calendars[0], items, filePath);
         } else if (calendars.length > 1) {
             // Ask what calendar to import into
             let args = {};
             args.onOk = (aCal) => { putItemsIntoCal(aCal, items, filePath); };
             args.calendars = calendars;
-            args.promptText = cal.calGetString("calendar", "importPrompt");
+            args.promptText = cal.l10n.getCalString("importPrompt");
             openDialog("chrome://calendar/content/chooseCalendarDialog.xul",
                        "_blank", "chrome,titlebar,modal,resizable", args);
         }
     });
 }
 
 /**
  * Put items into a certain calendar, catching errors and showing them to the
@@ -168,19 +168,26 @@ function putItemsIntoCal(destCal, aItems
                     failedCount++;
                     lastError = aStatus;
                 }
             }
             // See if it is time to end the calendar's batch.
             if (count == aItems.length) {
                 destCal.endBatch();
                 if (!failedCount && duplicateCount) {
-                    cal.showError(cal.calGetString("calendar", "duplicateError", [duplicateCount, aFilePath]), window);
+                    cal.showError(
+                        cal.l10n.getCalString("duplicateError", [duplicateCount, aFilePath]),
+                        window
+                    );
                 } else if (failedCount) {
-                    cal.showError(cal.calGetString("calendar", "importItemsFailed", [failedCount, lastError.toString()]), window);
+                    cal.showError(
+                        cal.l10n.getCalString("importItemsFailed",
+                                              [failedCount, lastError.toString()]),
+                        window
+                    );
                 }
             }
         }
     };
 
     for (let item of aItems) {
         // XXX prompt when finding a duplicate.
         try {
@@ -214,25 +221,25 @@ function saveEventsToFile(calendarEventA
 
     // Show the 'Save As' dialog and ask for a filename to save to
     const nsIFilePicker = Components.interfaces.nsIFilePicker;
 
     let picker = Components.classes["@mozilla.org/filepicker;1"]
                        .createInstance(nsIFilePicker);
 
     picker.init(window,
-                cal.calGetString("calendar", "filepickerTitleExport"),
+                cal.l10n.getCalString("filepickerTitleExport"),
                 nsIFilePicker.modeSave);
 
     if (aDefaultFileName && aDefaultFileName.length && aDefaultFileName.length > 0) {
         picker.defaultString = aDefaultFileName;
     } else if (calendarEventArray.length == 1 && calendarEventArray[0].title) {
         picker.defaultString = calendarEventArray[0].title;
     } else {
-        picker.defaultString = cal.calGetString("calendar", "defaultFileName");
+        picker.defaultString = cal.l10n.getCalString("defaultFileName");
     }
 
     picker.defaultExtension = "ics";
 
     // Get a list of exporters
     let contractids = [];
     let catman = Components.classes["@mozilla.org/categorymanager;1"]
                            .getService(Components.interfaces.nsICategoryManager);
@@ -302,17 +309,17 @@ function saveEventsToFile(calendarEventA
             // XXX Do the right thing with unicode and stuff. Or, again, should the
             //     exporter handle that?
             exporter.exportToStream(outputStream,
                                     calendarEventArray.length,
                                     calendarEventArray,
                                     null);
             outputStream.close();
         } catch (ex) {
-            cal.showError(cal.calGetString("calendar", "unableToWrite") + filePath, window);
+            cal.showError(cal.l10n.getCalString("unableToWrite") + filePath, window);
         }
     });
 }
 
 /**
  * Exports all the events and tasks in a calendar.  If aCalendar is not specified,
  * the user will be prompted with a list of calendars to choose which one to export.
  *
@@ -346,14 +353,14 @@ function exportEntireCalendar(aCalendar)
         if (count.value == 1) {
             // There's only one calendar, so it's silly to ask what calendar
             // the user wants to import into.
             getItemsFromCal(calendars[0]);
         } else {
             // Ask what calendar to import into
             let args = {};
             args.onOk = getItemsFromCal;
-            args.promptText = cal.calGetString("calendar", "exportPrompt");
+            args.promptText = cal.l10n.getCalString("exportPrompt");
             openDialog("chrome://calendar/content/chooseCalendarDialog.xul",
                        "_blank", "chrome,titlebar,modal,resizable", args);
         }
     }
 }
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -21,19 +21,19 @@ var TodayPane = {
         session: false
     },
 
     /**
      * Load Handler, sets up the today pane controls.
      */
     onLoad: function() {
         TodayPane.paneViews = [
-            cal.calGetString("calendar", "eventsandtasks"),
-            cal.calGetString("calendar", "tasksonly"),
-            cal.calGetString("calendar", "eventsonly")
+            cal.l10n.getCalString("eventsandtasks"),
+            cal.l10n.getCalString("tasksonly"),
+            cal.l10n.getCalString("eventsonly")
         ];
         agendaListbox.setupCalendar();
         TodayPane.initializeMiniday();
         TodayPane.setShortWeekdays();
 
         document.getElementById("modeBroadcaster").addEventListener("DOMAttrModified", TodayPane.onModeModified);
         TodayPane.setTodayHeader();
 
@@ -274,17 +274,17 @@ var TodayPane = {
      * @param aMonthLabel       The XUL node to set the month label on.
      * @param aIndex            The month number, 0-based.
      * @param aYear             The year this month should be displayed with
      * @param aCalWeek          The calendar week that should be shown.
      * @return                  The value set on aMonthLabel.
      */
     setMonthDescription: function(aMonthLabel, aIndex, aYear, aCalWeek) {
         if (this.cwlabel == null) {
-            this.cwlabel = cal.calGetString("calendar", "shortcalendarweek");
+            this.cwlabel = cal.l10n.getCalString("shortcalendarweek");
         }
         document.getElementById("currentWeek-label").value = this.cwlabel + " " + aCalWeek;
         aMonthLabel.value = cal.getDateFormatter().shortMonthName(aIndex) + " " + aYear;
         return aMonthLabel.value;
     },
 
     /**
      * Cycle the view shown in the today pane (event+task, event, task).
--- a/calendar/base/content/widgets/calendar-alarm-widget.xml
+++ b/calendar/base/content/widgets/calendar-alarm-widget.xml
@@ -87,19 +87,20 @@
             // Dates
             if (cal.item.isEvent(this.mItem)) {
                 dateLabel.textContent = formatter.formatItemInterval(this.mItem);
             } else if (cal.item.isToDo(this.mItem)) {
                 let startDate = this.mItem.entryDate || this.mItem.dueDate;
                 if (startDate) {
                     // A Task with a start or due date, show with label
                     startDate = startDate.getInTimezone(cal.dtz.defaultTimezone);
-                    dateLabel.textContent = cal.calGetString("calendar",
-                                                             "alarmStarts",
-                                                             [formatter.formatDateTime(startDate)]);
+                    dateLabel.textContent = cal.l10n.getCalString(
+                        "alarmStarts",
+                        [formatter.formatDateTime(startDate)]
+                    );
                 } else {
                     // If the task has no start date, then format the alarm date.
                     dateLabel.textContent = formatter.formatDateTime(this.mAlarm.alarmDate);
                 }
             } else {
                 throw Components.results.NS_ERROR_ILLEGAL_VALUE;
             }
 
@@ -148,29 +149,32 @@
                 currentDate.second = 0;
                 startDate.second = 0;
 
                 let sinceAlarm = currentDate.subtractDate(startDate).inSeconds;
                 this.mAlarmToday = (sinceAlarm < sinceDayStart) && (sinceAlarm > sinceDayStart - 86400);
 
                 if (this.mAlarmToday) {
                     // The alarm is today
-                    relativeDateString = cal.calGetString("calendar",
-                                                          "alarmTodayAt",
-                                                          [formatter.formatTime(startDate)]);
+                    relativeDateString = cal.l10n.getCalString(
+                        "alarmTodayAt",
+                        [formatter.formatTime(startDate)]
+                    );
                 } else if (sinceAlarm <= sinceDayStart - 86400 && sinceAlarm > sinceDayStart - 172800) {
                     // The alarm is tomorrow
-                    relativeDateString = cal.calGetString("calendar",
-                                                          "alarmTomorrowAt",
-                                                          [formatter.formatTime(startDate)]);
+                    relativeDateString = cal.l10n.getCalString(
+                        "alarmTomorrowAt",
+                        [formatter.formatTime(startDate)]
+                    );
                 } else if (sinceAlarm < sinceDayStart + 86400 && sinceAlarm > sinceDayStart) {
                     // The alarm is yesterday
-                    relativeDateString = cal.calGetString("calendar",
-                                                          "alarmYesterdayAt",
-                                                          [formatter.formatTime(startDate)]);
+                    relativeDateString = cal.l10n.getCalString(
+                        "alarmYesterdayAt",
+                        [formatter.formatTime(startDate)]
+                    );
                 } else {
                     // The alarm is way back
                     relativeDateString = [formatter.formatDateTime(startDate)];
                 }
             } else {
                 // No start or end date, therefore the alarm must be absolute and
                 // have an alarm date.
                 relativeDateString = [formatter.formatDateTime(this.mAlarm.alarmDate)];
@@ -342,28 +346,28 @@
             let unitPopup = document.getAnonymousElementByAttribute(this, "anonid", "snooze-unit-menupopup");
             let unitValue = document.getAnonymousElementByAttribute(this, "anonid", "snooze-value-textbox");
             let okButton = document.getAnonymousElementByAttribute(this, "anonid", "snooze-popup-ok");
 
             function unitName(list) {
                 return { 1: "unitMinutes", 60: "unitHours", 1440: "unitDays" }[list.value] || "unitMinutes";
             }
 
-            let pluralString = cal.calGetString("calendar", unitName(unitList));
+            let pluralString = cal.l10n.getCalString(unitName(unitList));
             let unitPlural = PluralForm.get(unitValue.value, pluralString)
                                        .replace("#1", unitValue.value);
 
             let accessibleString = cal.calGetString("calendar-alarms",
                                                     "reminderSnoozeOkA11y",
                                                     [unitPlural]);
             okButton.setAttribute("aria-label", accessibleString);
 
             let items = unitPopup.getElementsByTagName("xul:menuitem");
             for (let menuItem of items) {
-                pluralString = cal.calGetString("calendar", unitName(menuItem));
+                pluralString = cal.l10n.getCalString(unitName(menuItem));
                 menuItem.label = PluralForm.get(unitValue.value, pluralString)
                                            .replace("#1", "").trim();
             }
         ]]></body>
       </method>
     </implementation>
   </binding>
 </bindings>
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -868,33 +868,35 @@
             let today = new Date();
 
             if (aDate.getFullYear() == (this.mValue || this.mExtraDate).getFullYear()) {
                 calbox.setAttribute("aria-label", cal.calGetString("dateFormat",
                                     "month." + (aDate.getMonth() + 1) + ".name"));
             } else {
                 let monthName = cal.l10n.formatMonth(aDate.getMonth() + 1,
                                                      "calendar", "monthInYear");
-                let label = cal.calGetString("calendar", "monthInYear",
-                                         [monthName, aDate.getFullYear()]);
+                let label = cal.l10n.getCalString(
+                    "monthInYear",
+                    [monthName, aDate.getFullYear()]
+                );
                 calbox.setAttribute("aria-label", label);
             }
 
             this.mDayMap = {};
             let defaultTz = cal.dtz.defaultTimezone;
             let dateFormatter =
                 new Services.intl.DateTimeFormat(undefined, { dateStyle: "long" });
             for (let k = 1; k < 7; k++) {
                 // Set the week number.
                 let firstElement = this._getCalBoxNode(k, 0);
                 setBooleanAttribute(firstElement, "hidden", !this.mShowWeekNumber);
                 if (this.mShowWeekNumber) {
                     let weekNumber = cal.getWeekInfoService()
                                         .getWeekTitle(cal.dtz.jsDateToDateTime(date, defaultTz));
-                    let weekTitle = cal.calGetString("calendar", "WeekTitle", [weekNumber]);
+                    let weekTitle = cal.l10n.getCalString("WeekTitle", [weekNumber]);
                     firstElement.textContent = weekNumber;
                     firstElement.setAttribute("aria-label", weekTitle);
                 }
 
                 for (let i = 1; i < 8; i++) {
                     let day = this._getCalBoxNode(k, i);
                     let ymd = date.getFullYear() + "-" +
                               date.getMonth() + "-" +
@@ -1084,17 +1086,17 @@
       <method name="updateAccessibleLabel">
         <body><![CDATA[
             let label;
             if (this.mValue) {
                 let dateFormatter =
                     new Services.intl.DateTimeFormat(undefined, { dateStyle: "long" });
                 label = dateFormatter.format(this.mValue);
             } else {
-                label = cal.calGetString("calendar", "minimonthNoSelectedDate");
+                label = cal.l10n.getCalString("minimonthNoSelectedDate");
             }
             this.setAttribute("aria-label", label);
         ]]></body>
       </method>
 
       <method name="update">
         <parameter name="aValue"/>
         <body><![CDATA[
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -612,17 +612,17 @@ var calitip = {
                 // There's only one calendar, so it's silly to ask what calendar
                 // the user wants to import into.
                 targetCalendar = calendars[0];
             } else {
                 // Ask what calendar to import into
                 let args = {};
                 args.calendars = calendars;
                 args.onOk = (aCal) => { targetCalendar = aCal; };
-                args.promptText = cal.calGetString("calendar", "importPrompt");
+                args.promptText = cal.l10n.getCalString("importPrompt");
                 aWindow.openDialog("chrome://calendar/content/chooseCalendarDialog.xul",
                                    "_blank", "chrome,titlebar,modal,resizable", args);
             }
 
             if (targetCalendar) {
                 aItipItem.targetCalendar = targetCalendar;
             }
         }
--- a/calendar/base/modules/calPrintUtils.jsm
+++ b/calendar/base/modules/calPrintUtils.jsm
@@ -132,17 +132,17 @@ cal.print = {
         let taskNode = document.getElementById("task-template").cloneNode(true);
         taskNode.removeAttribute("id");
         taskNode.item = item;
 
         let taskListBox = document.getElementById("tasks-list-box");
         if (taskListBox.hasAttribute("hidden")) {
             let tasksTitle = document.getElementById("tasks-title");
             taskListBox.removeAttribute("hidden");
-            tasksTitle.textContent = cal.calGetString("calendar", "tasksWithNoDueDate");
+            tasksTitle.textContent = cal.l10n.getCalString("tasksWithNoDueDate");
         }
 
         // Fill in details of the task
         if (item.isCompleted) {
             taskNode.querySelector(".task-checkbox").setAttribute("checked", "checked");
         }
 
         taskNode.querySelector(".task-title").textContent = item.title;
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -98,17 +98,17 @@ var cal = {
     /**
      * Uses the prompt service to display an error message. Use this sparingly,
      * as it interrupts the user.
      *
      * @param aMsg The message to be shown
      * @param aWindow The window to show the message in, or null for any window.
      */
     showError: function(aMsg, aWindow=null) {
-        Services.prompt.alert(aWindow, cal.calGetString("calendar", "genericErrorTitle"), aMsg);
+        Services.prompt.alert(aWindow, cal.l10n.getCalString("genericErrorTitle"), aMsg);
     },
 
     /**
      * Returns a string describing the current js-stack with filename and line
      * numbers.
      *
      * @param aDepth (optional) The number of frames to include. Defaults to 5.
      * @param aSkip  (optional) Number of frames to skip
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -436,28 +436,28 @@ calAlarm.prototype = {
             comp.addProperty(attachment.icalProperty);
         }
 
         // Set up summary (REQUIRED for EMAIL)
         if (this.summary || this.action == "EMAIL") {
             let summaryProp = icssvc.createIcalProperty("SUMMARY");
             // Summary needs to have a non-empty value
             summaryProp.value = this.summary ||
-                cal.calGetString("calendar", "alarmDefaultSummary");
+                cal.l10n.getCalString("alarmDefaultSummary");
             comp.addProperty(summaryProp);
         }
 
         // Set up the description (REQUIRED for DISPLAY and EMAIL)
         if (this.description ||
             this.action == "DISPLAY" ||
             this.action == "EMAIL") {
             let descriptionProp = icssvc.createIcalProperty("DESCRIPTION");
             // description needs to have a non-empty value
             descriptionProp.value = this.description ||
-                cal.calGetString("calendar", "alarmDefaultDescription");
+                cal.l10n.getCalString("alarmDefaultDescription");
             comp.addProperty(descriptionProp);
         }
 
         // Set up lastAck
         if (this.lastAck) {
             let lastAckProp = icssvc.createIcalProperty("X-MOZ-LASTACK");
             lastAckProp.value = this.lastAck;
             comp.addProperty(lastAckProp);
@@ -656,17 +656,17 @@ calAlarm.prototype = {
                 unit = "unitDays";
                 alarmlen /= 1440;
             } else if (alarmlen % 60 == 0) {
                 unit = "unitHours";
                 alarmlen /= 60;
             } else {
                 unit = "unitMinutes";
             }
-            let localeUnitString = cal.calGetString("calendar", unit);
+            let localeUnitString = cal.l10n.getCalString(unit);
             let unitString = PluralForm.get(alarmlen, localeUnitString)
                                        .replace("#1", alarmlen);
             let originStringName = "reminderCustomOrigin";
 
             // Origin
             switch (this.related) {
                 case ALARM_RELATED_START:
                     originStringName += "Begin";
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -400,19 +400,19 @@ calCalendarManager.prototype = {
     // / DB migration code ends here
     //
 
     alertAndQuit: function() {
         // We want to include the extension name in the error message rather
         // than blaming Thunderbird.
         let hostAppName = cal.calGetString("brand", "brandShortName", null, "branding");
         let calAppName = cal.calGetString("lightning", "brandShortName", null, "lightning");
-        let errorBoxTitle = cal.calGetString("calendar", "tooNewSchemaErrorBoxTitle", [calAppName]);
-        let errorBoxText = cal.calGetString("calendar", "tooNewSchemaErrorBoxTextLightning", [calAppName, hostAppName]);
-        let errorBoxButtonLabel = cal.calGetString("calendar", "tooNewSchemaButtonRestart", [hostAppName]);
+        let errorBoxTitle = cal.l10n.getCalString("tooNewSchemaErrorBoxTitle", [calAppName]);
+        let errorBoxText = cal.l10n.getCalString("tooNewSchemaErrorBoxTextLightning", [calAppName, hostAppName]);
+        let errorBoxButtonLabel = cal.l10n.getCalString("tooNewSchemaButtonRestart", [hostAppName]);
 
         let promptSvc = Services.prompt;
 
         let errorBoxButtonFlags = promptSvc.BUTTON_POS_0 *
                                   promptSvc.BUTTON_TITLE_IS_STRING +
                                   promptSvc.BUTTON_POS_0_DEFAULT;
 
         promptSvc.confirmEx(null,
@@ -455,20 +455,20 @@ calCalendarManager.prototype = {
                 uiMessage = ex.message;
             }
             switch (rc) {
                 case Components.interfaces.calIErrors.STORAGE_UNKNOWN_SCHEMA_ERROR:
                     // For now we alert and quit on schema errors like we've done before:
                     this.alertAndQuit();
                     return null;
                 case Components.interfaces.calIErrors.STORAGE_UNKNOWN_TIMEZONES_ERROR:
-                    uiMessage = cal.calGetString("calendar", "unknownTimezonesError", [uri.spec]);
+                    uiMessage = cal.l10n.getCalString("unknownTimezonesError", [uri.spec]);
                     break;
                 default:
-                    uiMessage = cal.calGetString("calendar", "unableToCreateProvider", [uri.spec]);
+                    uiMessage = cal.l10n.getCalString("unableToCreateProvider", [uri.spec]);
                     break;
             }
             // Log the original exception via error console to provide more debug info
             cal.ERROR(ex);
 
             // Log the possibly translated message via the UI.
             let paramBlock = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
                                        .createInstance(Components.interfaces.nsIDialogParamBlock);
@@ -951,34 +951,34 @@ calMgrCalendarObserver.prototype = {
         switch (aErrNo) {
             case calIErrors.CAL_UTF8_DECODING_FAILED:
                 message = props.GetStringFromName("utf8DecodeError");
                 break;
             case calIErrors.ICS_MALFORMEDDATA:
                 message = props.GetStringFromName("icsMalformedError");
                 break;
             case calIErrors.MODIFICATION_FAILED:
-                errMsg = cal.calGetString("calendar", "errorWriting2", [aCalendar.name]);
-                message = cal.calGetString("calendar", "errorWritingDetails");
+                errMsg = cal.l10n.getCalString("errorWriting2", [aCalendar.name]);
+                message = cal.l10n.getCalString("errorWritingDetails");
                 if (aMessage) {
                     message = aMessage + "\n" + message;
                 }
                 break;
             default:
                 message = aMessage;
         }
 
 
         paramBlock.SetString(0, errMsg);
         paramBlock.SetString(1, errCode);
         paramBlock.SetString(2, message);
 
         this.storedReadOnly = this.calendar.readOnly;
-        let errorCode = cal.calGetString("calendar", "errorCode", [errCode]);
-        let errorDescription = cal.calGetString("calendar", "errorDescription", [message]);
+        let errorCode = cal.l10n.getCalString("errorCode", [errCode]);
+        let errorDescription = cal.l10n.getCalString("errorDescription", [message]);
         let summary = errMsg + " " + errorCode + ". " + errorDescription;
 
         // Log warnings in error console.
         // Report serious errors in both error console and in prompt window.
         if (aErrNo == calIErrors.MODIFICATION_FAILED) {
             Components.utils.reportError(summary);
             this.announceParamBlock(paramBlock);
         } else {
--- a/calendar/base/src/calDateTimeFormatter.js
+++ b/calendar/base/src/calDateTimeFormatter.js
@@ -95,25 +95,25 @@ calDateTimeFormatter.prototype = {
         // TODO should we check for the same day? The caller should know what
         // he is doing...
         return this.formatTime(aStartDate) + "\u2013" + this.formatTime(aEndDate);
     },
 
     formatInterval: function(aStartDate, aEndDate) {
         // Check for tasks without start and/or due date
         if (aEndDate == null && aStartDate == null) {
-            return cal.calGetString("calendar", "datetimeIntervalTaskWithoutDate");
+            return cal.l10n.getCalString("datetimeIntervalTaskWithoutDate");
         } else if (aEndDate == null) {
             let startDateString = this.formatDate(aStartDate);
             let startTime = this.formatTime(aStartDate);
-            return cal.calGetString("calendar", "datetimeIntervalTaskWithoutDueDate", [startDateString, startTime]);
+            return cal.l10n.getCalString("datetimeIntervalTaskWithoutDueDate", [startDateString, startTime]);
         } else if (aStartDate == null) {
             let endDateString = this.formatDate(aEndDate);
             let endTime = this.formatTime(aEndDate);
-            return cal.calGetString("calendar", "datetimeIntervalTaskWithoutStartDate", [endDateString, endTime]);
+            return cal.l10n.getCalString("datetimeIntervalTaskWithoutStartDate", [endDateString, endTime]);
         }
         // Here there are only events or tasks with both start and due date.
         // make sure start and end use the same timezone when formatting intervals:
         let endDate = aEndDate.getInTimezone(aStartDate.timezone);
         let testdate = aStartDate.clone();
         testdate.isDate = true;
         let sameDay = (testdate.compare(endDate) == 0);
         if (aStartDate.isDate) {
@@ -125,51 +125,57 @@ calDateTimeFormatter.prototype = {
                 let startYear = aStartDate.year;
                 let endDay = this.formatDayWithOrdinal(endDate.day);
                 let endYear = endDate.year;
                 if (aStartDate.year != endDate.year) {
                     let startMonthName = cal.l10n.formatMonth(aStartDate.month + 1, "calendar",
                                                               "daysIntervalBetweenYears");
                     let endMonthName = cal.l10n.formatMonth(aEndDate.month + 1, "calendar",
                                                             "daysIntervalBetweenYears");
-                    return cal.calGetString("calendar", "daysIntervalBetweenYears", [startMonthName, startDay, startYear, endMonthName, endDay, endYear]);
+                    return cal.l10n.getCalString("daysIntervalBetweenYears", [
+                        startMonthName, startDay, startYear, endMonthName, endDay, endYear
+                    ]);
                 } else if (aStartDate.month == endDate.month) {
                     let startMonthName = cal.l10n.formatMonth(aStartDate.month + 1, "calendar",
                                                               "daysIntervalInMonth");
-                    return cal.calGetString("calendar", "daysIntervalInMonth", [startMonthName, startDay, endDay, endYear]);
+                    return cal.l10n.getCalString("daysIntervalInMonth", [
+                        startMonthName, startDay, endDay, endYear
+                    ]);
                 } else {
                     let startMonthName = cal.l10n.formatMonth(aStartDate.month + 1, "calendar",
                                                               "daysIntervalBetweenMonths");
                     let endMonthName = cal.l10n.formatMonth(aEndDate.month + 1, "calendar",
                                                             "daysIntervalBetweenMonths");
-                    return cal.calGetString("calendar", "daysIntervalBetweenMonths", [startMonthName, startDay, endMonthName, endDay, endYear]);
+                    return cal.l10n.getCalString("daysIntervalBetweenMonths", [
+                        startMonthName, startDay, endMonthName, endDay, endYear
+                    ]);
                 }
             }
         } else {
             let startDateString = this.formatDate(aStartDate);
             let startTime = this.formatTime(aStartDate);
             let endDateString = this.formatDate(endDate);
             let endTime = this.formatTime(endDate);
             // non-allday, so need to return date and time
             if (sameDay) {
                 // End is on the same day as start, so we can leave out the end date
                 if (startTime == endTime) {
                     // End time is on the same time as start, so we can leave out the end time
                     // "5 Jan 2006 13:00"
-                    return cal.calGetString("calendar", "datetimeIntervalOnSameDateTime", [startDateString, startTime]);
+                    return cal.l10n.getCalString("datetimeIntervalOnSameDateTime", [startDateString, startTime]);
                 } else {
                     // still include end time
                     // "5 Jan 2006 13:00 - 17:00"
-                    return cal.calGetString("calendar", "datetimeIntervalOnSameDay", [startDateString, startTime, endTime]);
+                    return cal.l10n.getCalString("datetimeIntervalOnSameDay", [startDateString, startTime, endTime]);
                 }
             } else {
                 // Spanning multiple days, so need to include date and time
                 // for start and end
                 // "5 Jan 2006 13:00 - 7 Jan 2006 9:00"
-                return cal.calGetString("calendar", "datetimeIntervalOnSeveralDays", [startDateString, startTime, endDateString, endTime]);
+                return cal.l10n.getCalString("datetimeIntervalOnSeveralDays", [startDateString, startTime, endDateString, endTime]);
             }
         }
     },
 
     formatDayWithOrdinal: function(aDay) {
         let ordinalSymbols = this.mDateStringBundle.GetStringFromName("dayOrdinalSymbol").split(",");
         let dayOrdinalSymbol = ordinalSymbols[aDay - 1] || ordinalSymbols[0];
         return aDay + dayOrdinalSymbol;
--- a/calendar/base/src/calIcsParser.js
+++ b/calendar/base/src/calIcsParser.js
@@ -97,18 +97,18 @@ calIcsParser.prototype = {
             }
 
             if (Object.keys(state.tzErrors).length > 0) {
                 // Use an alert rather than a prompt because problems may appear in
                 // remote subscribed calendars the user cannot change.
                 if (Components.classes["@mozilla.org/alerts-service;1"]) {
                     let notifier = Components.classes["@mozilla.org/alerts-service;1"]
                                              .getService(Components.interfaces.nsIAlertsService);
-                    let title = cal.calGetString("calendar", "TimezoneErrorsAlertTitle");
-                    let text = cal.calGetString("calendar", "TimezoneErrorsSeeConsole");
+                    let title = cal.l10n.getCalString("TimezoneErrorsAlertTitle");
+                    let text = cal.l10n.getCalString("TimezoneErrorsSeeConsole");
                     try {
                         notifier.showAlertNotification("", title, text, false, null, null, title);
                     } catch (e) {
                         // The notifier may not be available, e.g. on xpcshell tests
                     }
                 }
             }
 
@@ -262,17 +262,17 @@ parserState.prototype = {
             let hid = item.hashId + "#" + tzid;
             if (!(hid in this.tzErrors)) {
                 // For now, publish errors to console and alert user.
                 // In future, maybe make them available through an interface method
                 // so this UI code can be removed from the parser, and caller can
                 // choose whether to alert, or show user the problem items and ask
                 // for fixes, or something else.
                 let msgArgs = [tzid, item.title, cal.getDateFormatter().formatDateTime(date)];
-                let msg = cal.calGetString("calendar", "unknownTimezoneInItem", msgArgs);
+                let msg = cal.l10n.getCalString("unknownTimezoneInItem", msgArgs);
 
                 cal.ERROR(msg + "\n" + item.icalString);
                 this.tzErrors[hid] = true;
             }
         }
     },
 
     /**
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -128,17 +128,17 @@ calTimezoneService.prototype = {
             this.UTC; // eslint-disable-line no-unused-expressions
             this.floating; // eslint-disable-line no-unused-expressions
         }).then(() => {
             if (aCompleteListener) {
                 aCompleteListener.onResult(null, Components.results.NS_OK);
             }
         }, (error) => {
             // We have to give up. Show an error and fail hard!
-            let msg = cal.calGetString("calendar", "missingCalendarTimezonesError");
+            let msg = cal.l10n.getCalString("missingCalendarTimezonesError");
             cal.ERROR(msg);
             cal.showError(msg);
         });
     },
 
     shutdown: function(aCompleteListener) {
         Services.prefs.removeObserver("calendar.timezone.local", this);
         aCompleteListener.onResult(null, Components.results.NS_OK);
--- a/calendar/import-export/calHtmlExport.js
+++ b/calendar/import-export/calHtmlExport.js
@@ -25,29 +25,29 @@ calHtmlExporter.prototype = {
         contractID: "@mozilla.org/calendar/export;1?type=html",
         classDescription: "Calendar HTML Exporter",
         interfaces: calHtmlExporterInterfaces
     }),
 
     getFileTypes: function(aCount) {
         aCount.value = 1;
         let wildmat = "*.html; *.htm";
-        let label = cal.calGetString("calendar", "filterHtml", [wildmat]);
+        let label = cal.l10n.getCalString("filterHtml", [wildmat]);
         return [{
             QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIFileType]),
             defaultExtension: "html",
             extensionFilter: wildmat,
             description: label
         }];
     },
 
     exportToStream: function(aStream, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calHtmlExport.html");
         let itemContainer = document.getElementById("item-container");
-        document.getElementById("title").textContent = aTitle || cal.calGetString("calendar", "HTMLTitle");
+        document.getElementById("title").textContent = aTitle || cal.l10n.getCalString("HTMLTitle");
 
         // Sort aItems
         aItems.sort((a, b) => {
             let start_a = a[cal.dtz.startDateProp(a)];
             if (!start_a) {
                 return -1;
             }
             let start_b = b[cal.dtz.startDateProp(b)];
@@ -58,48 +58,48 @@ calHtmlExporter.prototype = {
         });
 
         for (let item of aItems) {
             let itemNode = document.getElementById("item-template").cloneNode(true);
             itemNode.removeAttribute("id");
 
             let setupTextRow = function(classKey, propValue, prefixKey) {
                 if (propValue) {
-                    let prefix = cal.calGetString("calendar", prefixKey);
+                    let prefix = cal.l10n.getCalString(prefixKey);
                     itemNode.querySelector("." + classKey + "key").textContent = prefix;
                     itemNode.querySelector("." + classKey).textContent = propValue;
                 } else {
                     let row = itemNode.querySelector("." + classKey + "row");
                     if (row.nextSibling instanceof Components.interfaces.nsIDOMText) {
                         row.nextSibling.remove();
                     }
                     row.remove();
                 }
             };
 
             let startDate = item[cal.dtz.startDateProp(item)];
             let endDate = item[cal.dtz.endDateProp(item)];
             if (startDate || endDate) {
                 // This is a task with a start or due date, format accordingly
-                let prefixWhen = cal.calGetString("calendar", "htmlPrefixWhen");
+                let prefixWhen = cal.l10n.getCalString("htmlPrefixWhen");
                 itemNode.querySelector(".intervalkey").textContent = prefixWhen;
 
                 let startNode = itemNode.querySelector(".dtstart");
                 let dateString = cal.getDateFormatter().formatItemInterval(item);
                 startNode.setAttribute("title", startDate ? startDate.icalString : "none");
                 startNode.textContent = dateString;
             } else {
                 let row = itemNode.querySelector(".intervalrow");
                 row.remove();
                 if (row.nextSibling instanceof Components.interfaces.nsIDOMText) {
                     row.nextSibling.remove();
                 }
             }
 
-            let itemTitle = (item.isCompleted ? cal.calGetString("calendar", "htmlTaskCompleted", [item.title]) : item.title);
+            let itemTitle = (item.isCompleted ? cal.l10n.getCalString("htmlTaskCompleted", [item.title]) : item.title);
             setupTextRow("summary", itemTitle, "htmlPrefixTitle");
 
             setupTextRow("location", item.getProperty("LOCATION"), "htmlPrefixLocation");
             setupTextRow("description", item.getProperty("DESCRIPTION"), "htmlPrefixDescription");
 
             itemContainer.appendChild(itemNode);
         }
 
--- a/calendar/import-export/calIcsImportExport.js
+++ b/calendar/import-export/calIcsImportExport.js
@@ -11,17 +11,17 @@ ChromeUtils.import("resource://calendar/
 
 // Shared functions
 function getIcsFileTypes(aCount) {
     aCount.value = 1;
     return [{
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIFileType]),
         defaultExtension: "ics",
         extensionFilter: "*.ics",
-        description: cal.calGetString("calendar", "filterIcs", ["*.ics"])
+        description: cal.l10n.getCalString("filterIcs", ["*.ics"])
     }];
 }
 
 // Importer
 function calIcsImporter() {
     this.wrappedJSObject = this;
 }
 
--- a/calendar/import-export/calListFormatter.js
+++ b/calendar/import-export/calListFormatter.js
@@ -20,16 +20,16 @@ calListFormatter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calListFormatterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=list",
         classDescription: "Calendar List Print Formatter",
         interfaces: calListFormatterInterfaces
     }),
 
-    get name() { return cal.calGetString("calendar", "formatListName"); },
+    get name() { return cal.l10n.getCalString("formatListName"); },
 
     formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let htmlexporter = Components.classes["@mozilla.org/calendar/export;1?type=htmllist"]
                                      .createInstance(Components.interfaces.calIExporter);
         htmlexporter.exportToStream(aStream, aCount, aItems, aTitle);
     }
 };
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -24,17 +24,17 @@ calMonthPrinter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calMonthPrinterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=monthgrid",
         classDescription: "Calendar Month Grid Print Formatter",
         interfaces: calMonthPrinterInterfaces
     }),
 
-    get name() { return cal.calGetString("calendar", "monthPrinterName"); },
+    get name() { return cal.l10n.getCalString("monthPrinterName"); },
 
     formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calMonthGridPrinter.html");
         let defaultTimezone = cal.dtz.defaultTimezone;
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
@@ -150,17 +150,17 @@ calMonthPrinter.prototype = {
 
         // Clone the template month and make sure it doesn't have an id
         let currentMonth = monthTemplate.cloneNode(true);
         currentMonth.removeAttribute("id");
         currentMonth.item = startOfMonth.clone();
 
         // Set up the month title
         let monthName = cal.l10n.formatMonth(startOfMonth.month + 1, "calendar", "monthInYear");
-        let monthTitle = cal.calGetString("calendar", "monthInYear", [monthName, startOfMonth.year]);
+        let monthTitle = cal.l10n.getCalString("monthInYear", [monthName, startOfMonth.year]);
         currentMonth.querySelector(".month-name").textContent = monthTitle;
 
         // Set up the weekday titles
         let wkst = Preferences.get("calendar.week.start", 0);
         for (let i = 1; i <= 7; i++) {
             let dayNumber = ((i + wkst - 1) % 7) + 1;
             let dayTitle = currentMonth.querySelector(".day" + i + "-title");
             dayTitle.textContent = cal.calGetString("dateFormat", "day." + dayNumber + ".Mmm");
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -74,17 +74,17 @@ var locales = [localeEn, localeNl];
 
 // Windows line endings, CSV files with LF only can't be read by Outlook.
 var exportLineEnding = "\r\n";
 
 // Shared functions
 function getOutlookCsvFileTypes(aCount) {
     aCount.value = 1;
     let wildmat = "*.csv";
-    let label = cal.calGetString("calendar", "filterOutlookCsv", [wildmat]);
+    let label = cal.l10n.getCalString("filterOutlookCsv", [wildmat]);
     return [{
         defaultExtension: "csv",
         extensionFilter: wildmat,
         description: label
     }];
 }
 
 // Importer
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -24,17 +24,17 @@ calWeekPrinter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calWeekPrinterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=weekplan",
         classDescription: "Calendar Week Print Formatter",
         interfaces: calWeekPrinterInterfaces
     }),
 
-    get name() { return cal.calGetString("calendar", "weekPrinterName"); },
+    get name() { return cal.l10n.getCalString("weekPrinterName"); },
 
     formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calWeekPrinter.html");
         let defaultTimezone = cal.dtz.defaultTimezone;
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
@@ -105,17 +105,17 @@ calWeekPrinter.prototype = {
         let currentPage = weekTemplate.cloneNode(true);
         currentPage.removeAttribute("id");
         currentPage.item = startOfWeek.clone();
 
         // Set up the week number title
         let weekInfo = cal.getWeekInfoService();
         let dateFormatter = cal.getDateFormatter();
         let weekno = weekInfo.getWeekTitle(startOfWeek);
-        let weekTitle = cal.calGetString("calendar", "WeekTitle", [weekno]);
+        let weekTitle = cal.l10n.getCalString("WeekTitle", [weekno]);
         currentPage.querySelector(".week-number").textContent = weekTitle;
 
         // Set up the day boxes
         let endOfWeek = weekInfo.getEndOfWeek(startOfWeek);
         for (let currentDate = startOfWeek.clone(); currentDate.compare(endOfWeek) <= 0; currentDate.day++) {
             let weekday = currentDate.weekday;
             let weekdayName = weekdayMap[weekday];
             let dayOffPrefName = "calendar.week.d" + weekday + weekdayName + "soff";
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -80,20 +80,20 @@ var eventDialogCalendarObserver = {
         if (this.isObserving && "calendarItem" in window &&
             window.calendarItem && window.calendarItem.id == aOldItem.id) {
             let doUpdate = true;
 
             // The item has been modified outside the dialog. We only need to
             // prompt if there have been local changes also.
             if (isItemChanged()) {
                 let promptService = Components.interfaces.nsIPromptService;
-                let promptTitle = cal.calGetString("calendar", "modifyConflictPromptTitle");
-                let promptMessage = cal.calGetString("calendar", "modifyConflictPromptMessage");
-                let promptButton1 = cal.calGetString("calendar", "modifyConflictPromptButton1");
-                let promptButton2 = cal.calGetString("calendar", "modifyConflictPromptButton2");
+                let promptTitle = cal.l10n.getCalString("modifyConflictPromptTitle");
+                let promptMessage = cal.l10n.getCalString("modifyConflictPromptMessage");
+                let promptButton1 = cal.l10n.getCalString("modifyConflictPromptButton1");
+                let promptButton2 = cal.l10n.getCalString("modifyConflictPromptButton2");
                 let flags = promptService.BUTTON_TITLE_IS_STRING *
                             promptService.BUTTON_POS_0 +
                             promptService.BUTTON_TITLE_IS_STRING *
                             promptService.BUTTON_POS_1;
 
                 let choice = Services.prompt.confirmEx(window, promptTitle, promptMessage, flags,
                                                        promptButton1, promptButton2, null, null, {});
                 if (!choice) {
@@ -454,24 +454,23 @@ function onCommandCancel() {
 
     if (gInTab && gTabInfoObject) {
         // Switch to the tab that the prompt refers to.
         gTabmail.switchToTab(gTabInfoObject);
     }
 
     let promptService = Components.interfaces.nsIPromptService;
 
-    let promptTitle = cal.calGetString("calendar",
-                                       cal.item.isEvent(window.calendarItem)
-                                          ? "askSaveTitleEvent"
-                                          : "askSaveTitleTask");
-    let promptMessage = cal.calGetString("calendar",
-                                         cal.item.isEvent(window.calendarItem)
-                                            ? "askSaveMessageEvent"
-                                            : "askSaveMessageTask");
+    let promptTitle = cal.l10n.getCalString(
+        cal.item.isEvent(window.calendarItem) ? "askSaveTitleEvent" : "askSaveTitleTask"
+    );
+    let promptMessage = cal.l10n.getCalString(
+        cal.item.isEvent(window.calendarItem) ? "askSaveMessageEvent" : "askSaveMessageTask"
+    );
+
 
     let flags = promptService.BUTTON_TITLE_SAVE *
                 promptService.BUTTON_POS_0 +
                 promptService.BUTTON_TITLE_CANCEL *
                 promptService.BUTTON_POS_1 +
                 promptService.BUTTON_TITLE_DONT_SAVE *
                 promptService.BUTTON_POS_2;
 
@@ -864,21 +863,21 @@ function updateCategoryMenulist() {
     setBooleanAttribute("item-categories", "hidden", (maxCount === 0));
     setBooleanAttribute("item-categories-label", "hidden", (maxCount === 0));
     setBooleanAttribute("item-calendar-label", "hidden", (maxCount === 0));
     setBooleanAttribute("item-calendar-aux-label", "hidden", (maxCount !== 0));
 
     let label;
     let categoryList = categoryPanel.categories;
     if (categoryList.length > 1) {
-        label = cal.calGetString("calendar", "multipleCategories");
+        label = cal.l10n.getCalString("multipleCategories");
     } else if (categoryList.length == 1) {
         label = categoryList[0];
     } else {
-        label = cal.calGetString("calendar", "None");
+        label = cal.l10n.getCalString("None");
     }
     categoryMenulist.setAttribute("label", label);
 }
 
 /**
  * Saves the selected categories into the passed item
  *
  * @param aItem     The item to set the categories on
@@ -1070,17 +1069,17 @@ function dateTimeControls2State(aStartDa
     let stringWarning = "";
     if (!aStartDatepicker && gStartTime && gEndTime) {
         if (gEndTime.compare(gStartTime) >= 0) {
             gItemDuration = gEndTime.subtractDate(gStartTime);
         } else {
             gStartTime = saveStartTime;
             gEndTime = saveEndTime;
             warning = true;
-            stringWarning = cal.calGetString("calendar", "warningEndBeforeStart");
+            stringWarning = cal.l10n.getCalString("warningEndBeforeStart");
         }
     }
 
     let startChanged = false;
     if (gStartTime && saveStartTime) {
         startChanged = gStartTime.compare(saveStartTime) != 0;
     }
     // Preset the date in the until-datepicker's minimonth to the new start
@@ -1109,17 +1108,17 @@ function dateTimeControls2State(aStartDa
             // recurrence string is going to be changed by updateDateTime() below.
             let notCustomRule = document.getElementById("repeat-deck").selectedIndex == 0;
             if (notCustomRule) {
                 setElementValue("repeat-until-datepicker",
                                 cal.dtz.dateTimeToJsDate(gUntilDate.getInTimezone(cal.dtz.floating)));
             }
 
             warning = true;
-            stringWarning = cal.calGetString("calendar", "warningUntilDateBeforeStart");
+            stringWarning = cal.l10n.getCalString("warningUntilDateBeforeStart");
         }
     }
 
     updateDateTime();
     updateTimezone();
     updateAccept();
 
     if (warning) {
@@ -1539,18 +1538,17 @@ function updateTitle() {
     let strName;
     if (cal.item.isEvent(window.calendarItem)) {
         strName = (window.mode == "new" ? "newEventDialog" : "editEventDialog");
     } else if (cal.item.isToDo(window.calendarItem)) {
         strName = (window.mode == "new" ? "newTaskDialog" : "editTaskDialog");
     } else {
         throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
     }
-    let newTitle = cal.calGetString("calendar", strName) + ": " +
-                      getElementValue("item-title");
+    let newTitle = cal.l10n.getCalString(strName) + ": " + getElementValue("item-title");
     sendMessage({ command: "updateTitle", argument: newTitle });
 }
 
 /**
  * Update the disabled status of the accept button. The button is enabled if all
  * parts of the dialog have options selected that make sense.
  * constraining factors like
  */
@@ -3027,21 +3025,21 @@ function onCommandSave(aIsClosing) {
  */
 function onCommandDeleteItem() {
     // only ask for confirmation, if the User changed anything on a new item or we modify an existing item
     if (isItemChanged() || window.mode != "new") {
         let promptTitle = "";
         let promptMessage = "";
 
         if (cal.item.isEvent(window.calendarItem)) {
-            promptTitle = cal.calGetString("calendar", "deleteEventLabel");
-            promptMessage = cal.calGetString("calendar", "deleteEventMessage");
+            promptTitle = cal.l10n.getCalString("deleteEventLabel");
+            promptMessage = cal.l10n.getCalString("deleteEventMessage");
         } else if (cal.item.isToDo(window.calendarItem)) {
-            promptTitle = cal.calGetString("calendar", "deleteTaskLabel");
-            promptMessage = cal.calGetString("calendar", "deleteTaskMessage");
+            promptTitle = cal.l10n.getCalString("deleteTaskLabel");
+            promptMessage = cal.l10n.getCalString("deleteTaskMessage");
         }
 
         let answerDelete = Services.prompt.confirm(
                                     null,
                                     promptTitle,
                                     promptMessage);
         if (!answerDelete) {
             return;
@@ -3538,24 +3536,32 @@ function updateAttendees() {
             let text = cell.querySelector("label:nth-of-type(1)");
 
             let role = organizer.role || "REQ-PARTICIPANT";
             let userType = organizer.userType || "INDIVIDUAL";
             let partStat = organizer.participationStatus || "NEEDS-ACTION";
 
             let orgName = (organizer.commonName && organizer.commonName.length)
                           ? organizer.commonName : organizer.toString();
-            let userTypeString = cal.calGetString("calendar", "dialog.tooltip.attendeeUserType2." + userType,
-                                            [organizer.toString()]);
-            let roleString = cal.calGetString("calendar", "dialog.tooltip.attendeeRole2." + role,
-                                              [userTypeString]);
-            let partStatString = cal.calGetString("calendar", "dialog.tooltip.attendeePartStat2." + partStat,
-                                            [orgName]);
-            let tooltip = cal.calGetString("calendar", "dialog.tooltip.attendee.combined",
-                                           [roleString, partStatString]);
+            let userTypeString = cal.l10n.getCalString(
+                "dialog.tooltip.attendeeUserType2." + userType,
+                [organizer.toString()]
+            );
+            let roleString = cal.l10n.getCalString(
+                "dialog.tooltip.attendeeRole2." + role,
+                [userTypeString]
+            );
+            let partStatString = cal.l10n.getCalString(
+                "dialog.tooltip.attendeePartStat2." + partStat,
+                [orgName]
+            );
+            let tooltip = cal.l10n.getCalString(
+                "dialog.tooltip.attendee.combined",
+                [roleString, partStatString]
+            );
 
             text.setAttribute("value", orgName);
             cell.setAttribute("tooltiptext", tooltip);
             icon.setAttribute("partstat", partStat);
             icon.setAttribute("usertype", userType);
             icon.setAttribute("role", role);
         } else {
             setBooleanAttribute("item-organizer-row", "collapsed", true);
@@ -3858,17 +3864,17 @@ function checkUntilDate() {
         let callback = function() {
             // Disable the "Save" and "Save and Close" commands as long as the
             // warning dialog is showed.
             enableAcceptCommand(false);
 
             Services.prompt.alert(
                 null,
                 document.title,
-                cal.calGetString("calendar", "warningUntilDateBeforeStart"));
+                cal.l10n.getCalString("warningUntilDateBeforeStart"));
             enableAcceptCommand(true);
             gWarning = false;
         };
         setTimeout(callback, 1);
     } else {
         // Valid date: set the time equal to start date time.
         gUntilDate = untilDate;
         updateUntildateRecRule();
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -210,17 +210,17 @@ var calendarItemTabType = {
         if (aTab.mode.type == "calendarEvent") {
             strName = aArgs.calendarEvent.title ? "editEventDialog" : "newEventDialog";
         } else if (aTab.mode.type == "calendarTask") {
             strName = aArgs.calendarEvent.title ? "editTaskDialog" : "newTaskDialog";
         } else {
             throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
         }
         // name is "New Event", "Edit Task", etc.
-        let name = cal.calGetString("calendar", strName);
+        let name = cal.l10n.getCalString(strName);
         aTab.title = name + ": " + (aArgs.calendarEvent.title || name);
 
         // allowTabClose prevents the tab from being closed until we ask
         // the user if they want to save any unsaved changes.
         aTab.allowTabClose = false;
 
         // Put the arguments where they can be accessed easily
         // from the iframe. (window.arguments[0])
@@ -524,17 +524,17 @@ function ltnIntegrationCheck() {
     // don't do anything if the opt-out pref doesn't exist or is enabled by the user or the user has
     // already decided to keep Lightning
     if (!Preferences.get(kOptOut, true) && Preferences.get(kNotify, false)) {
         // action is only needed, if hasn't used Lightning before, so lets check whether this looks
         // like a default calendar setup
         let cnt = {};
         let calMgr = cal.getCalendarManager();
         let cals = calMgr.getCalendars(cnt);
-        let homeCalName = cal.calGetString("calendar", "homeCalendarName", null, "calendar");
+        let homeCalName = cal.l10n.getCalString("homeCalendarName");
         if (cnt.value == 1 &&
             calMgr.getCalendarPref_(cals[0], "type") == "storage" &&
             calMgr.getCalendarPref_(cals[0], "name") == homeCalName) {
             // this looks like a default setup, so let's see whether the calendar contains any items
             let pCal = cal.async.promisifyCalendar(cals[0]);
             // we look at all items at any time, but we can stop if the first item was found
             // if we've found no items, we call ltnIntegrationNotification to display the bar
             pCal.getItems(Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS, 1, null, null)
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -150,17 +150,17 @@ calDavCalendar.prototype = {
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() {
         return null;
     },
 
     get displayName() {
-        return cal.calGetString("calendar", "caldavName");
+        return cal.l10n.getCalString("caldavName");
     },
 
     createCalendar: function() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function(cal, listener) {
         throw NS_ERROR_NOT_IMPLEMENTED;
@@ -1722,20 +1722,20 @@ calDavCalendar.prototype = {
 
             if ((isText || request.URI.spec != request.originalURI.spec) &&
                 self.mLastRedirectStatus == 301) {
                 // The initial PROPFIND essentially goes against the calendar
                 // collection url. If a 301 Moved Permanently redirect occurred
                 // here, we want to modify the url we use in the future.
                 let nIPS = Components.interfaces.nsIPromptService;
 
-                let promptTitle = cal.calGetString("calendar", "caldavRedirectTitle", [self.name]);
-                let promptText = cal.calGetString("calendar", "caldavRedirectText", [self.name]) +
+                let promptTitle = cal.l10n.getCalString("caldavRedirectTitle", [self.name]);
+                let promptText = cal.l10n.getCalString("caldavRedirectText", [self.name]) +
                                  "\n\n" + request.URI.spec;
-                let button1Title = cal.calGetString("calendar", "caldavRedirectDisableCalendar");
+                let button1Title = cal.l10n.getCalString("caldavRedirectDisableCalendar");
                 let flags = (nIPS.BUTTON_TITLE_YES * nIPS.BUTTON_POS_0) +
                             (nIPS.BUTTON_TITLE_IS_STRING * nIPS.BUTTON_POS_1);
 
                 let res = Services.prompt.confirmEx(cal.window.getCalendarWindow(),
                                                     promptTitle, promptText,
                                                     flags, null, button1Title,
                                                     null, null, {});
 
@@ -2338,17 +2338,17 @@ calDavCalendar.prototype = {
         let message = mapError[aErrNo];
         let localizedMessage;
         let modificationError = mapModification[aErrNo];
 
         if (!message) {
             // Only notify if there is a message for this error
             return;
         }
-        localizedMessage = cal.calGetString("calendar", message, [this.mUri.spec]);
+        localizedMessage = cal.l10n.getCalString(message, [this.mUri.spec]);
         this.mReadOnly = true;
         this.mDisabled = true;
         this.notifyError(aErrNo, localizedMessage);
         this.notifyError(modificationError
                          ? Components.interfaces.calIErrors.MODIFICATION_FAILED
                          : Components.interfaces.calIErrors.READ_FAILED,
                          this.buildDetailedMessage(status, extraInfo));
     },
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -96,17 +96,17 @@ calCompositeCalendar.prototype = {
         classDescription: "Composite Calendar Provider",
         interfaces: calCompositeCalendarInterfaces,
     }),
 
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() { return null; },
-    get displayName() { return cal.calGetString("calendar", "compositeName"); },
+    get displayName() { return cal.l10n.getCalString("compositeName"); },
 
     createCalendar: function() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function(calendar, listener) {
         // You shouldn't be able to delete from the composite calendar.
         throw NS_ERROR_NOT_IMPLEMENTED;
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -76,17 +76,17 @@ calICSCalendar.prototype = {
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() {
         return null;
     },
 
     get displayName() {
-        return cal.calGetString("calendar", "icsName");
+        return cal.l10n.getCalString("icsName");
     },
 
     createCalendar: function() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function(cal, listener) {
         throw NS_ERROR_NOT_IMPLEMENTED;
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -53,17 +53,17 @@ calMemoryCalendar.prototype = {
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() {
         return null;
     },
 
     get displayName() {
-        return cal.calGetString("calendar", "memoryName");
+        return cal.l10n.getCalString("memoryName");
     },
 
     createCalendar: function() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function(calendar, listener) {
         calendar = calendar.wrappedJSObject;
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -57,17 +57,17 @@ calStorageCalendar.prototype = {
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() {
         return null;
     },
 
     get displayName() {
-        return cal.calGetString("calendar", "storageName");
+        return cal.l10n.getCalString("storageName");
     },
 
     createCalendar: function() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function(aCalendar, listener) {
         aCalendar = aCalendar.wrappedJSObject;
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -56,42 +56,42 @@
       <field name="mDayNames">[]</field>
       <field name="mRelationWords">[]</field>
       <field name="mMonthLongNames">[]</field>
       <field name="mMonthShortNames">[]</field>
 
       <constructor><![CDATA[
           ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
           let goButton = document.getAnonymousElementByAttribute(this, "anonid", "date-go-button");
-          goButton.setAttribute("label", cal.calGetString("calendar", "go"));
+          goButton.setAttribute("label", cal.l10n.getCalString("go"));
           // Load the stuff we're going to use to parse written dates
           this.mRelativeDates = [
-              { word: cal.calGetString("calendar", "today").toLowerCase(), offset: 0 },
-              { word: cal.calGetString("calendar", "yesterday").toLowerCase(), offset: -1 },
-              { word: cal.calGetString("calendar", "tomorrow").toLowerCase(), offset: 1 }];
+              { word: cal.l10n.getCalString("today").toLowerCase(), offset: 0 },
+              { word: cal.l10n.getCalString("yesterday").toLowerCase(), offset: -1 },
+              { word: cal.l10n.getCalString("tomorrow").toLowerCase(), offset: 1 }];
           for (let i = 1; i <= 7; i++) {
               this.mDayNames.push(cal.calGetString("dateFormat", "day." + i + ".name").toLowerCase());
           }
 
           for (let i = 1; i <= 12; i++) {
               this.mMonthLongNames.push(cal.calGetString("dateFormat", "month." + i + ".name").toLowerCase());
               this.mMonthShortNames.push(cal.calGetString("dateFormat", "month." + i + ".Mmm").toLowerCase());
           }
 
           // note that some languages have different conjugations of
           // next/last depending on the day
           this.mRelationWords = [
-              { word: cal.calGetString("calendar", "last1"), offset: -1 },
-              { word: cal.calGetString("calendar", "last2"), offset: -1 },
-              { word: cal.calGetString("calendar", "next1"), offset: 0 },
-              { word: cal.calGetString("calendar", "next2"), offset: 0 }];
+              { word: cal.l10n.getCalString("last1"), offset: -1 },
+              { word: cal.l10n.getCalString("last2"), offset: -1 },
+              { word: cal.l10n.getCalString("next1"), offset: 0 },
+              { word: cal.l10n.getCalString("next2"), offset: 0 }];
 
           // Set the value to today
           let text = document.getAnonymousElementByAttribute(this, "anonid", "date-textbox");
-          text.value = cal.calGetString("calendar", "today");
+          text.value = cal.l10n.getCalString("today");
       ]]></constructor>
 
       <property name="value">
         <getter><![CDATA[
             return this.mValue;
         ]]></getter>
         <setter><![CDATA[
             let text = document.getAnonymousElementByAttribute(this, "anonid", "date-textbox");
--- a/calendar/resources/content/mouseoverPreviews.js
+++ b/calendar/resources/content/mouseoverPreviews.js
@@ -80,44 +80,44 @@ function getPreviewForItem(aItem, aIsToo
  *
  * @param   {calIEvent} aEvent The event
  * @returns {String}           The string for the status property of the event
  */
 function getEventStatusString(aEvent) {
     switch (aEvent.status) {
         // Event status value keywords are specified in RFC2445sec4.8.1.11
         case "TENTATIVE":
-            return cal.calGetString("calendar", "statusTentative");
+            return cal.l10n.getCalString("statusTentative");
         case "CONFIRMED":
-            return cal.calGetString("calendar", "statusConfirmed");
+            return cal.l10n.getCalString("statusConfirmed");
         case "CANCELLED":
-            return cal.calGetString("calendar", "eventStatusCancelled");
+            return cal.l10n.getCalString("eventStatusCancelled");
         default:
             return "";
     }
 }
 
 /**
  * PUBLIC: Returns the string for status (none), NeedsAction, InProcess,
  * Cancelled, orCompleted for a given ToDo
  *
  * @param   {calIToDo} aToDo   The ToDo
  * @returns {String}           The string for the status property of the event
  */
 function getToDoStatusString(aToDo) {
     switch (aToDo.status) {
         // Todo status keywords are specified in RFC2445sec4.8.1.11
         case "NEEDS-ACTION":
-            return cal.calGetString("calendar", "statusNeedsAction");
+            return cal.l10n.getCalString("statusNeedsAction");
         case "IN-PROCESS":
-            return cal.calGetString("calendar", "statusInProcess");
+            return cal.l10n.getCalString("statusInProcess");
         case "CANCELLED":
-            return cal.calGetString("calendar", "todoStatusCancelled");
+            return cal.l10n.getCalString("todoStatusCancelled");
         case "COMPLETED":
-            return cal.calGetString("calendar", "statusCompleted");
+            return cal.l10n.getCalString("statusCompleted");
         default:
             return "";
     }
 }
 
 /**
  * PRIVATE: Called when a user hovers over a todo element and the text for the
  * mouse overis changed.
@@ -168,21 +168,21 @@ function getPreviewForTask(toDoItem, aIs
         }
 
         if (toDoItem.priority && toDoItem.priority != 0) {
             let priorityInteger = parseInt(toDoItem.priority, 10);
             let priorityString;
 
             // These cut-offs should match calendar-event-dialog.js
             if (priorityInteger >= 1 && priorityInteger <= 4) {
-                priorityString = cal.calGetString("calendar", "highPriority"); // high priority
+                priorityString = cal.l10n.getCalString("highPriority");
             } else if (priorityInteger == 5) {
-                priorityString = cal.calGetString("calendar", "normalPriority"); // normal priority
+                priorityString = cal.l10n.getCalString("normalPriority");
             } else {
-                priorityString = cal.calGetString("calendar", "lowPriority"); // low priority
+                priorityString = cal.l10n.getCalString("lowPriority");
             }
             boxAppendLabeledText(vbox, "tooltipPriority", priorityString);
             hasHeader = true;
         }
 
         if (toDoItem.status && toDoItem.status != "NONE") {
             let status = getToDoStatusString(toDoItem);
             boxAppendLabeledText(vbox, "tooltipStatus", status);
@@ -370,17 +370,17 @@ function boxInitializeHeaderGrid(box) {
  * PRIVATE: To headers grid, append a row containing Label: value, where label
  * is localized text for labelProperty.
  *
  * @param box               box containing headers grid
  * @param labelProperty     name of property for localized name of header
  * @param textString        value of header field.
  */
 function boxAppendLabeledText(box, labelProperty, textString) {
-    let labelText = cal.calGetString("calendar", labelProperty);
+    let labelText = cal.l10n.getCalString(labelProperty);
     let rows = box.getElementsByTagNameNS(box.namespaceURI, "rows")[0];
     let row = document.createElement("row");
 
     row.appendChild(createTooltipHeaderLabel(labelText));
     row.appendChild(createTooltipHeaderDescription(textString));
 
     rows.appendChild(row);
 }
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -50,17 +50,17 @@ function publishEntireCalendar(aCalendar
             aCalendar = calendars[0];
         } else {
             // Ask user to select the calendar that should be published.
             // publishEntireCalendar() will be called again if OK is pressed
             // in the dialog and the selected calendar will be passed in.
             // Therefore return after openDialog().
             let args = {};
             args.onOk = publishEntireCalendar;
-            args.promptText = cal.calGetString("calendar", "publishPrompt");
+            args.promptText = cal.l10n.getCalString("publishPrompt");
             openDialog("chrome://calendar/content/chooseCalendarDialog.xul",
                        "_blank", "chrome,titlebar,modal,resizable", args);
             return;
         }
     }
 
     let args = {};
     let publishObject = {};
@@ -172,19 +172,18 @@ function publishItemArray(aItemArray, aP
 
     inputStream = storageStream.newInputStream(0);
 
     uploadChannel.setUploadStream(inputStream,
                                   "text/calendar", -1);
     try {
         channel.asyncOpen(publishingListener, aProgressDialog);
     } catch (e) {
-        let props = Services.strings.createBundle("chrome://calendar/locale/calendar.properties");
-        Services.prompt.alert(null, cal.calGetString("calendar", "genericErrorTitle"),
-                              props.formatStringFromName("otherPutError", [e.message], 1));
+        Services.prompt.alert(null, cal.l10n.getCalString("genericErrorTitle"),
+                              cal.l10n.getCalString("otherPutError", [e.message]));
     }
 }
 
 
 var notificationCallbacks = {
     // nsIInterfaceRequestor interface
     getInterface: function(iid, instance) {
         if (iid.equals(Components.interfaces.nsIAuthPrompt)) {
@@ -202,30 +201,31 @@ var publishingListener = {
 
     onStartRequest: function(request, ctxt) {
     },
 
     onStopRequest: function(request, ctxt, status, errorMsg) {
         ctxt.wrappedJSObject.onStopUpload();
 
         let channel;
-        let props = Services.strings.createBundle("chrome://calendar/locale/calendar.properties");
         let requestSucceeded;
         try {
             channel = request.QueryInterface(Components.interfaces.nsIHttpChannel);
             requestSucceeded = channel.requestSucceeded;
         } catch (e) {
             // Don't fail if it is not a http channel, will be handled below
         }
 
         if (channel && !requestSucceeded) {
-            Services.prompt.alert(null, cal.calGetString("calendar", "genericErrorTitle"),
-                                  props.formatStringFromName("httpPutError", [channel.responseStatus, channel.responseStatusText], 2));
+            let body = cal.l10n.getCalString("httpPutError", [
+                channel.responseStatus, channel.responseStatusText
+            ]);
+            Services.prompt.alert(null, cal.l10n.getCalString("genericErrorTitle"), body);
         } else if (!channel && !Components.isSuccessCode(request.status)) {
             // XXX this should be made human-readable.
-            Services.prompt.alert(null, cal.calGetString("calendar", "genericErrorTitle"),
-                                  props.formatStringFromName("otherPutError", [request.status.toString(16)], 1));
+            let body = cal.l10n.getCalString("otherPutError", [request.status.toString(16)]);
+            Services.prompt.alert(null, cal.l10n.getCalString("genericErrorTitle"), body);
         }
     },
 
     onDataAvailable: function(request, ctxt, inStream, sourceOffset, count) {
     }
 };
--- a/calendar/test/mozmill/testAlarmDefaultValue.js
+++ b/calendar/test/mozmill/testAlarmDefaultValue.js
@@ -26,17 +26,17 @@ function setupModule(module) {
         openLightningPrefs,
         menulistSelect
     } = collector.getModule("calendar-utils"));
     collector.getModule("calendar-utils").setupModule();
     Object.assign(module, helpersForController(controller));
 }
 
 function testDefaultAlarms() {
-    let localeUnitString = cal.calGetString("calendar", "unitDays");
+    let localeUnitString = cal.l10n.getCalString("unitDays");
     let unitString = PluralForm.get(DEFVALUE, localeUnitString).replace("#1", DEFVALUE);
     let alarmString = (...args) => cal.calGetString("calendar-alarms", ...args);
     let originStringEvent = alarmString("reminderCustomOriginBeginBeforeEvent");
     let originStringTask = alarmString("reminderCustomOriginBeginBeforeTask");
     let expectedEventReminder = alarmString("reminderCustomTitle", [unitString, originStringEvent]);
     let expectedTaskReminder = alarmString("reminderCustomTitle", [unitString, originStringTask]);
 
     // Configure the lightning preferences