Bug 1399756 - fix typos in editor/ using codespell. rs=comment-only,typo-fix a=jorgk DONTBUILD
authorJorg K <jorgk@jorgk.com>
Tue, 20 Mar 2018 23:57:33 +0100
changeset 31323 c10714b39cbdb2f3b591c78e41a46a8dceb5b37e
parent 31322 81e6edf209a93cc2078a57b5c61d792b9d04c999
child 31328 31fae9500e169aac9f39127f6bda3e84efb2bd13
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewerscomment-only, typo-fix, jorgk
bugs1399756
Bug 1399756 - fix typos in editor/ using codespell. rs=comment-only,typo-fix a=jorgk DONTBUILD
editor/ui/composer/content/ComposerCommands.js
editor/ui/composer/content/editor.js
editor/ui/composer/content/editorOverlay.xul
editor/ui/composer/content/editorUtilities.js
editor/ui/dialogs/content/EdAEAttributes.js
editor/ui/dialogs/content/EdColorProps.js
editor/ui/dialogs/content/EdConvertToTable.js
editor/ui/dialogs/content/EdDictionary.js
editor/ui/dialogs/content/EdImageProps.js
editor/ui/dialogs/content/EdImageProps.xul
editor/ui/dialogs/content/EdInputImage.xul
editor/ui/dialogs/content/EdLinkProps.js
editor/ui/dialogs/content/EdTableProps.js
editor/ui/dialogs/content/EditorPublish.js
editor/ui/locales/en-US/chrome/composer/editor.properties
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -10,17 +10,17 @@ var gComposerJSCommandControllerID = 0;
 
 //-----------------------------------------------------------------------------------
 function SetupHTMLEditorCommands()
 {
   var commandTable = GetComposerCommandTable();
   if (!commandTable)
     return;
 
-  // Include everthing a text editor does
+  // Include everything a text editor does
   SetupTextEditorCommands();
 
   //dump("Registering HTML editor commands\n");
 
   commandTable.registerCommand("cmd_renderedHTMLEnabler", nsDummyHTMLCommand);
 
   commandTable.registerCommand("cmd_grid",  nsGridCommand);
 
@@ -715,17 +715,17 @@ var nsPublishAsCommand =
 
       if (window.ok)
         return Publish(publishData);
     }
     return false;
   }
 }
 
-// ------- output utilites   ----- //
+// ------- output utilities   ----- //
 
 // returns a fileExtension string
 function GetExtensionBasedOnMimeType(aMIMEType)
 {
   try {
     var mimeService = null;
     mimeService = Cc["@mozilla.org/mime;1"]
                     .getService(Ci.nsIMIMEService);
@@ -1879,17 +1879,17 @@ function FinishPublishing()
 {
   SetDocumentEditable(true);
   gProgressDialog = null;
   gPublishData = null;
   gRestoreDocumentSource = null;
 
   if (gCommandAfterPublishing)
   {
-    // Be sure to null out the global now incase of trouble when executing command
+    // Be sure to null out the global now in case of trouble when executing command
     var command = gCommandAfterPublishing;
     gCommandAfterPublishing = null;
     goDoCommand(command);
   }
 }
 
 // Create a nsIURI object filled in with all required publishing info
 function CreateURIFromPublishData(publishData, doDocUri)
@@ -3049,17 +3049,17 @@ var nsSetSmiley =
 
 
       editor.insertElementAtSelection(extElement,true);
       window.content.focus();
 
     }
     catch (e)
     {
-        dump("Exception occured in smiley InsertElementAtSelection\n");
+        dump("Exception occurred in smiley InsertElementAtSelection\n");
     }
   },
   // This is now deprecated in favor of "doCommandParams"
   doCommand: function(aCommand) {}
 };
 
 
 function doAdvancedProperties(element)
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -2552,17 +2552,17 @@ function RemoveItem(id)
 {
   var item = document.getElementById(id);
   if (item)
     item.remove();
 }
 
 // Command Updating Strategy:
 //   Don't update on on selection change, only when menu is displayed,
