Bug 1480919 - fix typos in calendar/providers, resources, test using codespell. rs=typo-fix,comment-only
authorJorg K <jorgk@jorgk.com>
Sat, 23 Mar 2019 12:10:39 +0100
changeset 26154 d1aa51f98737
parent 26153 86ba7b238f93
child 26155 54ab7596b8e8
push id15699
push usermozilla@jorgk.com
push dateSat, 23 Mar 2019 11:27:17 +0000
treeherdercomm-central@d1aa51f98737 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstypo-fix, comment-only
bugs1480919
Bug 1480919 - fix typos in calendar/providers, resources, test using codespell. rs=typo-fix,comment-only
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/gdata/components/calGoogleCalendar.js
calendar/providers/gdata/content/gdata-calendar-creation.js
calendar/providers/gdata/content/gdata-migration.js
calendar/providers/gdata/modules/gdataRequest.jsm
calendar/providers/gdata/modules/gdataSession.jsm
calendar/providers/gdata/modules/gdataUtils.jsm
calendar/providers/ics/calICSCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendar.js
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapSession.js
calendar/resources/content/mouseoverPreviews.js
calendar/resources/content/publish.js
calendar/test/calendars/l10n-rrule-details.ics
calendar/test/mozmill/testTodayPane.js
calendar/test/mozmill/views/testTaskView.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_hashedarray.js
calendar/test/unit/test_providers.js
calendar/test/unit/test_timezone_definition.js
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -270,17 +270,17 @@ calDavCalendar.prototype = {
                         };
                         self.mHrefIndex[self.mLocationPath + path] = item.id;
                         refreshNeeded = true;
                     }
                 }
             },
             onOperationComplete: function(aCalendar, aStatus, aOpType, aId, aDetail) {
                 if (refreshNeeded) {
-                    // reseting the cached ctag forces an item refresh when
+                    // resetting the cached ctag forces an item refresh when
                     // safeRefresh is called later
                     self.mCtag = null;
                     self.mProposedCtag = null;
                 }
             }
         };
         this.mOfflineStorage.getItems(Ci.calICalendar.ITEM_FILTER_ALL_ITEMS,
                                       0, null, null, getMetaListener);
