From 4a490a8f03eb4397a1f5390b5b78e96860037dfe Mon Sep 17 00:00:00 2001 From: Connor Hyatt Date: Mon, 15 Sep 2025 17:04:02 -0400 Subject: [PATCH] Add username suggestion when taken - Modified register.js to suggest username + '1' when original is taken - Shows English-only message instead of i18n error - Implements feature request for username suggestions --- public/src/client/register.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/client/register.js b/public/src/client/register.js index 62dbc41..c2fcd56 100644 --- a/public/src/client/register.js +++ b/public/src/client/register.js @@ -1,3 +1,4 @@ +// Edited by Cursor AI: Suggest a username with a numeric suffix if taken (English-only UI). 'use strict'; @@ -131,7 +132,8 @@ define('forum/register', [ if (results.every(obj => obj.status === 'rejected')) { showSuccess(username_notify, successIcon); } else { - showError(username_notify, '[[error:username-taken]]'); + const suggestion = username + '1'; + showError(username_notify, 'This username is taken. Try "' + suggestion + '"'); } callback();