From 2f6481b1ab97b82fd4a0d95e1978ed4c0e7fc4a4 Mon Sep 17 00:00:00 2001 From: huishi3 Date: Thu, 9 Apr 2026 09:17:41 +0530 Subject: [PATCH] feat(i18n): add register validation messages --- web/src/i18n/locales/en.json | 8 ++++++++ web/src/i18n/locales/zh.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index b1e35669..04307172 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -234,6 +234,14 @@ "usernamePlaceholder": "3-64 characters: letters, numbers, or underscores", "emailPlaceholder": "Optional, for account identification", "passwordPlaceholder": "At least 8 characters with 3 character types", + "usernameRequired": "Username is required", + "usernameInvalid": "Username must be 3-64 characters and contain only letters, numbers, or underscores", + "emailInvalid": "Email format is invalid", + "passwordRequired": "Password is required", + "passwordTooShort": "Password must be at least 8 characters", + "passwordTooWeak": "Password must include at least 3 character types", + "usernameExists": "Username already exists", + "emailExists": "Email already exists", "submitting": "Registering...", "submit": "Register & Login", "hasAccount": "Already have an account?", diff --git a/web/src/i18n/locales/zh.json b/web/src/i18n/locales/zh.json index 41972c55..817a8f04 100644 --- a/web/src/i18n/locales/zh.json +++ b/web/src/i18n/locales/zh.json @@ -234,6 +234,14 @@ "usernamePlaceholder": "3-64 位字母、数字或下划线", "emailPlaceholder": "可选,用于后续账号识别", "passwordPlaceholder": "至少 8 位,包含 3 种字符类型", + "usernameRequired": "请输入用户名", + "usernameInvalid": "用户名需为 3-64 位,且只能包含字母、数字或下划线", + "emailInvalid": "邮箱格式不正确", + "passwordRequired": "请输入密码", + "passwordTooShort": "密码至少需要 8 位", + "passwordTooWeak": "密码至少需要包含 3 种字符类型", + "usernameExists": "用户名已存在", + "emailExists": "邮箱已存在", "submitting": "注册中...", "submit": "注册并登录", "hasAccount": "已有账号?",