From 5b702b6ba25acf03ed47f6cee1fb2677ceaaecfe Mon Sep 17 00:00:00 2001 From: Lucas Lin Date: Mon, 16 Sep 2024 15:54:18 -0400 Subject: [PATCH 1/2] Made changes to code to suggest username when duplicate --- public/language/en-US/error.json | 2 +- public/src/client/register.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/language/en-US/error.json b/public/language/en-US/error.json index 4191fad..6fd761f 100644 --- a/public/language/en-US/error.json +++ b/public/language/en-US/error.json @@ -31,7 +31,7 @@ "invalid-path": "Invalid path", "folder-exists": "Folder exists", "invalid-pagination-value": "Invalid pagination value, must be at least %1 and at most %2", - "username-taken": "Username taken", + "username-taken": "Username taken. Maybe try %1", "email-taken": "Email taken", "email-nochange": "The email entered is the same as the email already on file.", "email-invited": "Email was already invited", diff --git a/public/src/client/register.js b/public/src/client/register.js index 62dbc41..b2c9ca4 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -131,7 +131,7 @@ define('forum/register', [ if (results.every(obj => obj.status === 'rejected')) { showSuccess(username_notify, successIcon); } else { - showError(username_notify, '[[error:username-taken]]'); + showError(username_notify, '[[error:username-taken, "${username}suffix]]'); } callback(); From de064019c9af49a63072b27e93975d437e1c08c3 Mon Sep 17 00:00:00 2001 From: Lucas Lin Date: Mon, 16 Sep 2024 15:59:17 -0400 Subject: [PATCH 2/2] Minor changes to fix bug in register.js --- public/src/client/register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/register.js b/public/src/client/register.js index b2c9ca4..ba66da2 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -131,7 +131,7 @@ define('forum/register', [ if (results.every(obj => obj.status === 'rejected')) { showSuccess(username_notify, successIcon); } else { - showError(username_notify, '[[error:username-taken, "${username}suffix]]'); + showError(username_notify, '[[error:username-taken, "${username}suffix"]]'); } callback();