-//   with this "oncreate" hander:
+//   with this "oncreate" handler:
 function EditorInitTableMenu()
 {
   try {
     InitJoinCellMenuitem("menu_JoinTableCells");
   } catch (ex) {}
 
   // Set enable states for all table commands
   goUpdateTableMenuItems(document.getElementById("composerTableMenuItems"));
@@ -2890,17 +2890,17 @@ function SwitchInsertCharToThisWindow(wi
   {
     // Move dialog association to the current window
     window.InsertCharWindow = windowWithDialog.InsertCharWindow;
     windowWithDialog.InsertCharWindow = null;
 
     // Switch the dialog's opener to current window's
     window.InsertCharWindow.opener = window;
 
-    // Bring dialog to the forground
+    // Bring dialog to the foreground
     window.InsertCharWindow.focus();
     return true;
   }
   return false;
 }
 
 function FindEditorWithInsertCharDialog()
 {
--- a/editor/ui/composer/content/editorOverlay.xul
+++ b/editor/ui/composer/content/editorOverlay.xul
@@ -209,17 +209,17 @@
     <command id="cmd_code"          state="false"     oncommand="doStyleUICommand('cmd_code')"/>
     <command id="cmd_samp"          state="false"     oncommand="doStyleUICommand('cmd_samp')"/>
     <command id="cmd_var"           state="false"     oncommand="doStyleUICommand('cmd_var')"/>
     <command id="cmd_ul"            state="false"     oncommand="doStyleUICommand('cmd_ul')"/>
     <command id="cmd_ol"            state="false"     oncommand="doStyleUICommand('cmd_ol')"/>
     <command id="cmd_indent"                          oncommand="goDoCommand('cmd_indent')"/>
     <command id="cmd_outdent"                         oncommand="goDoCommand('cmd_outdent')"/>
 
-    <!-- the state attribute gets filled with the paragraph format before the command is exectued -->
+    <!-- the state attribute gets filled with the paragraph format before the command is executed -->
     <command id="cmd_paragraphState"  state=""         oncommand="doStatefulCommand('cmd_paragraphState', event.target.value)"/>
     <command id="cmd_fontFace"        state=""         oncommand="doStatefulCommand('cmd_fontFace', event.target.value)"/>
 
     <!-- No "oncommand", use EditorSelectColor() to bring up color dialog -->
     <command id="cmd_fontColor"       state=""/>
     <command id="cmd_backgroundColor" state=""/>
     <command id="cmd_highlight"       state="transparent"  oncommand="EditorSelectColor('Highlight', event);"/>
     <command id="cmd_fontSize"                         oncommand="goDoCommand('cmd_fontSize')"/>
--- a/editor/ui/composer/content/editorUtilities.js
+++ b/editor/ui/composer/content/editorUtilities.js
@@ -886,17 +886,17 @@ function Clone(obj)
       clone[i] = Clone(obj[i]);
     else
       clone[i] = obj[i];
   }
   return clone;
 }
 
 /**
- * Utility funtions to handle shortended data: URLs in EdColorProps.js and EdImageOverlay.js.
+ * Utility functions to handle shortended data: URLs in EdColorProps.js and EdImageOverlay.js.
  */
 
 /**
  * Is the passed in image URI a shortened data URI?
  * @return {bool}
  */
 function isImageDataShortened(aImageData) {
   return (/^data:/i.test(aImageData) && aImageData.includes("…"));
--- a/editor/ui/dialogs/content/EdAEAttributes.js
+++ b/editor/ui/dialogs/content/EdAEAttributes.js
@@ -34,17 +34,17 @@ var gCoreJSEvents =
   "-",
   "onkeypress",
 	"onkeydown",
 	"onkeyup"
 ];
 
 // Following are commonly-used strings
 
