Bug 1399756 - fix typos in chat/ using codespell. r=florian
authorJorg K <jorgk@jorgk.com>
Tue, 20 Mar 2018 05:21:00 +0100
changeset 23667 2e84d388d2c6fcd28b0dd03152fcf6945713c502
parent 23666 7097d0227a274671c31dc3aebee7401119bca232
child 23668 8c3f6e867732eab5fea190c46fd76013b28314d5
push id14283
push usermozilla@jorgk.com
push dateFri, 06 Apr 2018 17:30:34 +0000
treeherdercomm-central@2e84d388d2c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1399756
Bug 1399756 - fix typos in chat/ using codespell. r=florian [skip-blame]
chat/components/src/imAccounts.js
chat/components/src/imContacts.js
chat/components/src/test/test_commands.js
chat/content/convbrowser.xml
chat/locales/en-US/twitter.properties
chat/modules/imContentSink.jsm
chat/modules/imSmileys.jsm
chat/protocols/irc/ircCommands.jsm
chat/protocols/irc/ircDCC.jsm
chat/protocols/irc/ircISUPPORT.jsm
chat/protocols/irc/ircNonStandard.jsm
chat/protocols/irc/ircUtils.jsm
chat/protocols/skype/skype.js
chat/protocols/twitter/twitter.js
chat/protocols/xmpp/xmpp-authmechs.jsm
chat/protocols/xmpp/xmpp.jsm
--- a/chat/components/src/imAccounts.js
+++ b/chat/components/src/imAccounts.js
@@ -369,17 +369,17 @@ imAccount.prototype = {
   _reconnectTimer: null,
   _startReconnectTimer: function() {
     if (Services.io.offline) {
       Cu.reportError("_startReconnectTimer called while offline");
       return;
     }
 
     /* If the last successful connection is older than 10 seconds, reset the
-       number of reconnection attemps. */
+       number of reconnection attempts. */
     const kTimeBeforeSuccessfulConnection = 10;
     if (this.timeOfLastConnect &&
         this.timeOfLastConnect + kTimeBeforeSuccessfulConnection * 1000 < Date.now()) {
       delete this.reconnectAttempt;
       delete this.timeOfLastConnect;
     }
 
     let timers =
--- a/chat/components/src/imContacts.js
+++ b/chat/components/src/imContacts.js
@@ -87,17 +87,17 @@ function getDBConnection()
     "CREATE INDEX IF NOT EXISTS account_buddy_buddyindex " +
       "ON account_buddy (buddy_id)"
   ].forEach(conn.executeSimpleSQL);
 
   return conn;
 }
 
 // Wrap all the usage of DBConn inside a transaction that will be
