Skip to content

Commit

Permalink
Fix typos in comments and add a spellchecker script for future use
Browse files Browse the repository at this point in the history
Signed-off-by: Andras Timar <[email protected]>
Change-Id: I8ff63197b0b7c2102caf7f08f7e37db1028778be
  • Loading branch information
timar committed Jan 31, 2025
1 parent 2a318fc commit 26b0a25
Show file tree
Hide file tree
Showing 88 changed files with 1,180 additions and 195 deletions.
4 changes: 2 additions & 2 deletions browser/admin/src/AdminClusterOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var AdminClusterOverview = AdminSocketBase.extend({
if (server.podname) {
cardTitle.textContent = server.podname;
} else {
console.warn('podname doesnot exist, using serverId instead of podname on card title');
console.warn('podname does not exist, using serverId instead of podname on card title');
cardTitle.textContent = server.serverId;
}
cardHeader.appendChild(cardTitle);
Expand Down Expand Up @@ -406,7 +406,7 @@ var AdminClusterOverview = AdminSocketBase.extend({
if (server.podname) {
anchor.textContent = server.podname;
} else {
console.warn('podname doesnot exist, using serverId instead of podname on anchor tag');
console.warn('podname does not exist, using serverId instead of podname on anchor tag');
anchor.textContent = server.serverId;
}
return anchor;
Expand Down
2 changes: 1 addition & 1 deletion browser/css/cool.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
--tb-min-fs-u: 11;
/* tab max font-size */
--tb-max-fs: 16px;
/* tab max font-size wihtout units*/
/* tab max font-size without units*/
--tb-max-fs-u: 16;
/* tab font-size preferred value or scaler */
--tb-fs-s: 1vw;
Expand Down
8 changes: 4 additions & 4 deletions browser/css/device-mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ textarea.cool-annotation-textarea {
#mobile-wizard.popup #busylabel {
border-bottom: none !important;
font-size: 100% !important;
/* inherits margin top and bototm from jsdialogs.css */
/* inherits margin top and bottom from jsdialogs.css */
margin-inline: 2px !important;
}

Expand Down Expand Up @@ -592,7 +592,7 @@ textarea.cool-annotation-textarea {
margin-bottom: 24px;
}

/* Feeback dialog */
/* Feedback dialog */
.iframe-dialog-wrap {
left: 0;
top: 0;
Expand All @@ -604,7 +604,7 @@ textarea.cool-annotation-textarea {
.iframe-dialog-modal {
position: absolute;
width: 100%;
height: 564px; /* incrase height to account for stacked buttons*/
height: 564px; /* increase height to account for stacked buttons*/
bottom: 0;
}
@media only screen
Expand Down Expand Up @@ -638,7 +638,7 @@ textarea.cool-annotation-textarea {
flex-direction: column;
}

/* hide not usefull style options on mobile */
/* hide not useful style options on mobile */
div#fontstyletoolbox + div#style.mobile-wizard {
display: none !important;
}
Expand Down
6 changes: 3 additions & 3 deletions browser/css/jsdialogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ input[type='number']:hover::-webkit-outer-spin-button {
}

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

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

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

/* Macros dialos */
/* Macros dialog */

#MacroWarnMedium label {
max-width: 400px;
Expand Down
2 changes: 1 addition & 1 deletion browser/css/menubar.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
display: none;
}

/* hide documen-header to free up space when using narrow windows */
/* hide document-header to free up space when using narrow windows */
@media screen and (max-width: 800px) {
.main-nav.hasnotebookbar:not(.readonly) #document-header {
display: none !important;
Expand Down
92 changes: 46 additions & 46 deletions browser/js/Autolinker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion browser/js/ResizeObserverPolyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ if (typeof ResizeObserver === 'undefined') {
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
// happens amidst the pending invocation.
trailingCall = true;
}
else {
Expand Down
8 changes: 4 additions & 4 deletions browser/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function getInitializerClass() {
}
});
};

processObject(settingJSON);

global.prefs._localStorageCache = {};
Expand All @@ -656,7 +656,7 @@ function getInitializerClass() {
return;
}

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

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

/// detect if the last event was a touch event, or if no events have yet occured whether we have a touchscreen
/// detect if the last event was a touch event, or if no events have yet occurred whether we have a touchscreen
/// available to us. Should be able to replace uses of hasAnyTouchscreen for uses where we are OK with the
/// result being less stable
currentlyUsingTouchscreen: function() {
Expand Down
2 changes: 1 addition & 1 deletion browser/src/canvas/CanvasSectionContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ class CanvasSectionContainer {
this.context.setTransform(1, 0, 0, 1, 0, 0);

var subsetBounds: cool.Bounds = null;
// if there is a tileSubset we only want to draw the miniumum region of its bounds
// if there is a tileSubset we only want to draw the minimum region of its bounds
if (tileSubset) {
const tileSection: cool.TilesSection = (this.getSectionWithName(L.CSections.Tiles.name) as any) as cool.TilesSection;
if (tileSection && this.shouldDrawSection((tileSection as any) as CanvasSectionObject)) {
Expand Down
4 changes: 2 additions & 2 deletions browser/src/canvas/sections/CommentListSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ export class CommentSection extends app.definitions.canvasSectionObject {
// Select the root comment
var idx = this.getRootIndexOf(annotation.sectionProperties.data.id);

// no need to reselect comment, it will cuase to scroll to root comment unnecessarily
// no need to reselect comment, it will cause to scroll to root comment unnecessarily
if (this.sectionProperties.selectedComment === this.sectionProperties.commentList[idx]) {
this.update();
return;
Expand Down Expand Up @@ -2219,7 +2219,7 @@ export class CommentSection extends app.definitions.canvasSectionObject {
if (actHeight > maxMaxHeight) {
actHeight = maxMaxHeight;
}
// if _leaflet_pos are not calculated (undefined) then dont do it (leave the comment at default size)
// if _leaflet_pos are not calculated (undefined) then don't do it (leave the comment at default size)
if (typeof this.sectionProperties.commentList[i].sectionProperties.container._leaflet_pos !== 'undefined'
&& (i+1 >= this.sectionProperties.commentList.length
|| typeof this.sectionProperties.commentList[i+1].sectionProperties.container._leaflet_pos !== 'undefined'))
Expand Down
2 changes: 1 addition & 1 deletion browser/src/canvas/sections/CommentSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ export class Comment extends CanvasSectionObject {

const isRTL = this.isCalcRTL();

// this.size may currently have an artifically wide size if mouseEnter without moveLeave seen
// this.size may currently have an artificially wide size if mouseEnter without moveLeave seen
// so fetch the real size
var x = isRTL ? margin : cellSize[0] - squareDim - margin;
var commentColor = getComputedStyle(document.body).getPropertyValue('--color-calc-comment');
Expand Down
4 changes: 2 additions & 2 deletions browser/src/canvas/sections/TilesSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class TilesSection extends app.definitions.canvasSectionObject {
// the bounding box of this set of tiles
public getSubsetBounds(canvasCtx: CanvasRenderingContext2D, tileSubset: Set<any>): cool.Bounds {

// don't do anything for this atypical varient
// don't do anything for this atypical variant
if (app.file.fileBasedView)
return null;

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

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

if (this.sectionProperties.tsManager.waitForTiles()) {
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.AboutDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class AboutDialog {
if (e.key === 'd') {
this.map._debug.toggle();
} else if (e.key === 'l') {
// L toggges the Online logging level between the default (whatever
// L toggles the Online logging level between the default (whatever
// is set in coolwsd.xml or on the coolwsd command line) and the
// most verbose a client is allowed to set (which also can be set in
// coolwsd.xml or on the coolwsd command line).
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.DownloadProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ L.Control.DownloadProgress = L.Control.extend({

JSDialog.enableButtonInModal(modalId, modalId + '-response', false);
} else {
// downloading for paste, next: dialog will dissapear
// downloading for paste, next: dialog will disappear
this._map.uiManager.showProgressBarDialog(modalId, this._getDialogTitle(), msg,
'', this._onClose.bind(this), 0, this._onClose.bind(this));
}
Expand Down
16 changes: 8 additions & 8 deletions browser/src/control/Control.JSDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ L.Control.JSDialog = L.Control.extend({
initialFocusElement[0].focus();

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

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

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

isChildAutoFilter: function(instance) {
// JSON structure suggest that if children array's first element has id='menu' and widgetType = 'treelistbox' then it will definatly a child autofilter popup
// 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
var rootChild = instance.children[0];
if (rootChild) {
var firstWidget = rootChild.children[0];
Expand All @@ -622,7 +622,7 @@ L.Control.JSDialog = L.Control.extend({
instance.posx = parentAutofilter.right;
instance.posy = parentAutofilter.top;

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

getAutoPopupParentContainer(instance) {
// Parent container will
// Parent container will
if (instance.isAutofilter || instance.isAutoCompletePopup || !instance.isDocumentAreaPopup)
return document.body
return document.getElementById('document-container');
Expand Down Expand Up @@ -752,7 +752,7 @@ L.Control.JSDialog = L.Control.extend({
this.createDialog(instance);
this.addHandlers(instance);

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.JSDialogBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ L.Control.JSDialogBuilder = L.Control.extend({

$(controls.button).on('click', clickFunction);
$(controls.label).on('click', clickFunction);
// We need a way to also handle the cutom tooltip for any tool button like save in shortcut bar
// We need a way to also handle the custom tooltip for any tool button like save in shortcut bar
if (data.isCustomTooltip) {
this._handleCutomTooltip(div, builder);
}
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.MobileWizardBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ L.Control.MobileWizardBuilder = L.Control.JSDialogBuilder.extend({

// TODO: below is not true anymore
// we still use non welded sidebar where don't have partial updates
// kayup can be used only in welded dialogs
// keyup can be used only in welded dialogs
edit.addEventListener('change', function() {
if (callback)
callback(this.value);
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.PartsPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ L.Control.PartsPreview = L.Control.extend({
//deselect all slides
this._map.deselectAll();

//reselect the first origianl selection
//reselect the first original selection
this._map.setPart(this.firstSelection);
this._map.selectPart(this.firstSelection, 1, false);

Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.Sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class Sidebar {
var isCurrent = stateHandler
? stateHandler.getItemValue(this.targetDeckCommand)
: false;
// just to be sure chack with other method
// just to be sure check with other method
if (isCurrent === 'false' || !isCurrent)
isCurrent =
this.targetDeckCommand === this.commandForDeck(currentDeck);
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Control.Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ L.Control.Tabs = L.Control.extend({
_moveSheet: function (newIndex) {
var currentTab = this._map.getCurrentPartNumber();
// odd but true: the base index changes according to the tab is dragged
// on the left or on the right wrt the current tab position
// on the left or on the right wrt. the current tab position
var newIndexZeroBased = newIndex > currentTab ? newIndex - 2 : newIndex - 1;
this._map._docLayer._sheetSwitch.updateOnSheetMoved(currentTab, newIndexZeroBased);
this._map.sendUnoCommand('.uno:Move?Copy:bool=false&UseCurrentDocument:bool=true&Index=' + newIndex);
Expand Down
4 changes: 2 additions & 2 deletions browser/src/control/Control.UIManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ L.Control.UIManager = L.Control.extend({
var showResolved = this.getBooleanDocTypePref('ShowResolved', true);
if (showResolved === false || showResolved === 'false')
this.map.sendUnoCommand('.uno:ShowResolvedAnnotations');
// Notify the inital status of comments
// Notify the initial status of comments
var initialCommentState = this.map['stateChangeHandler'].getItemValue('showannotations');
this._map.fire('commandstatechanged', {commandName : 'showannotations', state : initialCommentState});
this.map.mention = L.control.mention(this.map);
Expand Down Expand Up @@ -1282,7 +1282,7 @@ L.Control.UIManager = L.Control.extend({
/// message2 - 2nd line of message
/// buttonText - text inside button
/// callback - callback on button press
/// withCancel - specifies if needs cancal button also
/// withCancel - specifies if needs cancel button also
showInfoModal: function(id, title, message1, message2, buttonText, callback, withCancel, focusId) {
var dialogId = this.generateModalId(id);
var responseButtonId = id + '-response';
Expand Down
8 changes: 4 additions & 4 deletions browser/src/control/Control.Zotero.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,9 @@ L.Control.Zotero = L.Control.extend({
var locale = styleNode.getAttribute('locale');
if (locale)
this.settings.locale = locale;
var filedTypeNode = value.getElementsByName('fieldType');
if (filedTypeNode && filedTypeNode[0])
this.settings.fieldType = filedTypeNode[0].getAttribute('value');
var fieldTypeNode = value.getElementsByName('fieldType');
if (fieldTypeNode && fieldTypeNode[0])
this.settings.fieldType = fieldTypeNode[0].getAttribute('value');
else
this.settings.fieldType = this.getFieldType();

Expand Down Expand Up @@ -1704,7 +1704,7 @@ L.Control.Zotero = L.Control.extend({

getBibParameters: function(html) {
var field = {};
// TODO: support uncited ommited(citation) and custom sources in bibliography
// TODO: support uncited omitted (citation) and custom sources in bibliography
if (this.getFieldType() === 'Field') {
field['FieldType'] = {type: 'string', value: 'vnd.oasis.opendocument.field.UNHANDLED'};
field['FieldCommand'] = {type: 'string', value: 'ADDIN ZOTERO_BIBL ' + JSON.stringify(this.settings.bib) + ' CSL_BIBLIOGRAPHY'};
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ L.Map.include({
button.attr('title', _('Edit document'));
button.attr('aria-label', _('Edit document'));
// app.file.fileBasedView is new view that has continuous scrolling
// used for PDF and we dont permit editing for PDFs
// used for PDF and we don't permit editing for PDFs
// this._shouldStartReadOnly() is a check for files that should start in readonly mode and even on desktop browser
// we warn the user about loosing the rich formatting and offer an option to
// save as ODF instead of the current format
Expand Down
2 changes: 1 addition & 1 deletion browser/src/control/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ L.Map.include({
var docType = this.getDocType() === 'drawing' ? 'presentation' : this.getDocType();
mainSectionsQuery += ', div.' + docType + ' .section';

// Select nain sections elements within the mainDiv
// Select main sections elements within the mainDiv
var mainSections = mainDiv.querySelectorAll(mainSectionsQuery);
isAnyMatchingContent = false;

Expand Down
Loading

0 comments on commit 26b0a25

Please sign in to comment.