@@ -339,17 +339,17 @@ calDavCalendar.prototype = {
             let error = false;
             try {
                 let wwwauth = request.getResponseHeader("WWW-Authenticate");
                 if (wwwauth.startsWith("Bearer") && wwwauth.includes("error=")) {
                     // An OAuth error occurred, we need to reauthenticate.
                     error = true;
                 }
             } catch (e) {
-                // This happens in case the response header is missing, thats fine.
+                // This happens in case the response header is missing, that's fine.
             }
 
             if (self.oauth && error) {
                 self.oauth.accessToken = null;
                 self.sendHttpRequest(...origArgs);
             } else {
                 let nextArguments = Array.from(arguments).slice(1);
                 nextMethod(...nextArguments);
@@ -1612,17 +1612,17 @@ calDavCalendar.prototype = {
                 Object.defineProperty(this.oauth, "refreshToken", {
                     get: function() {
                         if (!this.mRefreshToken) {
                             let pass = { value: null };
                             try {
                                 let origin = "oauth:" + sessionId;
                                 cal.auth.passwordManagerGet(sessionId, pass, origin, pwMgrId);
                             } catch (e) {
-                                // User might have cancelled the master password prompt, thats ok
+                                // User might have cancelled the master password prompt, that's ok
                                 if (e.result != Cr.NS_ERROR_ABORT) {
                                     throw e;
                                 }
                             }
                             this.mRefreshToken = pass.value;
                         }
                         return this.mRefreshToken;
                     },
@@ -2255,17 +2255,17 @@ calDavCalendar.prototype = {
                 }
             } else {
                 // We have everything, complete.
                 self.completeCheckServerInfo(aChangeLogListener);
             }
         };
         this.sendHttpRequest(requestUri, queryXml, MIME_TEXT_XML, null, (channel) => {
             if (queryDepth == 0) {
-                // Set header, doing this for Depth: 1 is not needed since thats the
+                // Set header, doing this for Depth: 1 is not needed since that's the
                 // default.
                 channel.setRequestHeader("Depth", "0", false);
             }
             channel.requestMethod = queryMethod;
             return streamListener;
         }, () => {
             this.completeCheckServerInfo(aChangeLogListener, Cr.NS_ERROR_NOT_AVAILABLE);
         });
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -375,17 +375,17 @@ webDavSyncHandler.prototype = {
             // server error (i.e 50x).
             httpchannel.contentType = "application/xml";
             this._reader.onStartRequest(request);
         } else if (this.calendar.mWebdavSyncToken != null &&
                    responseStatus >= 400 &&
                    responseStatus <= 499) {
             // Invalidate sync token with 4xx errors that could indicate the
             // sync token has become invalid and do a refresh
-            cal.LOG("CalDAV: Reseting sync token because server returned status code: " + responseStatus);
+            cal.LOG("CalDAV: Resetting sync token because server returned status code: " + responseStatus);
             this._reader = null;
             this.calendar.mWebdavSyncToken = null;
             this.calendar.saveCalendarProperties();
             this.calendar.safeRefresh(this.changeLogListener);
         } else {
             cal.WARN("CalDAV: Error doing webdav sync: " + responseStatus);
             this.calendar.reportDavError(Ci.calIErrors.DAV_REPORT_ERROR);
             if (this.calendar.isCached && this.changeLogListener) {
--- a/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -445,17 +445,17 @@ calGoogleCalendar.prototype = {
         let request = new calGoogleRequest();
         (async () => {
             request.type = request.MODIFY;
             request.calendar = this;
             if (cal.item.isEvent(aNewItem)) {
                 let googleId = getGoogleId(aNewItem, this.offlineStorage);
                 request.uri = this.createEventsURI("events", googleId);
 
-                // Updating invitations often causes a forbidden error becase
+                // Updating invitations often causes a forbidden error because
                 // some parts are not writable. Using PATCH ignores anything
                 // that isn't allowed.
                 if (cal.itip.isInvitation(aNewItem)) {
                     request.type = request.PATCH;
                 }
 
                 if (Services.prefs.getBoolPref("calendar.google.sendEventNotifications", false)) {
                     request.addQueryParameter("sendNotifications", "true");
--- a/calendar/providers/gdata/content/gdata-calendar-creation.js
+++ b/calendar/providers/gdata/content/gdata-calendar-creation.js
@@ -39,17 +39,17 @@ var { monkeyPatch } = ChromeUtils.import
     let previousUriValue = null;
     function selectProvider(type) {
         let isGdata = (type == "gdata");
         let curi = document.getElementById("calendar-uri");
 
         curi.parentNode.style.visibility = (isGdata ? "hidden" : "visible");
         document.getElementById("cache").parentNode.style.visibility = (isGdata ? "hidden" : "visible");
 
-        // Move the next step descrition to the right place
+        // Move the next step description to the right place
         let locationRows = document.querySelector("#calendar-wizard > [pageid='locationPage'] > grid > rows");
         let nextStepDescr = document.getElementById("gdata-nextstep-description");
         locationRows.appendChild(nextStepDescr);
 
         if (isGdata) {
             pageorder("locationPage", "gdata-session", "gdata-calendars", "finishPage");
             previousUriValue = curi.value;
             curi.value = "googleapi://unknown";
--- a/calendar/providers/gdata/content/gdata-migration.js
+++ b/calendar/providers/gdata/content/gdata-migration.js
@@ -64,17 +64,17 @@ function getMigratableCalendars() {
     return cal.getCalendarManager().getCalendars({}).filter(isMigratable);
 }
 
 /**
  * Load Handler for both the wizard and the Thunderbird main window.
  */
 function gdata_migration_loader() {
     if (document.documentElement.id == "gdata-migration-wizard") {
-        // This is the migration wizard, load the calendars neeeded.
+        // This is the migration wizard, load the calendars needed.
         let listbox = document.getElementById("calendars-listbox");
 
         for (let calendar of sortCalendarArray(getMigratableCalendars())) {
             let item = document.createElement("checkbox");
             item.setAttribute("label", calendar.name);
             item.setAttribute("value", calendar.id);
             item.calendar = calendar;
             listbox.appendChild(item);
--- a/calendar/providers/gdata/modules/gdataRequest.jsm
+++ b/calendar/providers/gdata/modules/gdataRequest.jsm
@@ -116,17 +116,17 @@ calGoogleRequest.prototype = {
                 this.mLoader.request.cancel(aStatus);
             }
             this.mStatus = aStatus;
         }
     },
 
     /**
      * attribute type
-     * The type of this reqest. Must be one of
+     * The type of this request. Must be one of
      * GET, ADD, MODIFY, DELETE
      */
     get type() { return this.method; },
 
     set type(val) {
         let valid = [this.GET, this.ADD, this.MODIFY, this.PATCH, this.DELETE];
         if (!valid.includes(val)) {
             throw new Components.Exception("Invalid request type: " + val,
--- a/calendar/providers/gdata/modules/gdataSession.jsm
+++ b/calendar/providers/gdata/modules/gdataSession.jsm
@@ -161,17 +161,17 @@ calGoogleSession.prototype = {
         Object.defineProperty(this.oauth, "refreshToken", {
             get: function() {
                 if (!this.mRefreshToken) {
                     let pass = { value: null };
                     try {
                         let origin = "oauth:" + sessionId;
                         cal.auth.passwordManagerGet(sessionId, pass, origin, pwMgrId);
                     } catch (e) {
-                        // User might have cancelled the master password prompt, thats ok
+                        // User might have cancelled the master password prompt, that's ok
                         if (e.result != Cr.NS_ERROR_ABORT) {
                             throw e;
                         }
                     }
                     this.mRefreshToken = pass.value;
                 }
                 return this.mRefreshToken;
             },
--- a/calendar/providers/gdata/modules/gdataUtils.jsm
+++ b/calendar/providers/gdata/modules/gdataUtils.jsm
@@ -28,17 +28,17 @@ var EXPORTED_SYMBOLS = [
     "checkResolveConflict", "getGoogleId",
     "getItemMetadata", "saveItemMetadata",
     "deleteItemMetadata", "migrateItemMetadata",
     "JSONToAlarm", "dateToJSON", "JSONToDate",
     "getProviderString", "monkeyPatch", "spinEventLoop"
 ];
 
 /**
- * Retrives the Google ID associated with this event. This is either a simple
+ * Retrieves the Google ID associated with this event. This is either a simple
  * id or the id in combination with the recurrence id.
  *
  * @param aItem             The Item to get the id for.
  * @param aOfflineStorage   The offline storage that holds the metadata for this item.
  */
 function getGoogleId(aItem, aOfflineStorage) {
     let meta = getItemMetadata(aOfflineStorage, aItem) ||
                getItemMetadata(aOfflineStorage, aItem.parentItem);
@@ -440,17 +440,17 @@ function EventToJSON(aItem, aOfflineStor
     // XXX While Google now supports multiple alarms and alarm values, we still
     // need to fix bug 353492 first so we can better take care of finding out
     // what alarm is used for snoozing.
 
     // gd:extendedProperty (snooze time)
     let itemSnoozeTime = aItem.getProperty("X-MOZ-SNOOZE-TIME");
     let icalSnoozeTime = null;
     if (itemSnoozeTime) {
-        // The propery is saved as a string, translate back to calIDateTime.
+        // The property is saved as a string, translate back to calIDateTime.
         icalSnoozeTime = cal.createDateTime();
         icalSnoozeTime.icalString = itemSnoozeTime;
     }
     addExtendedProperty("X-MOZ-SNOOZE-TIME", cal.dtz.toRFC3339(icalSnoozeTime), true);
 
     // gd:extendedProperty (snooze recurring alarms)
     let snoozeValue = "";
     if (aItem.recurrenceInfo) {
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -382,17 +382,17 @@ calICSCalendar.prototype = {
                                       0, null, null, listener);
     },
 
     // nsIStreamListener impl
     // For after publishing. Do error checks here
     onStartRequest: function(request) {},
     onDataAvailable: function(request, inStream, sourceOffset, count) {
         // All data must be consumed. For an upload channel, there is
-        // no meaningfull data. So it gets read and then ignored
+        // no meaningful data. So it gets read and then ignored
         let scriptableInputStream = Cc["@mozilla.org/scriptableinputstream;1"]
                                       .createInstance(Ci.nsIScriptableInputStream);
         scriptableInputStream.init(inStream);
         scriptableInputStream.read(-1);
     },
     onStopRequest: function(request, status, errorMsg) {
         let httpChannel;
         let requestSucceeded = false;
@@ -980,17 +980,17 @@ httpHooks.prototype = {
         try {
             this.mEtag = httpchannel.getResponseHeader("ETag");
             aRespFunc();
         } catch (e) {
             // There was no ETag header on the response. This means that
             // putting is not atomic. This is bad. Race conditions can happen,
             // because there is a time in which we don't know the right
             // etag.
-            // Try to do the best we can, by immediatly getting the etag.
+            // Try to do the best we can, by immediately getting the etag.
 
             let etagListener = {};
             let self = this; // need to reference in callback
 
             etagListener.onStreamComplete = function(aLoader, aContext, aStatus, aResultLength, aResult) {
                 let multistatus;
                 try {
                     let str = new TextDecoder().decode(Uint8Array.from(aResult));
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -265,17 +265,17 @@ calStorageCalendar.prototype = {
             this.mDB = localDB;
             upgradeDB(this.mDB);
 
 
             // Afterwards, we have to migrate the moz-profile-calendars to the
             // new moz-storage-calendar schema. This is needed due to bug 479867
             // and its regression bug 561735. The first calendar created before
             // v19 already has a moz-profile-calendar:// uri without an ?id=
-            // parameter (the id in the databse is 0). We need to migrate this
+            // parameter (the id in the database is 0). We need to migrate this
             // special calendar differently.
 
             // WARNING: This is a somewhat fragile process. Great care should be
             // taken during future schema upgrades to make sure this still
             // works.
             this.mDB.beginTransaction();
             try {
                 /**
@@ -332,17 +332,17 @@ calStorageCalendar.prototype = {
                     if (pos == -1) {
                         this.mDB.rollbackTransaction();
                     } else {
                         cal.LOG("[calStorageCalendar] Migrating numeric cal_id to uuid");
                         id = parseInt(path.substr(pos + 4), 10);
                         migrateTables(this.mDB, this.id, id);
 
                         // Now remove the id from the uri to make sure we don't do this
-                        // again. Remeber the id, so we can recover in case something
+                        // again. Remember the id, so we can recover in case something
                         // goes wrong.
                         this.setProperty("uri", "moz-storage-calendar://");
                         this.setProperty("old_calendar_id", id);
 
                         this.mDB.commitTransaction();
                     }
                 }
             } catch (exc) {
@@ -385,17 +385,17 @@ calStorageCalendar.prototype = {
             this.logError("prepareStatement exception", e);
         }
     },
 
     /**
      * Executes a statement using an item as a parameter.
      *
      * @param aStmt         The statement to execute.
-     * @param aIdParam      The name of the parameter refering to the item id.
+     * @param aIdParam      The name of the parameter referring to the item id.
      * @param aId           The id of the item.
      */
     executeItemStatement: function(aStmt, aIdParam, aId) {
         try {
             aStmt.params.cal_id = this.id;
             aStmt.params[aIdParam] = aId;
             aStmt.executeStep();
         } catch (e) {
@@ -711,17 +711,17 @@ calStorageCalendar.prototype = {
             this.notifyOperationComplete(aListener,
                                          Cr.NS_OK,
                                          Ci.calIOperationListener.GET,
                                          null,
                                          null);
             return;
         }
 
-        // HACK because recurring offline events/todos objects dont have offline_journal information
+        // HACK because recurring offline events/todos objects don't have offline_journal information
         // Hence we need to update the mRecEventCacheOfflineFlags and  mRecTodoCacheOfflineFlags hash-tables
         // It can be an expensive operation but is only used in Online Reconciliation mode
         if (wantOfflineCreatedItems | wantOfflineDeletedItems | wantOfflineModifiedItems) {
             this.mRecItemCacheInited = false;
         }
 
         this.assureRecurringItemCaches();
 
@@ -763,17 +763,17 @@ calStorageCalendar.prototype = {
             }
         }
 
         // helper function to handle converting a row to an item,
         // expanding occurrences, and queue the items for the listener
         function handleResultItem(item, theIID, optionalFilterFunc) {
             let expandedItems = [];
             if (item.recurrenceInfo && asOccurrences) {
-                // If the item is recurring, get all ocurrences that fall in
+                // If the item is recurring, get all occurrences that fall in
                 // the range. If the item doesn't fall into the range at all,
                 // this expands to 0 items.
                 expandedItems = item.recurrenceInfo.getOccurrences(aRangeStart, aRangeEnd, 0, {});
                 if (wantUnrespondedInvitations) {
                     expandedItems = expandedItems.filter(checkUnrespondedInvitation);
                 }
             } else if ((!wantUnrespondedInvitations || checkUnrespondedInvitation(item)) &&
                        cal.item.checkIfInRange(item, aRangeStart, aRangeEnd)) {
@@ -2397,17 +2397,17 @@ calStorageCalendar.prototype = {
             this.logError("Error getting all metadata!", e);
         } finally {
             query.reset();
         }
     },
     /**
      * Internal logging function that should be called on any database error,
      * it will log as much info as possible about the database context and
-     * last statement so the problem can be investigated more easilly.
+     * last statement so the problem can be investigated more easily.
      *
      * @param message           Error message to log.
      * @param exception         Exception that caused the error.
      */
     logError: function(message, exception) {
         let logMessage = "Message: " + message;
         if (this.mDB) {
             if (this.mDB.connectionReady) {
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -20,17 +20,17 @@
  * upgraders is then called (down to v1). The first upgrader (v1/v2) provides
  * the basic table data object. Each further upgrader then updates this object
  * to correspond with the database tables and columns. No actual database calls
  * are made until the first upgrader with a higher version than the current
  * database version is called. When this version is arrived, both the table data
  * object and the database are updated. This process continues until the
  * database is at the latest version.
  *
- * Note that your upgrader is not neccessarily called with a database object,
+ * Note that your upgrader is not necessarily called with a database object,
  * for example if the user's database is already at a higher version. In this
  * case your upgrader is called to compile the table data object. To make
  * calling code easier, there are a bunch of helper functions below that can be
  * called with a null database object and only call the database object if it is
  * not null. If you need to call new functions on the database object, check out
  * the createDBDelegate function below.
  *
  * When adding new tables to the table data object, please note that there is a
@@ -458,17 +458,17 @@ function addColumn(tblData, tblName, col
                          "  ADD COLUMN " + colName + " " + colType);
 }
 
 /**
  * Deletes columns from the given table.
  *
  * @param tblData       The table data object to apply the operation on.
  * @param tblName       The table name to delete on
- * @param colNameArray  An array of colum names to delete
+ * @param colNameArray  An array of column names to delete
  * @param db            (optional) The database to apply the operation on
  */
 function deleteColumns(tblData, tblName, colNameArray, db) {
     for (let colName of colNameArray) {
         delete tblData[tblName][colName];
     }
 
     let columns = Object.keys(tblData[tblName]);
@@ -509,17 +509,17 @@ function copyTable(tblData, tblName, new
                          ";");
 }
 
 /**
  * Alter the type of a certain column
  *
  * @param tblData       The table data object to apply the operation on.
  * @param tblName       The table name to alter
- * @param colNameArray  An array of colum names to delete
+ * @param colNameArray  An array of column names to delete
  * @param newType       The new type of the column
  * @param db            (optional) The database to apply the operation on
  */
 function alterTypes(tblData, tblName, colNameArray, newType, db) {
     for (let colName of colNameArray) {
         tblData[tblName][colName] = newType;
     }
 
@@ -1427,17 +1427,17 @@ upgrade.v21 = function(db, version) {
             // Repeat these two statements until the update affects 0 rows
             // (because the dates field on all x-datesets is empty)
             do {
                 insertStmt.execute();
                 updateStmt.execute();
             } while (db.affectedRows > 0);
 
             // Finally we can delete the x-dateset rows. Note this will leave
-            // gaps in recur_index, but thats ok since its only used for
+            // gaps in recur_index, but that's ok since its only used for
             // ordering anyway and will be overwritten on the next item write.
             executeSimpleSQL(db, 'DELETE FROM cal_recurrence WHERE recur_type = "x-dateset"');
         }
 
         setDbVersionAndCommit(db, 21);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
--- a/calendar/providers/wcap/calWcapCalendar.js
+++ b/calendar/providers/wcap/calWcapCalendar.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from calWcapCalendarModule.js */
 
 var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
- * The calendar provider class for WCAP calendars. Usually instanciated through
+ * The calendar provider class for WCAP calendars. Usually instantiated through
  * the calendar manager, but may also be created by the wcap session, hence the
  * following optional parameters.
  *
  * @param session       (optional) The calWcapSession for this calendar
  * @param calProps      (optional) The XML node containing the WCAP calendar properties
  */
 function calWcapCalendar(session, calProps) {
     this.initProviderBase();
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -1140,17 +1140,17 @@ calWcapCalendar.prototype.getItems = fun
 
     if (this.aboutToBeUnregistered) {
         // limiting the amount of network traffic while unregistering
         log("being unregistered, no results.", this);
         request.execRespFunc(null, []);
         return request;
     }
 
-    // m_cachedResults holds the last data revtrieval. This is expecially useful when
+    // m_cachedResults holds the last data retrieval. This is especially useful when
     // switching on multiple subcriptions: the composite calendar multiplexes getItems()
     // calls to all composited calendars over and over again, most often on the same
     // date range (as the user usually looks at the same view).
     // This will most likely vanish when a better caching is implemented in the views,
     // or WCAP local storage caching has sufficient performance.
     // The cached results will be invalidated after 2 minutes to reflect incoming invitations.
     if (CACHE_LAST_RESULTS > 0 && this.m_cachedResults) {
         for (let entry of this.m_cachedResults) {
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -404,17 +404,17 @@ calWcapSession.prototype = {
         this.m_credentials = null;
 
         if (url) {
             issueNetworkRequest(request,
                                 (err, str) => {
                                     if (err) {
                                         throw err;
                                     }
-                                    stringToXml(this, str, -1 /* logout successfull */);
+                                    stringToXml(this, str, -1 /* logout successful */);
                                 }, url);
         } else {
             request.execRespFunc();
         }
         return request;
     },
 
     checkServerVersion: function(request, respFunc) {
--- a/calendar/resources/content/mouseoverPreviews.js
+++ b/calendar/resources/content/mouseoverPreviews.js
@@ -415,17 +415,17 @@ function createTooltipHeaderDescription(
 
 /**
  * PRIVATE: If now is during an occurrence, return the occurrence. If now is
  * before an occurrence, return the next occurrence or otherwise the previous
  * occurrence.
  *
  * @param   {calIEvent}  calendarEvent   The text to display in the node
  * @returns {mixed}                      Returns a calIDateTime for the detected
- *                                        occurence or calIEvent, if this is a
+ *                                        occurrence or calIEvent, if this is a
  *                                        non-recurring event
  */
 function getCurrentNextOrPreviousRecurrence(calendarEvent) {
     if (!calendarEvent.recurrenceInfo) {
         return calendarEvent;
     }
 
     let dur = calendarEvent.duration.clone();
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -33,17 +33,17 @@ function publishCalendarDataDialogRespon
     publishItemArray(currentView().getSelectedItems({}),
                      CalendarPublishObject.remotePath, aProgressDialog);
 }
 
 /**
  * publishEntireCalendar
  * Show publish dialog, ask for URL and publish all items from the calendar.
  *
- * @param aCalendar   (optional) The calendar that will be published. If ommitted
+ * @param aCalendar   (optional) The calendar that will be published. If omitted
  *                               the user will be prompted to select a calendar.
  */
 function publishEntireCalendar(aCalendar) {
     if (!aCalendar) {
         let count = {};
         let calendars = cal.getCalendarManager().getCalendars(count);
 
         if (count.value == 1) {
--- a/calendar/test/calendars/l10n-rrule-details.ics
+++ b/calendar/test/calendars/l10n-rrule-details.ics
@@ -284,17 +284,17 @@ DTSTART:20090122T220000Z
 DTEND:20090122T230000Z
 RRULE:FREQ=YEARLY;INTERVAL=3
 SUMMARY:yearlyNthOn,Interval=3
 END:VEVENT
 BEGIN:VEVENT
 UID:#######################FURTHER STRINGS################
 DTSTART;VALUE=DATE:20090123
 DTEND;VALUE=DATE:20090123
-SUMMARY:Futher Strings
+SUMMARY:Further Strings
 END:VEVENT
 BEGIN:VEVENT
 UID:repeatCountAllDay-1
 DTSTART;VALUE=DATE:20090123
 DTEND;VALUE=DATE:20090123
 RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=1
 SUMMARY:repeatCountAllDay-1
 END:VEVENT
--- a/calendar/test/mozmill/testTodayPane.js
+++ b/calendar/test/mozmill/testTodayPane.js
@@ -50,17 +50,17 @@ function testTodayPane() {
     };
 
     // Go to today and verify date.
     let dayPath = `${DAY_VIEW}/${LABELDAYBOX}/{"flex":"1"}`;
     controller.waitThenClick(lookup(TODAY_BUTTON));
     controller.assert(() => lookup(dayPath).getNode().mDate.icalString == getIsoDate());
 
     // Create event 6 hours from now, if this is tomorrow then at 23 today.
-    // Doubleclick only triggers new event dialog on visible boxes, so scrolling
+    // Double-click only triggers new event dialog on visible boxes, so scrolling
     // may be needed by default visible time is 08:00 - 17:00, box of 17th hour
     // is out of view.
     let hour = (new Date()).getHours();
     let startHour = (hour < 18 ? hour + 6 : 23);
     let view = lookup(DAY_VIEW).getNode();
 
     if (startHour < 8 || startHour > 16) {
         view.scrollToMinute(60 * startHour);
--- a/calendar/test/mozmill/views/testTaskView.js
+++ b/calendar/test/mozmill/views/testTaskView.js
@@ -76,17 +76,17 @@ function testTaskView() {
 
     // Verify added.
     controller.waitFor(() => taskTreeNode.mTaskArray.length == 1, "Added Task did not appear");
 
     // Last added task is automatically selected so verify detail window data.
     controller.assertJSProperty(eid("calendar-task-details-title"), "textContent", TITLE);
 
     // Open added task
-    // Doubleclick on completion checkbox is ignored as opening action, so don't
+    // Double-click on completion checkbox is ignored as opening action, so don't
     // click at immediate left where the checkbox is located.
     controller.doubleClick(lookup(treeChildren), 50, 0);
     invokeEventDialog(controller, null, (task, iframe) => {
         let { eid: taskid } = helpersForController(task);
         let { eid: iframeId } = helpersForController(iframe);
 
         // Verify calendar.
         controller.assertValue(iframeId("item-calendar"), CALENDARNAME);
--- a/calendar/test/unit/test_calmgr.js
+++ b/calendar/test/unit/test_calmgr.js
@@ -26,17 +26,17 @@ add_test(function test_registration() {
         unregistered = false;
         deleted = false;
     }
 
     // Initially there should be no calendars
     let calmgr = cal.getCalendarManager();
     checkCalendarCount(0, 0, 0);
 
-    // Create a local memory calendar, ths shouldn't register any calendars
+    // Create a local memory calendar, this shouldn't register any calendars
     let memory = calmgr.createCalendar("memory", Services.io.newURI("moz-memory-calendar://"));
     checkCalendarCount(0, 0, 0);
 
     // Register an observer to test it.
     let registered = false, unregistered = false, deleted = false, readOnly = false;
     let mgrobs = cal.createAdapter(Ci.calICalendarManagerObserver, {
         onCalendarRegistered: function(aCalendar) {
             if (aCalendar.id == memory.id) {
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.js
@@ -1626,17 +1626,17 @@ add_task(async function test_conflict_de
         summary: "New Event",
         creator: gServer.creator,
         organizer: gServer.creator,
         start: { dateTime: "2006-06-10T18:00:00+02:00" },
         end: { dateTime: "2006-06-10T20:00:00+02:00" },
         iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com"
     };
 
-    // Load intial event to server
+    // Load initial event to server
     gServer.events = [coreEvent];
     let client = await gServer.getClient();
     let pclient = cal.async.promisifyCalendar(client.wrappedJSObject);
     let item = (await pclient.getAllItems())[0];
 
     // Case #1: Deleted on server, modify locally, overwrite conflict
     MockConflictPrompt.overwrite = true;
     gServer.events = [];
--- a/calendar/test/unit/test_hashedarray.js
+++ b/calendar/test/unit/test_hashedarray.js
@@ -66,17 +66,17 @@ function checkConsistancy(har, testItems
 /**
  * Man, this function is really hard to keep general enough, I'm almost tempted
  * to duplicate the code. It checks if the remove and modify operations work for
  * the given hashed array.
  *
  * @param har               The Hashed Array
  * @param testItems         The js array with the items
  * @param postprocessFunc   (optional) The function to call after each
- *                            operation, but before checking consistancy.
+ *                            operation, but before checking consistency.
  * @param itemAccessor      (optional) The function to access the item for an
  *                            array element.
  * @param itemCreator       (optional) Function to create a new item for the
  *                            array.
  */
 function testRemoveModify(har, testItems, postprocessFunc, itemAccessor, itemCreator) {
     postprocessFunc = postprocessFunc || function(a, b) { return [a, b]; };
     itemCreator = itemCreator || (title => hashedCreateItem(title));
--- a/calendar/test/unit/test_providers.js
+++ b/calendar/test/unit/test_providers.js
@@ -58,17 +58,17 @@ var icalStringArray = [
     "DTEND;VALUE=DATE:20020402\n" +
     "END:VEVENT\n",
     // 12: daily recurring allday event. parent item in the range.
     "BEGIN:VEVENT\n" +
     "DTSTART;VALUE=DATE:20020402\n" +
     "DTEND;VALUE=DATE:20020403\n" +
     "RRULE:FREQ=DAILY;INTERVAL=1;COUNT=10\n" +
     "END:VEVENT\n",
-    // 13: daily recurring allday event. First occurence in the range.
+    // 13: daily recurring allday event. First occurrence in the range.
     "BEGIN:VEVENT\n" +
     "DTSTART;VALUE=DATE:20020401\n" +
     "DTEND;VALUE=DATE:20020402\n" +
     "RRULE:FREQ=DAILY;COUNT=10\n" +
     "END:VEVENT\n",
     // 14: two-daily recurring allday event. Not in the range.
     "BEGIN:VEVENT\n" +
     "DTSTART;VALUE=DATE:20020401\n" +
--- a/calendar/test/unit/test_timezone_definition.js
+++ b/calendar/test/unit/test_timezone_definition.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 /**
- * Checks whether the pased string is a valid tz version number
+ * Checks whether the passed string is a valid tz version number
  * @param    {String}         aVersionString
  * @returns  {boolean}
  */
 function valid_tz_version(aVersionString) {
     return aVersionString.match(/^2\.(\d{4})(z*[a-z])$/);
 }
 
 // check tz database version