-// commited automatically at the end of the event loop spin so that
+// committed automatically at the end of the event loop spin so that
 // we flush buddy list data to disk only once per event loop spin.
 var gDBConnWithPendingTransaction = null;
 Object.defineProperty(this, "DBConn", {
   configurable: true,
   enumerable: true,
 
   get() {
     if (gDBConnWithPendingTransaction)
@@ -1510,17 +1510,17 @@ ContactsService.prototype = {
       DBConn.createStatement("DELETE FROM accounts WHERE id = :accountId");
     try {
       statement.params.accountId = aId;
       statement.execute();
     } finally {
       statement.finalize();
     }
 
-    // removing the account from the accounts table is not enought,
+    // removing the account from the accounts table is not enough,
     // we need to remove all the associated account_buddy entries too
     statement = DBConn.createStatement("DELETE FROM account_buddy " +
                                        "WHERE account_id = :accountId");
     try {
       statement.params.accountId = aId;
       statement.execute();
     } finally {
       statement.finalize();
--- a/chat/components/src/test/test_commands.js
+++ b/chat/components/src/test/test_commands.js
@@ -68,17 +68,17 @@ function run_test() {
 
   // We test an array of different possible conversations.
   // cmdlist lists all the available commands for the given conversation.
   // results is an array which for each testCmd provides an array containing
   // data with which the return value of _findCommands can be checked. In
   // particular, the name of the command and whether the first (i.e. preferred)
   // entry in the returned array of commands is a prpl command. (If the latter
   // boolean is not given, false is assumed, if the name is not given, that
-  // corresponds to no commmands being returned.)
+  // corresponds to no commands being returned.)
   let testData = [
     {
       desc: "No conversation argument.",
       cmdlist: "away, back, busy, dnd, help, offline, raw, say",
       results: [[], [], ["back"], [], ["back"], ["help"], ["help"], ["offline"], ["offline"]]
     },
     {
       desc: "Disconnected conversation with fakeAccount.",
--- a/chat/content/convbrowser.xml
+++ b/chat/content/convbrowser.xml
@@ -765,17 +765,17 @@
         </body>
       </method>
 
       <method name="browserScroll">
         <parameter name="event"/>
         <body>
           <![CDATA[
             if (this._scrollingIntoView) {
-              // We have explicitely requested a scrollIntoView, ignore the event
+              // We have explicitly requested a scrollIntoView, ignore the event.
               this._scrollingIntoView = false;
               this._lastScrollHeight = this.scrollHeight;
               this._lastScrollWidth = this.scrollWidth;
               return;
             }
 
             if (!("_lastScrollHeight" in this) ||
                 this._lastScrollHeight != this.scrollHeight ||
--- a/chat/locales/en-US/twitter.properties
+++ b/chat/locales/en-US/twitter.properties
@@ -12,18 +12,18 @@ error.tooLong=Status is over 140 charact
 # LOCALIZATION NOTE (error.general, error.retweet, error.delete):
 #   %1$S will be either the error string returned by the twitter server,
 #   in English, inside parenthesis, or the empty string if we have no specific
 #   message for the error.
 #   %2$S is the message that caused the error.
 error.general=An error %1$S occurred while sending: %2$S
 error.retweet=An error %1$S occurred while retweeting: %2$S
 error.delete=An error %1$S occurred while deleting: %2$S
-error.like=An error %1$S occured while liking: %2$S
-error.unlike=An error %1$S occured while unliking: %2$S
+error.like=An error %1$S occurred while liking: %2$S
+error.unlike=An error %1$S occurred while unliking: %2$S
 # LOCALIZATION NOTE (error.descriptionTooLong)
 #   %S is the truncated string that was sent to the server.
 error.descriptionTooLong=Description is over the maximum length (160 characters), it was automatically truncated to: %S.
 
 # LOCALIZATION NOTE (timeline):
 #   This is the title of the conversation tab, %S will be replaced by
 #   @<username>.
 timeline=%S timeline
--- a/chat/modules/imContentSink.jsm
+++ b/chat/modules/imContentSink.jsm
@@ -6,17 +6,17 @@ ChromeUtils.import("resource:///modules/
 
 this.EXPORTED_SYMBOLS = [
   "cleanupImMarkup", // used to clean up incoming IMs.
                      // This will use the global ruleset of acceptable stuff
                      // except if another (custom one) is provided
   "createDerivedRuleset", // used to create a ruleset that inherits from the
                           // default one
                           // useful if you want to allow or forbid
-                          // an additionnal thing in a specific
+                          // an additional thing in a specific
                           // conversation but take into account all
                           // the other global settings.
   "addGlobalAllowedTag",
   "removeGlobalAllowedTag",
   "addGlobalAllowedAttribute",
   "removeGlobalAllowedAttribute",
   "addGlobalAllowedStyleRule",
   "removeGlobalAllowedStyleRule"
@@ -271,17 +271,17 @@ function cleanupNode(aNode, aRules, aTex
       }
 
       // we are going to keep this child node, clean up its children
       cleanupNode(node, aRules, aTextModifiers);
 
       // cleanup attributes
       let attrs = node.attributes;
       let acceptFunction = function(aAttrRules, aAttr) {
-        // an attribute is always accepted if its rule is true, or conditionnaly
+        // an attribute is always accepted if its rule is true, or conditionally
         // accepted if its rule is a function that evaluates to true
         // if its rule does not exist, it is refused
           let localName = aAttr.localName;
           let rule = localName in aAttrRules && aAttrRules[localName];
           return (rule === true ||
                   (typeof rule == "function" && rule(aAttr.value)));
       };
       for (let j = 0; j < attrs.length; ++j) {
--- a/chat/modules/imSmileys.jsm
+++ b/chat/modules/imSmileys.jsm
@@ -11,17 +11,17 @@ XPCOMUtils.defineLazyGetter(this, "gText
 
 ChromeUtils.defineModuleGetter(this, "NetUtil",
                                "resource://gre/modules/NetUtil.jsm");
 
 this.EXPORTED_SYMBOLS = [
   "smileImMarkup", // used to add smile:// img tags into IM markup.
   "smileTextNode", // used to add smile:// img tags to the content of a textnode
   "smileString", // used to add smile:// img tags into a string without parsing it as HTML. Be sure the string doesn't contain HTML tags.
-  "getSmileRealURI", // used to retrive the chrome URI for a smile:// URI
+  "getSmileRealURI", // used to retrieve the chrome URI for a smile:// URI
   "getSmileyList" // used to display a list of smileys in the UI
 ];
 
 var kEmoticonsThemePref = "messenger.options.emoticonsTheme";
 var kThemeFile = "theme.js";
 
 Object.defineProperty(this, "gTheme", {
   configurable: true,
--- a/chat/protocols/irc/ircCommands.jsm
+++ b/chat/protocols/irc/ircCommands.jsm
@@ -140,17 +140,17 @@ function simpleCommand(aConv, aCommand, 
   if (!aParams || !aParams.length)
     getAccount(aConv).sendMessage(aCommand);
   else
     getAccount(aConv).sendMessage(aCommand, aParams);
   return true;
 }
 
 // Sends a CTCP message to aTarget using the CTCP command aCommand and aMsg as
-// a CTCP paramter.
+// a CTCP parameter.
 function ctcpCommand(aConv, aTarget, aCommand, aParams) {
   return getAccount(aConv).sendCTCPMessage(aTarget, false, aCommand, aParams);
 }
 
 // Replace the command name in the help string so translators do not attempt to
 // translate it.
 var commands = [
   {
--- a/chat/protocols/irc/ircDCC.jsm
+++ b/chat/protocols/irc/ircDCC.jsm
@@ -24,17 +24,17 @@ function DCCMessage(aMessage, aAccount) 
   if (params.length < 4) {
     aAccount.ERROR("Not enough DCC parameters:\n" + JSON.stringify(aMessage));
     return null;
   }
 
   try {
     // Address, port and size should be treated as unsigned long, unsigned short
     // and unsigned long, respectively. The protocol is designed to handle
-    // further arguements, if necessary.
+    // further arguments, if necessary.
     message.ctcp.dcc = {
       type: params[0],
       argument: params[1],
       address: Number(params[2]),
       port: Number(params[3]),
       size: params.length == 5 ? Number(params[4]) : null,
       furtherArguments: params.length > 5 ? params.slice(5) : []
     };
--- a/chat/protocols/irc/ircISUPPORT.jsm
+++ b/chat/protocols/irc/ircISUPPORT.jsm
@@ -22,17 +22,17 @@ ChromeUtils.import("resource:///modules/
  *   <parameter>=<value> or -<value>
  * The isupport field is added to the message and it has the following fields:
  *   parameter  What is being configured by this ISUPPORT token.
  *   useDefault Whether this parameter should be reset to the default value, as
  *              defined by the RFC.
  *   value      The new value for the parameter.
  */
 function isupportMessage(aMessage) {
-  // Seperate the ISUPPORT parameters.
+  // Separate the ISUPPORT parameters.
   let tokens = aMessage.params.slice(1, -1);
 
   let message = aMessage;
   message.isupport = {};
 
   return tokens.map(function(aToken) {
     let newMessage = JSON.parse(JSON.stringify(message));
     newMessage.isupport.useDefault = aToken[0] == "-";
--- a/chat/protocols/irc/ircNonStandard.jsm
+++ b/chat/protocols/irc/ircNonStandard.jsm
@@ -63,17 +63,17 @@ var ircNonStandard = {
                                _("connection.error.passwordRequired"));
         }
 
         // All done for ZNC.
         return true;
       }
 
       // Some servers, e.g. irc.umich.edu, use NOTICE during connection
-      // negotation to give directions to users, these MUST be shown to the
+      // negotiation to give directions to users, these MUST be shown to the
       // user. If the message starts with ***, we assume it is probably an AUTH
       // message, which falls through to normal NOTICE processing.
       // Note that if the user's nick is auth this COULD be a notice directed at
       // them. For reference: moznet sends Auth (previously sent AUTH), freenode
       // sends *.
       let isAuth = target == "auth" && this._nickname.toLowerCase() != "auth";
       if (!aMessage.params[1].startsWith("***") && !isAuth) {
         this.getConversation(aMessage.origin)
--- a/chat/protocols/irc/ircUtils.jsm
+++ b/chat/protocols/irc/ircUtils.jsm
@@ -227,17 +227,17 @@ function conversationErrorMessage(aAccou
   let conv = aAccount.getConversation(aMessage.params[1]);
   conv.writeMessage(aMessage.origin, _(aError, aMessage.params[1],
                                        aMessage.params[2] || undefined),
                     {error: true, system: true});
   delete conv._pendingMessage;
 
   // Channels have a couple extra things that can be done to them.
   if (aAccount.isMUCName(aMessage.params[1])) {
-    // If a value for joining is explictly given, mark it.
+    // If a value for joining is explicitly given, mark it.
     if (aJoinFailed)
       conv.joining = false;
     // If the conversation cannot be rejoined automatically, delete
     // chatRoomFields.
     if (!aRejoinable)
       delete conv.chatRoomFields;
   }
 
--- a/chat/protocols/skype/skype.js
+++ b/chat/protocols/skype/skype.js
@@ -414,17 +414,17 @@ SkypeAccount.prototype = {
     if (!refreshToken) {
       this.ERROR("skypetoken value not found.")
       this._disconnectWithAuthFailure();
       return;
     }
 
     // All done!
     this._skypeToken = refreshToken;
-    this.LOG("Recevied Skype token: " + this._skypeToken);
+    this.LOG("Received Skype token: " + this._skypeToken);
 
     if (this._registrationToken) {
       // Subscribe to receive particular events.
       this._subscribe();
       return;
     }
 
     this.reportConnecting(_("connecting.registrationToken"));
--- a/chat/protocols/twitter/twitter.js
+++ b/chat/protocols/twitter/twitter.js
@@ -147,17 +147,17 @@ var GenericTwitterConversation = {
     let flags = {system: true};
     if (aIsError)
       flags.error = true;
     if (aDate)
       flags.time = aDate;
     this.writeMessage("twitter.com", aMessage, flags);
   },
   onSentCallback: function(aMsg, aData) {
-    // The conversation may have been unitialized in the time it takes for
+    // The conversation may have been uninitialized in the time it takes for
     // the async callback to fire.  Use `_observers` as a proxy for uninit'd.
     if (!this._observers)
       return;
 
     let tweet = JSON.parse(aData);
     // The OTR extension requires that the protocol not modify the message
     // (see the notes at `imIOutgoingMessage`).  That's the contract we made.
     // Unfortunately, Twitter trims tweets and substitutes links.
--- a/chat/protocols/xmpp/xmpp-authmechs.jsm
+++ b/chat/protocols/xmpp/xmpp-authmechs.jsm
@@ -230,17 +230,17 @@ const RFC3454 = {
 [\u{1d552}-\u{1d6a3}]|[\u{1d6a8}-\u{1d7c9}]|[\u{20000}-\u{2a6d6}]|\
 [\u{2f800}-\u{2fa1d}]|[\u{f0000}-\u{ffffd}]|[\u{100000}-\u{10fffd}]"
 };
 
 // Generates a random nonce and returns a base64 encoded string.
 // aLength in bytes.
 function createNonce(aLength) {
   // RFC 5802 (5.1): Printable ASCII except ",".
-  // We guarantee a vaild nonce value using base64 encoding.
+  // We guarantee a valid nonce value using base64 encoding.
   return btoa(CryptoUtils.generateRandomBytes(aLength));
 }
 
 // Parses the string of server's response (aChallenge) into an object.
 function parseChallenge(aChallenge) {
   let attributes = {};
   aChallenge.split(",").forEach(value => {
     let match =  /^(\w)=([\s\S]*)$/.exec(value);
--- a/chat/protocols/xmpp/xmpp.jsm
+++ b/chat/protocols/xmpp/xmpp.jsm
@@ -417,17 +417,17 @@ var XMPPMUCConversationPrototype = {
       }
     }
     else {
       this._participants.get(nick).onPresenceStanza(aStanza);
       this.notifyObservers(this._participants.get(nick), "chat-buddy-update");
     }
   },
 
-  /* Called by the account when a messsage is received for this muc */
+  /* Called by the account when a message is received for this muc */
   incomingMessage: function(aMsg, aStanza, aDate) {
     let from = this._account._parseJID(aStanza.attributes["from"]).resource;
     let id = aStanza.attributes["id"];
     let flags = {};
     if (!from) {
       flags.system = true;
       from = this.name;
     }
@@ -752,17 +752,17 @@ var XMPPConversationPrototype = {
   /* Perform entity escaping before displaying the message. We assume incoming
      messages have already been escaped, and will otherwise be filtered. */
   prepareForDisplaying: function(aMsg) {
     if (aMsg.outgoing && !aMsg.system)
       aMsg.displayMessage = TXTToHTML(aMsg.displayMessage);
     GenericConversationPrototype.prepareForDisplaying.apply(this, arguments);
   },
 
-  /* Called by the account when a messsage is received from the buddy */
+  /* Called by the account when a message is received from the buddy */
   incomingMessage: function(aMsg, aStanza, aDate) {
     let from = aStanza.attributes["from"];
     this._targetResource = this._account._parseJID(from).resource;
     let flags = {};
     let error = this._account.parseError(aStanza);
     if (error) {
       let norm = this._account.normalize(from);
       let muc = this._account._mucs.get(norm);
@@ -2290,17 +2290,17 @@ var XMPPAccountPrototype = {
     return this._setJID(result.domain, result.node, result.resource);
   },
 
   // Constructs jid as an object from domain, node and resource parts.
   // The object has properties (node, domain, resource and jid).
   // aDomain is required, but aNode and aResource are optional.
   _setJID: function(aDomain, aNode = null, aResource = null) {
     if (!aDomain)
-      throw "aDomain must have a vaule";
+      throw "aDomain must have a value";
 
     let result = {
       node: aNode,
       domain: aDomain.toLowerCase(),
       resource: aResource
     };
     let jid = result.domain;
     if (result.node) {
@@ -2658,17 +2658,17 @@ var XMPPAccountPrototype = {
   _sendVCard: function() {
     if (!this._connection)
       return;
 
     // We have to download the user's existing vCard before updating it.
     // This lets us preserve the fields that we don't change or don't know.
     // Some servers may reject a new vCard if we don't do this first.
     if (!this.hasOwnProperty("_userVCard")) {
-      // The download of the vCard is asyncronous and will call _sendVCard back
+      // The download of the vCard is asynchronous and will call _sendVCard back
       // when the user's vCard has been received.
       this._downloadUserVCard();
       return;
     }
 
     // Read the local user icon asynchronously from the disk.
     // _cacheUserIcon will call _sendVCard back once the icon is ready.
     if (!this.hasOwnProperty("_cachedUserIcon")) {