From 61f25086c3d75f4fcf44ec97f53bb63081fc0865 Mon Sep 17 00:00:00 2001 From: loselarry <166403105+loselarry@users.noreply.github.com> Date: Thu, 25 Apr 2024 05:15:18 +0800 Subject: [PATCH] chore: fix some typos in comments (#3108) Signed-off-by: loselarry --- cmd/users_import.go | 4 ++-- frontend/src/utils/clipboard.ts | 2 +- frontend/src/utils/upload.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/users_import.go b/cmd/users_import.go index f0e1a513..dee9d759 100644 --- a/cmd/users_import.go +++ b/cmd/users_import.go @@ -60,7 +60,7 @@ list or set it to 0.`, // User exists in DB. if err == nil { if !overwrite { - checkErr(errors.New("user " + strconv.Itoa(int(user.ID)) + " is already registred")) + checkErr(errors.New("user " + strconv.Itoa(int(user.ID)) + " is already registered")) } // If the usernames mismatch, check if there is another one in the DB @@ -84,6 +84,6 @@ list or set it to 0.`, } func usernameConflictError(username string, originalID, newID uint) error { - return fmt.Errorf(`can't import user with ID %d and username "%s" because the username is already registred with the user %d`, + return fmt.Errorf(`can't import user with ID %d and username "%s" because the username is already registered with the user %d`, newID, username, originalID) } diff --git a/frontend/src/utils/clipboard.ts b/frontend/src/utils/clipboard.ts index 352d9ae7..51851007 100644 --- a/frontend/src/utils/clipboard.ts +++ b/frontend/src/utils/clipboard.ts @@ -22,7 +22,7 @@ export function copy(text: string) { } }) .catch((e) => { - // Firefox doesnt support clipboard-write permission + // Firefox doesn't support clipboard-write permission if (navigator.userAgent.indexOf("Firefox") != -1) { navigator.clipboard.writeText(text).then(resolve).catch(reject); } else { diff --git a/frontend/src/utils/upload.ts b/frontend/src/utils/upload.ts index 806bc78f..e7ce8bec 100644 --- a/frontend/src/utils/upload.ts +++ b/frontend/src/utils/upload.ts @@ -35,7 +35,7 @@ export function scanFiles(dt: DataTransfer): Promise { const contents: UploadList = []; if (dt.items) { - // ts didnt like the for of loop even tho + // ts didn't like the for of loop even tho // it is the official example on MDN // for (const item of dt.items) { for (let i = 0; i < dt.items.length; i++) {