Skip to content

Commit d3f680d

Browse files
committed
Fix typos in comments and add a spellchecker script for future use
Signed-off-by: Andras Timar <[email protected]> Change-Id: I8ff63197b0b7c2102caf7f08f7e37db1028778be
1 parent 2a318fc commit d3f680d

File tree

86 files changed

+1175
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1175
-190
lines changed

browser/admin/src/AdminClusterOverview.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ var AdminClusterOverview = AdminSocketBase.extend({
8888
if (server.podname) {
8989
cardTitle.textContent = server.podname;
9090
} else {
91-
console.warn('podname doesnot exist, using serverId instead of podname on card title');
91+
console.warn('podname does not exist, using serverId instead of podname on card title');
9292
cardTitle.textContent = server.serverId;
9393
}
9494
cardHeader.appendChild(cardTitle);
@@ -406,7 +406,7 @@ var AdminClusterOverview = AdminSocketBase.extend({
406406
if (server.podname) {
407407
anchor.textContent = server.podname;
408408
} else {
409-
console.warn('podname doesnot exist, using serverId instead of podname on anchor tag');
409+
console.warn('podname does not exist, using serverId instead of podname on anchor tag');
410410
anchor.textContent = server.serverId;
411411
}
412412
return anchor;

browser/css/cool.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
--tb-min-fs-u: 11;
3838
/* tab max font-size */
3939
--tb-max-fs: 16px;
40-
/* tab max font-size wihtout units*/
40+
/* tab max font-size without units*/
4141
--tb-max-fs-u: 16;
4242
/* tab font-size preferred value or scaler */
4343
--tb-fs-s: 1vw;

browser/css/device-mobile.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ textarea.cool-annotation-textarea {
557557
#mobile-wizard.popup #busylabel {
558558
border-bottom: none !important;
559559
font-size: 100% !important;
560-
/* inherits margin top and bototm from jsdialogs.css */
560+
/* inherits margin top and bottom from jsdialogs.css */
561561
margin-inline: 2px !important;
562562
}
563563

@@ -592,7 +592,7 @@ textarea.cool-annotation-textarea {
592592
margin-bottom: 24px;
593593
}
594594

595-
/* Feeback dialog */
595+
/* Feedback dialog */
596596
.iframe-dialog-wrap {
597597
left: 0;
598598
top: 0;
@@ -604,7 +604,7 @@ textarea.cool-annotation-textarea {
604604
.iframe-dialog-modal {
605605
position: absolute;
606606
width: 100%;
607-
height: 564px; /* incrase height to account for stacked buttons*/
607+
height: 564px; /* increase height to account for stacked buttons*/
608608
bottom: 0;
609609
}
610610
@media only screen
@@ -638,7 +638,7 @@ textarea.cool-annotation-textarea {
638638
flex-direction: column;
639639
}
640640

641-
/* hide not usefull style options on mobile */
641+
/* hide not useful style options on mobile */
642642
div#fontstyletoolbox + div#style.mobile-wizard {
643643
display: none !important;
644644
}

browser/css/jsdialogs.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ input[type='number']:hover::-webkit-outer-spin-button {
10051005
}
10061006

10071007
.modalpopup[id$='-dropdown'] {
1008-
/* submenu is inserted into the same overlay, dont make it relative to parent */
1008+
/* submenu is inserted into the same overlay, don't make it relative to parent */
10091009
position: absolute !important;
10101010
}
10111011

@@ -1350,7 +1350,7 @@ input[type='number']:hover::-webkit-outer-spin-button {
13501350
color: #636363 !important;
13511351
}
13521352

1353-
/* Dialog-specific excelptions*/
1353+
/* Dialog-specific exceptions */
13541354
#DefineNameDialog .cell.jsdialog,
13551355
#ManageNamesDialog .cell.jsdialog {
13561356
padding-left: 0px;
@@ -1378,7 +1378,7 @@ input[type='number']:hover::-webkit-outer-spin-button {
13781378
display: none;
13791379
}
13801380

1381-
/* Macros dialos */
1381+
/* Macros dialog */
13821382

13831383
#MacroWarnMedium label {
13841384
max-width: 400px;

browser/css/menubar.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
display: none;
2424
}
2525

26-
/* hide documen-header to free up space when using narrow windows */
26+
/* hide document-header to free up space when using narrow windows */
2727
@media screen and (max-width: 800px) {
2828
.main-nav.hasnotebookbar:not(.readonly) #document-header {
2929
display: none !important;

browser/js/Autolinker.js

+46-46
Large diffs are not rendered by default.

browser/js/ResizeObserverPolyfill.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ if (typeof ResizeObserver === 'undefined') {
205205
// Schedule new call to be in invoked when the pending one is resolved.
206206
// This is important for "transitions" which never actually start
207207
// immediately so there is a chance that we might miss one if change
208-
// happens amids the pending invocation.
208+
// happens amidst the pending invocation.
209209
trailingCall = true;
210210
}
211211
else {

browser/js/global.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ function getInitializerClass() {
637637
}
638638
});
639639
};
640-
640+
641641
processObject(settingJSON);
642642

643643
global.prefs._localStorageCache = {};
@@ -656,7 +656,7 @@ function getInitializerClass() {
656656
return;
657657
}
658658

659-
// we do not remove the old value, both for downgrades and incase we split an old global preference to a per-app one
659+
// we do not remove the old value, both for downgrades and in case we split an old global preference to a per-app one
660660
global.localStorage.setItem(newName, oldValue);
661661
},
662662

@@ -958,7 +958,7 @@ function getInitializerClass() {
958958
/// may be useful to supplement hasAnyTouchscreen or hasPrimaryTouchscreen for, for example, determining UI or
959959
/// hitboxes after a tap in a place where you can't sensibly figure out whether the direct trigger was a
960960
/// touchscreen. Examples might be click events that are roundtripped through core
961-
/// is null when no touch or click events have yet occured, true when the last touch or click event was from a
961+
/// is null when no touch or click events have yet occurred, true when the last touch or click event was from a
962962
/// touchscreen, and false when the last touch or click event was from a mouse
963963
/// is updated with active listeners during the capture phase of the <html> element, so should be done before
964964
/// most other event processing takes place
@@ -969,7 +969,7 @@ function getInitializerClass() {
969969
/// touch event
970970
lastEventTime: null,
971971

972-
/// detect if the last event was a touch event, or if no events have yet occured whether we have a touchscreen
972+
/// detect if the last event was a touch event, or if no events have yet occurred whether we have a touchscreen
973973
/// available to us. Should be able to replace uses of hasAnyTouchscreen for uses where we are OK with the
974974
/// result being less stable
975975
currentlyUsingTouchscreen: function() {

browser/src/canvas/CanvasSectionContainer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ class CanvasSectionContainer {
17991799
this.context.setTransform(1, 0, 0, 1, 0, 0);
18001800

18011801
var subsetBounds: cool.Bounds = null;
1802-
// if there is a tileSubset we only want to draw the miniumum region of its bounds
1802+
// if there is a tileSubset we only want to draw the minimum region of its bounds
18031803
if (tileSubset) {
18041804
const tileSection: cool.TilesSection = (this.getSectionWithName(L.CSections.Tiles.name) as any) as cool.TilesSection;
18051805
if (tileSection && this.shouldDrawSection((tileSection as any) as CanvasSectionObject)) {

browser/src/canvas/sections/CommentListSection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ export class CommentSection extends app.definitions.canvasSectionObject {
821821
// Select the root comment
822822
var idx = this.getRootIndexOf(annotation.sectionProperties.data.id);
823823

824-
// no need to reselect comment, it will cuase to scroll to root comment unnecessarily
824+
// no need to reselect comment, it will cause to scroll to root comment unnecessarily
825825
if (this.sectionProperties.selectedComment === this.sectionProperties.commentList[idx]) {
826826
this.update();
827827
return;
@@ -2219,7 +2219,7 @@ export class CommentSection extends app.definitions.canvasSectionObject {
22192219
if (actHeight > maxMaxHeight) {
22202220
actHeight = maxMaxHeight;
22212221
}
2222-
// if _leaflet_pos are not calculated (undefined) then dont do it (leave the comment at default size)
2222+
// if _leaflet_pos are not calculated (undefined) then don't do it (leave the comment at default size)
22232223
if (typeof this.sectionProperties.commentList[i].sectionProperties.container._leaflet_pos !== 'undefined'
22242224
&& (i+1 >= this.sectionProperties.commentList.length
22252225
|| typeof this.sectionProperties.commentList[i+1].sectionProperties.container._leaflet_pos !== 'undefined'))

browser/src/canvas/sections/CommentSection.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ export class Comment extends CanvasSectionObject {
13681368

13691369
const isRTL = this.isCalcRTL();
13701370

1371-
// this.size may currently have an artifically wide size if mouseEnter without moveLeave seen
1371+
// this.size may currently have an artificially wide size if mouseEnter without moveLeave seen
13721372
// so fetch the real size
13731373
var x = isRTL ? margin : cellSize[0] - squareDim - margin;
13741374
var commentColor = getComputedStyle(document.body).getPropertyValue('--color-calc-comment');

browser/src/canvas/sections/TilesSection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class TilesSection extends app.definitions.canvasSectionObject {
113113
// the bounding box of this set of tiles
114114
public getSubsetBounds(canvasCtx: CanvasRenderingContext2D, tileSubset: Set<any>): cool.Bounds {
115115

116-
// don't do anything for this atypical varient
116+
// don't do anything for this atypical variant
117117
if (app.file.fileBasedView)
118118
return null;
119119

@@ -400,7 +400,7 @@ export class TilesSection extends app.definitions.canvasSectionObject {
400400
var part = this.sectionProperties.docLayer._selectedPart;
401401
var mode = this.sectionProperties.docLayer._selectedMode;
402402

403-
// Calculate all this here intead of doing it per tile.
403+
// Calculate all this here instead of doing it per tile.
404404
var ctx = this.sectionProperties.tsManager._paintContext();
405405

406406
if (this.sectionProperties.tsManager.waitForTiles()) {

browser/src/control/Control.AboutDialog.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class AboutDialog {
198198
if (e.key === 'd') {
199199
this.map._debug.toggle();
200200
} else if (e.key === 'l') {
201-
// L toggges the Online logging level between the default (whatever
201+
// L toggles the Online logging level between the default (whatever
202202
// is set in coolwsd.xml or on the coolwsd command line) and the
203203
// most verbose a client is allowed to set (which also can be set in
204204
// coolwsd.xml or on the coolwsd command line).

browser/src/control/Control.DownloadProgress.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ L.Control.DownloadProgress = L.Control.extend({
9090

9191
JSDialog.enableButtonInModal(modalId, modalId + '-response', false);
9292
} else {
93-
// downloading for paste, next: dialog will dissapear
93+
// downloading for paste, next: dialog will disappear
9494
this._map.uiManager.showProgressBarDialog(modalId, this._getDialogTitle(), msg,
9595
'', this._onClose.bind(this), 0, this._onClose.bind(this));
9696
}

browser/src/control/Control.JSDialog.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ L.Control.JSDialog = L.Control.extend({
403403
initialFocusElement[0].focus();
404404

405405
// pass the current instance and get the tabcontrol object if it exist
406-
// this will only search in current instance and not in whole docuemnt
406+
// this will only search in current instance and not in whole document
407407
const tabControlWidget = this.findTabControl(instance);
408408

409409
let focusWidget, firstFocusableElement ;
@@ -448,7 +448,7 @@ L.Control.JSDialog = L.Control.extend({
448448
return null; // Return null if tabcontrol is not found
449449
},
450450

451-
/// if you use updatePos - instance param is binded automatically
451+
/// if you use updatePos - instance param is bound automatically
452452
setPosition: function(instance, updatedPos) {
453453
var calculated = false;
454454
var isRTL = document.documentElement.dir === 'rtl';
@@ -608,7 +608,7 @@ L.Control.JSDialog = L.Control.extend({
608608
},
609609

610610
isChildAutoFilter: function(instance) {
611-
// JSON structure suggest that if children array's first element has id='menu' and widgetType = 'treelistbox' then it will definatly a child autofilter popup
611+
// JSON structure suggests that if children array's first element has id='menu' and widgetType = 'treelistbox' then it will definitely be a child autofilter popup
612612
var rootChild = instance.children[0];
613613
if (rootChild) {
614614
var firstWidget = rootChild.children[0];
@@ -622,7 +622,7 @@ L.Control.JSDialog = L.Control.extend({
622622
instance.posx = parentAutofilter.right;
623623
instance.posy = parentAutofilter.top;
624624

625-
// set marding start for child popup in rtl mode
625+
// set margin start for child popup in rtl mode
626626
var isSpreadsheetRTL = this.map._docLayer.isCalcRTL();
627627
if (isSpreadsheetRTL) {
628628
var rtlPosx = parentAutofilter.left - instance.form.getBoundingClientRect().width;
@@ -658,7 +658,7 @@ L.Control.JSDialog = L.Control.extend({
658658
},
659659

660660
getAutoPopupParentContainer(instance) {
661-
// Parent container will
661+
// Parent container will
662662
if (instance.isAutofilter || instance.isAutoCompletePopup || !instance.isDocumentAreaPopup)
663663
return document.body
664664
return document.getElementById('document-container');
@@ -752,7 +752,7 @@ L.Control.JSDialog = L.Control.extend({
752752
this.createDialog(instance);
753753
this.addHandlers(instance);
754754

755-
// FIXME: remove this auto-binded instance so it will be clear what is passed
755+
// FIXME: remove this auto-bound instance so it will be clear what is passed
756756
instance.updatePos = this.setPosition.bind(this, instance);
757757

758758
// Special case for nonModal dialogues. Core side doesn't send their initial coordinates. We need to center them.
@@ -762,7 +762,7 @@ L.Control.JSDialog = L.Control.extend({
762762
instance.updatePos();
763763
}
764764

765-
// AutoPopup will calculate poup position for Autofilter Popup
765+
// AutoPopup will calculate popup position for Autofilter Popup
766766
if (instance.isAutofilter && !instance.isAutoFillPreviewTooltip)
767767
this.calculateAutoFilterPosition(instance);
768768
else if (instance.isAutoFillPreviewTooltip || instance.isAutoCompletePopup){
@@ -885,7 +885,7 @@ L.Control.JSDialog = L.Control.extend({
885885
newX = window.innerWidth - width;
886886

887887
// at this point we have un updated potion of autofilter instance.
888-
// so to handle overlapping case of autofiler and toolbar we need some complex calculation
888+
// so to handle overlapping case of autofilter and toolbar we need some complex calculation
889889
if (dialogBottom > windowBottom)
890890
newY = newY - (dialogBottom - windowBottom + 10);
891891

browser/src/control/Control.JSDialogBuilder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
24612461

24622462
$(controls.button).on('click', clickFunction);
24632463
$(controls.label).on('click', clickFunction);
2464-
// We need a way to also handle the cutom tooltip for any tool button like save in shortcut bar
2464+
// We need a way to also handle the custom tooltip for any tool button like save in shortcut bar
24652465
if (data.isCustomTooltip) {
24662466
this._handleCutomTooltip(div, builder);
24672467
}

browser/src/control/Control.MobileWizardBuilder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ L.Control.MobileWizardBuilder = L.Control.JSDialogBuilder.extend({
321321

322322
// TODO: below is not true anymore
323323
// we still use non welded sidebar where don't have partial updates
324-
// kayup can be used only in welded dialogs
324+
// keyup can be used only in welded dialogs
325325
edit.addEventListener('change', function() {
326326
if (callback)
327327
callback(this.value);

browser/src/control/Control.PartsPreview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ L.Control.PartsPreview = L.Control.extend({
483483
//deselect all slides
484484
this._map.deselectAll();
485485

486-
//reselect the first origianl selection
486+
//reselect the first original selection
487487
this._map.setPart(this.firstSelection);
488488
this._map.selectPart(this.firstSelection, 1, false);
489489

browser/src/control/Control.Sidebar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class Sidebar {
224224
var isCurrent = stateHandler
225225
? stateHandler.getItemValue(this.targetDeckCommand)
226226
: false;
227-
// just to be sure chack with other method
227+
// just to be sure check with other method
228228
if (isCurrent === 'false' || !isCurrent)
229229
isCurrent =
230230
this.targetDeckCommand === this.commandForDeck(currentDeck);

browser/src/control/Control.Tabs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ L.Control.Tabs = L.Control.extend({
326326
_moveSheet: function (newIndex) {
327327
var currentTab = this._map.getCurrentPartNumber();
328328
// odd but true: the base index changes according to the tab is dragged
329-
// on the left or on the right wrt the current tab position
329+
// on the left or on the right wrt. the current tab position
330330
var newIndexZeroBased = newIndex > currentTab ? newIndex - 2 : newIndex - 1;
331331
this._map._docLayer._sheetSwitch.updateOnSheetMoved(currentTab, newIndexZeroBased);
332332
this._map.sendUnoCommand('.uno:Move?Copy:bool=false&UseCurrentDocument:bool=true&Index=' + newIndex);

browser/src/control/Control.UIManager.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ L.Control.UIManager = L.Control.extend({
398398
var showResolved = this.getBooleanDocTypePref('ShowResolved', true);
399399
if (showResolved === false || showResolved === 'false')
400400
this.map.sendUnoCommand('.uno:ShowResolvedAnnotations');
401-
// Notify the inital status of comments
401+
// Notify the initial status of comments
402402
var initialCommentState = this.map['stateChangeHandler'].getItemValue('showannotations');
403403
this._map.fire('commandstatechanged', {commandName : 'showannotations', state : initialCommentState});
404404
this.map.mention = L.control.mention(this.map);
@@ -1282,7 +1282,7 @@ L.Control.UIManager = L.Control.extend({
12821282
/// message2 - 2nd line of message
12831283
/// buttonText - text inside button
12841284
/// callback - callback on button press
1285-
/// withCancel - specifies if needs cancal button also
1285+
/// withCancel - specifies if needs cancel button also
12861286
showInfoModal: function(id, title, message1, message2, buttonText, callback, withCancel, focusId) {
12871287
var dialogId = this.generateModalId(id);
12881288
var responseButtonId = id + '-response';

browser/src/control/Control.Zotero.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ L.Control.Zotero = L.Control.extend({
17041704

17051705
getBibParameters: function(html) {
17061706
var field = {};
1707-
// TODO: support uncited ommited(citation) and custom sources in bibliography
1707+
// TODO: support uncited omitted (citation) and custom sources in bibliography
17081708
if (this.getFieldType() === 'Field') {
17091709
field['FieldType'] = {type: 'string', value: 'vnd.oasis.opendocument.field.UNHANDLED'};
17101710
field['FieldCommand'] = {type: 'string', value: 'ADDIN ZOTERO_BIBL ' + JSON.stringify(this.settings.bib) + ' CSL_BIBLIOGRAPHY'};

browser/src/control/Permission.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ L.Map.include({
2727
button.attr('title', _('Edit document'));
2828
button.attr('aria-label', _('Edit document'));
2929
// app.file.fileBasedView is new view that has continuous scrolling
30-
// used for PDF and we dont permit editing for PDFs
30+
// used for PDF and we don't permit editing for PDFs
3131
// this._shouldStartReadOnly() is a check for files that should start in readonly mode and even on desktop browser
3232
// we warn the user about loosing the rich formatting and offer an option to
3333
// save as ODF instead of the current format

browser/src/control/Toolbar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ L.Map.include({
628628
var docType = this.getDocType() === 'drawing' ? 'presentation' : this.getDocType();
629629
mainSectionsQuery += ', div.' + docType + ' .section';
630630

631-
// Select nain sections elements within the mainDiv
631+
// Select main sections elements within the mainDiv
632632
var mainSections = mainDiv.querySelectorAll(mainSectionsQuery);
633633
isAnyMatchingContent = false;
634634

0 commit comments

Comments
 (0)