-// Alse accept: sRGB: #RRGGBB //
+// Also accept: sRGB: #RRGGBB //
 var gHTMLColors =
 [
 	"Aqua",
 	"Black",
 	"Blue",
 	"Fuchsia",
 	"Gray",
 	"Green",
@@ -1713,17 +1713,17 @@ gHTMLAttr._var =
 [
   "_core",
   "-",
   "^lang",
   "dir"
 ];
 
 // ================ JS Attributes ================ //
-// These are element specif even handlers. 
+// These are element specific even handlers. 
 /* Most all elements use gCoreJSEvents, so those 
    are assumed except for those listed here with "noEvents"
 */
 
 gJSAttr.a =
 [
   "onfocus",
   "onblur"
--- a/editor/ui/dialogs/content/EdColorProps.js
+++ b/editor/ui/dialogs/content/EdColorProps.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  Behavior notes:
  Radio buttons select "UseDefaultColors" vs. "UseCustomColors" modes.
  If any color attribute is set in the body, mode is "Custom Colors",
   even if 1 or more (but not all) are actually null (= "use default")
  When in "Custom Colors" mode, all colors will be set on body tag,
-  even if they are just default colors, to assure compatable colors in page.
+  even if they are just default colors, to assure compatible colors in page.
  User cannot select "use default" for individual colors
 */
 
 //Cancel() is in EdDialogCommon.js
 
 var gBodyElement;
 var prefs;
 var gBackgroundImage;
--- a/editor/ui/dialogs/content/EdConvertToTable.js
+++ b/editor/ui/dialogs/content/EdConvertToTable.js
@@ -116,17 +116,17 @@ function onAccept()
   // TODO: Maybe add a checkbox to let user decide
   //str = str.replace(/(<br>)+/g, "<br>");
 
   // Trim leading and trailing spaces
   str = str.trim();
 
   // Remove all tag contents so we don't replace
   //   separator character within tags
-  // Also converts lists to something usefull
+  // Also converts lists to something useful
   var stack = [];
   var start;
   var end;
   var searchStart = 0;
   var listSeparator = "";
   var listItemSeparator = "";
   var endList = false;
 
@@ -138,31 +138,31 @@ function onAccept()
       end = str.indexOf(">", start+1);
       if (end > start)
       {
         let tagContent = str.slice(start + 1, end).trim();
 
         if (/^ol|^ul|^dl/.test(tagContent))
         {
           //  Replace list tag with <BR> to start new row 
-          //   at begining of second or greater list tag
+          //   at beginning of second or greater list tag
           str = str.slice(0, start) + listSeparator + str.slice(end+1);
           if (listSeparator == "")
             listSeparator = "<br>";
           
           // Reset for list item separation into cells
           listItemSeparator = "";
         }
         else if (/^li|^dt|^dd/.test(tagContent))
         {
           // Start a new row if this is first item after the ending the last list
           if (endList)
             listItemSeparator = "<br>";
 
-          // Start new cell at begining of second or greater list items
+          // Start new cell at beginning of second or greater list items
           str = str.slice(0, start) + listItemSeparator + str.slice(end+1);
 
           if (endList || listItemSeparator == "")
             listItemSeparator = sepCharacter;
 
           endList = false;
         }
         else 
--- a/editor/ui/dialogs/content/EdDictionary.js
+++ b/editor/ui/dialogs/content/EdDictionary.js
@@ -65,17 +65,17 @@ function SelectWordToAddInList()
 function AddWord()
 {
   if (ValidateWordToAdd())
   {
     try {
       gSpellChecker.AddWordToDictionary(gWordToAdd);
     }
     catch (e) {
-      dump("Exception occured in gSpellChecker.AddWordToDictionary\nWord to add probably already existed\n");
+      dump("Exception occurred in gSpellChecker.AddWordToDictionary\nWord to add probably already existed\n");
     }
 
     // Rebuild the dialog list
     FillDictionaryList();
 
     SelectWordToAddInList();
     gDialog.WordInput.value = "";
   }
@@ -96,17 +96,17 @@ function ReplaceWord()
         // Add to the dictionary list
         gSpellChecker.AddWordToDictionary(gWordToAdd);
 
         // Just change the text on the selected item
         //  instead of rebuilding the list
         selItem.label = gWordToAdd; 
       } catch (e) {
         // Rebuild list and select the word - it was probably already in the list
-        dump("Exception occured adding word in ReplaceWord\n");
+        dump("Exception occurred adding word in ReplaceWord\n");
         FillDictionaryList();
         SelectWordToAddInList();
       }
     }
   }
 }
 
 function RemoveWord()
