From 7a4fd56ccd86518a6b14c407fc977c7904337448 Mon Sep 17 00:00:00 2001 From: luz paz Date: Tue, 7 Jun 2022 09:45:06 -0400 Subject: Fix various typos Found via `codespell -q 3 -S ./CREDITS.md,./CHANGELOG.md,./client/src/locale,./yarn.lock,./client/yarn.lock -L doubleclick,followings,nd,ot,ro,serie,splitted,tread,truthy` --- server/helpers/image-utils.ts | 2 +- server/initializers/constants.ts | 2 +- server/lib/activitypub/process/process-create.ts | 2 +- server/lib/emailer.ts | 2 +- server/lib/redis.ts | 2 +- server/lib/signup.ts | 2 +- server/middlewares/validators/users.ts | 2 +- server/models/abuse/abuse-query-builder.ts | 2 +- server/models/shared/abstract-run-query.ts | 2 +- server/models/utils.ts | 2 +- server/tests/api/check-params/abuses.ts | 4 ++-- server/tests/api/notifications/user-notifications.ts | 2 +- server/tests/api/server/contact-form.ts | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) (limited to 'server') diff --git a/server/helpers/image-utils.ts b/server/helpers/image-utils.ts index 7d6451db9..ebb102a0d 100644 --- a/server/helpers/image-utils.ts +++ b/server/helpers/image-utils.ts @@ -114,7 +114,7 @@ async function autoResize (options: { }) { const { sourceImage, newSize, destination } = options - // Portrait mode targetting a landscape, apply some effect on the image + // Portrait mode targeting a landscape, apply some effect on the image const sourceIsPortrait = sourceImage.getWidth() < sourceImage.getHeight() const destIsPortraitOrSquare = newSize.width <= newSize.height diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 824a30bd2..2d324d1eb 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -210,7 +210,7 @@ const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch re const AP_CLEANER = { CONCURRENCY: 10, // How many requests in parallel we do in activitypub-cleaner job - UNAVAILABLE_TRESHOLD: 3, // How many attemps we do before removing an unavailable remote resource + UNAVAILABLE_TRESHOLD: 3, // How many attempts we do before removing an unavailable remote resource PERIOD: parseDurationToMs('1 week') // /!\ Has to be sync with REPEAT_JOBS } diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 3e7931bb2..76ed37aae 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts @@ -124,7 +124,7 @@ async function processCreateVideoComment (activity: ActivityCreate, byActor: MAc return } - // Try to not forward unwanted commments on our videos + // Try to not forward unwanted comments on our videos if (video.isOwned()) { if (await isBlockedByServerOrAccount(comment.Account, video.VideoChannel.Account)) { logger.info('Skip comment forward from blocked account or server %s.', comment.Account.Actor.url) diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index aebca04fe..edc99057c 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts @@ -179,7 +179,7 @@ class Emailer { } } - // overriden/new variables given for a specific template in the payload + // overridden/new variables given for a specific template in the payload const sendOptions = merge(baseOptions, options) await email.send(sendOptions) diff --git a/server/lib/redis.ts b/server/lib/redis.ts index d052de786..158f3c080 100644 --- a/server/lib/redis.ts +++ b/server/lib/redis.ts @@ -308,7 +308,7 @@ class Redis { return this.deleteKey('resumable-upload-' + uploadId) } - /* ************ AP ressource unavailability ************ */ + /* ************ AP resource unavailability ************ */ async addAPUnavailability (url: string) { const key = this.generateAPUnavailabilityKey(url) diff --git a/server/lib/signup.ts b/server/lib/signup.ts index 3c1397a12..f094531eb 100644 --- a/server/lib/signup.ts +++ b/server/lib/signup.ts @@ -26,7 +26,7 @@ function isSignupAllowedForCurrentIP (ip: string) { const excludeList = [ 'blacklist' ] let matched = '' - // if there is a valid, non-empty whitelist, we exclude all unknown adresses too + // if there is a valid, non-empty whitelist, we exclude all unknown addresses too if (CONFIG.SIGNUP.FILTERS.CIDR.WHITELIST.filter(cidr => isCidr(cidr)).length > 0) { excludeList.push('unknown') } diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index bc6007c6d..6d306121e 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -486,7 +486,7 @@ const ensureAuthUserOwnsAccountValidator = [ if (res.locals.account.id !== user.Account.id) { return res.fail({ status: HttpStatusCode.FORBIDDEN_403, - message: 'Only owner of this account can access this ressource.' + message: 'Only owner of this account can access this resource.' }) } diff --git a/server/models/abuse/abuse-query-builder.ts b/server/models/abuse/abuse-query-builder.ts index 025e6ba55..cfc924ba4 100644 --- a/server/models/abuse/abuse-query-builder.ts +++ b/server/models/abuse/abuse-query-builder.ts @@ -13,7 +13,7 @@ export type BuildAbusesQueryOptions = { searchReporter?: string searchReportee?: string - // video releated + // video related searchVideo?: string searchVideoChannel?: string videoIs?: AbuseVideoIs diff --git a/server/models/shared/abstract-run-query.ts b/server/models/shared/abstract-run-query.ts index f1182c7be..7f27a0c4b 100644 --- a/server/models/shared/abstract-run-query.ts +++ b/server/models/shared/abstract-run-query.ts @@ -2,7 +2,7 @@ import { QueryTypes, Sequelize, Transaction } from 'sequelize' /** * - * Abstact builder to run video SQL queries + * Abstract builder to run video SQL queries * */ diff --git a/server/models/utils.ts b/server/models/utils.ts index 88e31f22e..c468f748d 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts @@ -119,7 +119,7 @@ function getInstanceFollowsSort (value: string, lastSort: OrderItem = [ 'id', 'A function isOutdated (model: { createdAt: Date, updatedAt: Date }, refreshInterval: number) { if (!model.createdAt || !model.updatedAt) { - throw new Error('Miss createdAt & updatedAt attribuets to model') + throw new Error('Miss createdAt & updatedAt attributes to model') } const now = Date.now() diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts index c4b051723..bc2cc640f 100644 --- a/server/tests/api/check-params/abuses.ts +++ b/server/tests/api/check-params/abuses.ts @@ -269,7 +269,7 @@ describe('Test abuses API validators', function () { await makePostBodyRequest({ url: server.url, path, token: userToken, fields }) }) - it('Should succeed with the corret parameters (advanced)', async function () { + it('Should succeed with the correct parameters (advanced)', async function () { const fields: AbuseCreate = { video: { id: server.store.videoCreated.id, @@ -333,7 +333,7 @@ describe('Test abuses API validators', function () { await command.addMessage({ token: userToken, abuseId, message: 'a'.repeat(5000), expectedStatus: HttpStatusCode.BAD_REQUEST_400 }) }) - it('Should suceed with the correct params', async function () { + it('Should succeed with the correct params', async function () { const res = await command.addMessage({ token: userToken, abuseId, message }) messageId = res.body.abuseMessage.id }) diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts index a7cc529f8..a11289236 100644 --- a/server/tests/api/notifications/user-notifications.ts +++ b/server/tests/api/notifications/user-notifications.ts @@ -545,7 +545,7 @@ describe('Test user notifications', function () { await servers[1].subscriptions.remove({ uri: 'user_1_channel@localhost:' + servers[0].port }) }) - // PeerTube does not support accout -> account follows + // PeerTube does not support account -> account follows // it('Should notify when a local account is following one of our channel', async function () { // this.timeout(50000) // diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts index 4f01f6fd5..d6165b293 100644 --- a/server/tests/api/server/contact-form.ts +++ b/server/tests/api/server/contact-form.ts @@ -61,7 +61,7 @@ describe('Test contact form', function () { expect(email['text']).contains('my super message') }) - it('Should not have duplicated email adress in text message', async function () { + it('Should not have duplicated email address in text message', async function () { const text = emails[0]['text'] as string const matches = text.match(/toto@example.com/g) -- cgit v1.2.3