From 9823eb2201eeac62060ce6c506bec75d8f685727 Mon Sep 17 00:00:00 2001 From: Jost Schulte Date: Fri, 2 Apr 2021 22:28:07 +0200 Subject: [PATCH] Fix typos in TypeScript and SCSS files See [#5136][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5136 --- stylesheets/_modules.scss | 2 +- ts/linkPreviews/linkPreviewFetch.ts | 2 +- ts/models/conversations.ts | 8 ++++---- ts/models/messages.ts | 4 ++-- ts/sql/Queueing.ts | 2 +- ts/test-electron/linkPreviews/linkPreviewFetch_test.ts | 2 +- ts/textsecure/MessageReceiver.ts | 2 +- ts/textsecure/Storage.ts | 2 +- ts/textsecure/SyncRequest.ts | 2 +- ts/util/getAnimatedPngDataIfExists.ts | 2 +- ts/util/windowsZoneIdentifier.ts | 2 +- ts/window.d.ts | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index cce09b6a5..816b3128b 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -52,7 +52,7 @@ // Module: Message // Note: this does the same thing as module-timeline__message-container but -// can be used outside tht Timeline contact more easily. +// can be used outside the Timeline contact more easily. .module-message-container { @include button-reset; diff --git a/ts/linkPreviews/linkPreviewFetch.ts b/ts/linkPreviews/linkPreviewFetch.ts index 302026dba..13c71cc84 100644 --- a/ts/linkPreviews/linkPreviewFetch.ts +++ b/ts/linkPreviews/linkPreviewFetch.ts @@ -86,7 +86,7 @@ async function fetchWithRedirects( } urlsSeen.add(nextHrefToLoad); - // This `await` is deliberatly inside of a loop. + // This `await` is deliberately inside of a loop. // eslint-disable-next-line no-await-in-loop const response = await fetchFn(nextHrefToLoad, { ...options, diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 59c2cbd0d..a1e5cd219 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -3091,7 +3091,7 @@ export class ConversationModel extends window.Backbone.Model< } // We are only creating this model so we can use its sync message - // sending functionality. It will not be saved to the datbase. + // sending functionality. It will not be saved to the database. const message = new window.Whisper.Message(attributes); // We're offline! @@ -3201,7 +3201,7 @@ export class ConversationModel extends window.Backbone.Model< } // We are only creating this model so we can use its sync message - // sending functionality. It will not be saved to the datbase. + // sending functionality. It will not be saved to the database. const message = new window.Whisper.Message(attributes); // This is to ensure that the functions in send() and sendSyncMessage() don't save @@ -5312,11 +5312,11 @@ window.Whisper.GroupMemberConversation = window.Backbone.Model.extend({ if (!conversation) { throw new Error( - 'GroupMemberConversation.initialze: conversation required!' + 'GroupMemberConversation.initialize: conversation required!' ); } if (!window._.isBoolean(isAdmin)) { - throw new Error('GroupMemberConversation.initialze: isAdmin required!'); + throw new Error('GroupMemberConversation.initialize: isAdmin required!'); } // If our underlying conversation changes, we change too diff --git a/ts/models/messages.ts b/ts/models/messages.ts index ee7daf29b..8edf9c7d4 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -2239,7 +2239,7 @@ export class MessageModel extends window.Backbone.Model { return false; } - // We can reply if this is outgoing and delievered to at least one recipient + // We can reply if this is outgoing and delivered to at least one recipient if (isOutgoing && numDelivered > 0) { return true; } @@ -3279,7 +3279,7 @@ export class MessageModel extends window.Backbone.Model { window.textsecure.protobuf.GroupContext.Type.DELIVER; // Drop an incoming GroupV2 message if we or the sender are not part of the group - // after applying the message's associated group chnages. + // after applying the message's associated group changes. if ( type === 'incoming' && !conversation.isPrivate() && diff --git a/ts/sql/Queueing.ts b/ts/sql/Queueing.ts index 445a1a7d9..43659edf5 100644 --- a/ts/sql/Queueing.ts +++ b/ts/sql/Queueing.ts @@ -10,7 +10,7 @@ let singleQueue: Queue | null = null; let multipleQueue: Queue | null = null; // Note: we don't want queue timeouts, because delays here are due to in-progress sql -// operations. For example we might try to start a transaction when the prevous isn't +// operations. For example we might try to start a transaction when the previous isn't // done, causing that database operation to fail. function makeNewSingleQueue(): Queue { singleQueue = new Queue({ concurrency: 1 }); diff --git a/ts/test-electron/linkPreviews/linkPreviewFetch_test.ts b/ts/test-electron/linkPreviews/linkPreviewFetch_test.ts index 201d22740..55d375932 100644 --- a/ts/test-electron/linkPreviews/linkPreviewFetch_test.ts +++ b/ts/test-electron/linkPreviews/linkPreviewFetch_test.ts @@ -425,7 +425,7 @@ describe('link preview fetching', () => { ); }); - it('allows an explitly inline Content-Disposition header', async () => { + it('allows an explicitly inline Content-Disposition header', async () => { const fakeFetch = stub().resolves( makeResponse({ headers: { 'Content-Disposition': 'inline' }, diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index c77a5cd70..96f02adc1 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -1225,7 +1225,7 @@ class MessageReceiverInner extends EventTarget { const errorString = error && error.stack ? error.stack : error; window.log.error( - `maybeLightSessionReset/${id}: Enountered error`, + `maybeLightSessionReset/${id}: Encountered error`, errorString ); } diff --git a/ts/textsecure/Storage.ts b/ts/textsecure/Storage.ts index bd83856e3..76cbde586 100644 --- a/ts/textsecure/Storage.ts +++ b/ts/textsecure/Storage.ts @@ -4,7 +4,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import utils from './Helpers'; -// Default implmentation working with localStorage +// Default implementation working with localStorage const localStorageImpl: StorageInterface = { put(key: string, value: any) { if (value === undefined) { diff --git a/ts/textsecure/SyncRequest.ts b/ts/textsecure/SyncRequest.ts index 21a77bbf9..2f8a88354 100644 --- a/ts/textsecure/SyncRequest.ts +++ b/ts/textsecure/SyncRequest.ts @@ -59,7 +59,7 @@ class SyncRequestInner extends EventTarget { window.log.info('SyncRequest now sending contact sync message...'); wrap(sender.sendRequestContactSyncMessage(sendOptions)) .then(() => { - window.log.info('SyncRequest now sending group sync messsage...'); + window.log.info('SyncRequest now sending group sync message...'); return wrap(sender.sendRequestGroupSyncMessage(sendOptions)); }) .catch((error: Error) => { diff --git a/ts/util/getAnimatedPngDataIfExists.ts b/ts/util/getAnimatedPngDataIfExists.ts index be0bed055..f46567759 100644 --- a/ts/util/getAnimatedPngDataIfExists.ts +++ b/ts/util/getAnimatedPngDataIfExists.ts @@ -17,7 +17,7 @@ type AnimatedPngData = { * 2. If so, does it contain the [`acTL` chunk][1] before the [`IDAT` chunk][2], in the * first megabyte? * - * Though we _could_ only check for the precense of the `acTL` chunk anywhere, we make + * Though we _could_ only check for the presence of the `acTL` chunk anywhere, we make * sure it's before the `IDAT` chunk and within the first megabyte. This adds a small * amount of validity checking and helps us avoid problems with large PNGs. * diff --git a/ts/util/windowsZoneIdentifier.ts b/ts/util/windowsZoneIdentifier.ts index d7f164bda..1a0549fcb 100644 --- a/ts/util/windowsZoneIdentifier.ts +++ b/ts/util/windowsZoneIdentifier.ts @@ -13,7 +13,7 @@ const ZONE_IDENTIFIER_CONTENTS = Buffer.from('[ZoneTransfer]\r\nZoneId=3'); * * To do this, we write the "Zone.Identifier" for the NTFS alternative data stream. * - * This can fail in a bunch of sitations: + * This can fail in a bunch of situations: * * - The OS is not Windows. * - The filesystem is not NTFS. diff --git a/ts/window.d.ts b/ts/window.d.ts index 980dacfaa..14efe69a6 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -716,7 +716,7 @@ export type WhisperType = { }; DeliveryReceipts: { - add: (reciept: WhatIsThis) => void; + add: (receipt: WhatIsThis) => void; forMessage: (conversation: unknown, message: unknown) => Array; onReceipt: (receipt: WhatIsThis) => void; };