--- a/editor/ui/dialogs/content/EdImageProps.js
+++ b/editor/ui/dialogs/content/EdImageProps.js
@@ -106,17 +106,17 @@ function Startup()
   // Save initial source URL
   gOriginalSrc = gDialog.srcInput.value;
 
   // By default turn constrain on, but both width and height must be in pixels
   gDialog.constrainCheckbox.checked =
     gDialog.widthUnitsMenulist.selectedIndex == 0 &&
     gDialog.heightUnitsMenulist.selectedIndex == 0;
 
-  // Start in "Link" tab if 2nd arguement is true
+  // Start in "Link" tab if 2nd argument is true
   if (gDialog.linkTab && "arguments" in window && window.arguments[1])
   {
     document.getElementById("TabBox").selectedTab = gDialog.linkTab;
     SetTextboxFocus(gDialog.hrefInput);
   }
   else
     SetTextboxFocus(gDialog.srcInput);
 
--- a/editor/ui/dialogs/content/EdImageProps.xul
+++ b/editor/ui/dialogs/content/EdImageProps.xul
@@ -30,17 +30,17 @@
   <tabbox id="TabBox">
     <tabs flex="1">
       <tab id="imageLocationTab"/>
       <tab id="imageDimensionsTab"/>
       <tab id="imageAppearanceTab"/>
       <tab id="imageLinkTab"/>
     </tabs>
     <tabpanels>
-      <!-- panels overlayed from EdImageOverlay.xul -->
+      <!-- panels overlaid from EdImageOverlay.xul -->
       <vbox id="imageLocation"/>
       <vbox id="imageDimensions"/>
       <hbox id="imageAppearance"/>
       <vbox>
         <spacer class="spacer"/>
         <vbox id="LinkLocationBox"/>
         <spacer class="spacer"/>
         <hbox>
--- a/editor/ui/dialogs/content/EdInputImage.xul
+++ b/editor/ui/dialogs/content/EdInputImage.xul
@@ -48,17 +48,17 @@
               <hbox>
                 <textbox id="InputTabIndex" class="narrow" oninput="forceInteger(this.id);"/>
               </hbox>
             </row>
           </rows>
         </grid>
       </groupbox>
 
-      <!-- panels overlayed from EdImageOverlay.xul -->
+      <!-- panels overlaid from EdImageOverlay.xul -->
       <vbox id="imageLocation"/>
       <vbox id="imageDimensions"/>
       <hbox id="imageAppearance"/>
 
     </tabpanels>
   </tabbox>
 
   <hbox align="end">
--- a/editor/ui/dialogs/content/EdLinkProps.js
+++ b/editor/ui/dialogs/content/EdLinkProps.js
@@ -204,17 +204,17 @@ function Startup()
 }
 
 // Set dialog widgets with attribute data
 // We get them from globalElement copy so this can be used
 //   by AdvancedEdit(), which is shared by all property dialogs
 function InitDialog()
 {
   // Must use getAttribute, not "globalElement.href", 
-  //  or foreign chars aren't coverted correctly!
+  //  or foreign chars aren't converted correctly!
   gDialog.hrefInput.value = globalElement.getAttribute("href");
 
   // Set "Relativize" checkbox according to current URL state
   SetRelativeCheckbox(gDialog.makeRelativeLink);
 }
 
 function doEnabling()
 {
@@ -291,28 +291,28 @@ function onAccept()
         // Append the link text as the last child node 
         //   of the anchor node
         var textNode = gActiveEditor.document.createTextNode(newLinkText);
         if (textNode)
           anchorElement.appendChild(textNode);
         try {
           gActiveEditor.insertElementAtSelection(anchorElement, false);
         } catch (e) {
-          dump("Exception occured in InsertElementAtSelection\n");
+          dump("Exception occurred in InsertElementAtSelection\n");
           return true;
         }
       } else if (insertNew || replaceExistingLink)
       {
         //  Link source was supplied by the selection,
         //  so insert a link node as parent of this
         //  (may be text, image, or other inline content)
         try {
           gActiveEditor.insertLinkAroundSelection(anchorElement);
         } catch (e) {
-          dump("Exception occured in InsertElementAtSelection\n");
+          dump("Exception occurred in InsertElementAtSelection\n");
           return true;
         }
       }
       // Check if the link was to a heading 
       if (href in gHNodeArray)
       {
         var anchorNode = gActiveEditor.createElementWithDefaults("a");
         if (anchorNode)
--- a/editor/ui/dialogs/content/EdTableProps.js
+++ b/editor/ui/dialogs/content/EdTableProps.js
@@ -993,17 +993,17 @@ function ApplyTableAttributes()
       if (newAlign != "top")
         gTableCaptionElement.setAttribute("align", newAlign);
 
       // Insert it into the table - caption is always inserted as first child
       try {
         gActiveEditor.insertNode(gTableCaptionElement, gTableElement, 0);
       } catch(e) {}
 
-      // Put selecton back where it was
+      // Put selection back where it was
       ChangeSelection(RESET_SELECTION);
     }
   }
 
   var countDelta;
   var foundCell;
   var i;
 
@@ -1018,17 +1018,17 @@ function ApplyTableAttributes()
       {
         try {
           // Move selection to the last cell
           gSelection.collapse(gCellData.value,0);
           // Insert new rows after it
           gActiveEditor.insertTableRow(countDelta, true);
           gRowCount = gNewRowCount;
           gLastRowIndex = gRowCount - 1;
-          // Put selecton back where it was
+          // Put selection back where it was
           ChangeSelection(RESET_SELECTION);
         }
         catch(ex) {
           dump("FAILED TO FIND FIRST CELL IN LAST ROW\n");
         }
       }
     }
     else
@@ -1058,17 +1058,17 @@ function ApplyTableAttributes()
             gActiveEditor.deleteTableRow(-countDelta);
             gRowCount = gNewRowCount;
             gLastRowIndex = gRowCount - 1;
             if (gCurRowIndex > gLastRowIndex)
               // We are deleting our selection
               // move it to start of table
               ChangeSelectionToFirstCell()
             else
-              // Put selecton back where it was
+              // Put selection back where it was
               ChangeSelection(RESET_SELECTION);
           }
           catch(ex) {
             dump("FAILED TO FIND FIRST CELL IN LAST ROW\n");
           }
         }
       }
     }
--- a/editor/ui/dialogs/content/EditorPublish.js
+++ b/editor/ui/dialogs/content/EditorPublish.js
@@ -294,17 +294,17 @@ function SwitchPanel(tab)
 {
   if (gDialog.TabBox.selectedTab != tab)
     gDialog.TabBox.selectedTab = tab;
 }
 
 function onInputSettings()
 {
   // TODO: Save current data during SelectSite and compare here
-  //       to detect if real change has occured?
+  //       to detect if real change has occurred?
   gSettingsChanged = true;
 }
 
 function GetPublishUrlInput()
 {
   gDialog.PublishUrlInput.value = FormatUrlForPublishing(gDialog.PublishUrlInput.value);
   return gDialog.PublishUrlInput.value;
 }
--- a/editor/ui/locales/en-US/chrome/composer/editor.properties
+++ b/editor/ui/locales/en-US/chrome/composer/editor.properties
@@ -159,17 +159,17 @@ MissingSiteNameError=Please enter a name
 MissingPublishUrlError=Please enter a location for publishing this page.
 MissingPublishFilename=Please enter a filename for the current page.
 #LOCALIZATION NOTE (DuplicateSiteNameError): Don't translate %name%
 DuplicateSiteNameError="%name%" already exists. Please enter a different site name.
 AdvancedProperties=Advanced Properties…
 AdvancedEditForCellMsg=Advanced Edit is unavailable when multiple cells are selected
 # LOCALIZATION NOTE (ObjectProperties):Don't translate "%obj%" it will be replaced with one of above object nouns
 ObjectProperties=%obj% Properties…
-# LOCALIZATION NOTE This character must be in the above string and not confict with other accesskeys in Format menu
+# LOCALIZATION NOTE This character must be in the above string and not conflict with other accesskeys in Format menu
 ObjectPropertiesAccessKey=o
 # LOCALIZATION NOTE (JoinSelectedCells): This variable should contain the "tableJoinCells.accesskey" 
 # letter as defined in editorOverlay.dtd
 JoinSelectedCells=Join Selected Cells
 # LOCALIZATION NOTE (JoinCellToRight): This variable should contain the "tableJoinCells.accesskey" 
 # letter as defined in editorOverlay.dtd
 JoinCellToRight=Join with Cell to the Right
 JoinCellAccesskey=j