feat: 添加认证错误 i18n 翻译
- 添加常见认证错误代码的翻译(中英文) - 修改 AuthForm 组件处理错误代码 - 支持的错误类型: - INVALID_USERNAME_OR_PASSWORD: 用户名或密码错误 - USER_NOT_FOUND: 用户不存在 - EMAIL_ALREADY_EXISTS: 邮箱已被注册 - USERNAME_ALREADY_EXISTS: 用户名已被占用 - WEAK_PASSWORD: 密码强度不够 - INVALID_EMAIL: 邮箱格式不正确 - VALIDATION_ERROR: 输入信息格式错误 - NETWORK_ERROR: 网络连接失败 - UNKNOWN_ERROR: 未知错误 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -181,7 +181,18 @@
|
||||
"loginFailed": "Login failed",
|
||||
"registerFailed": "Registration failed",
|
||||
"noAccountRegister": "No account? Register",
|
||||
"haveAccountLogin": "Already have an account? Login"
|
||||
"haveAccountLogin": "Already have an account? Login",
|
||||
"errors": {
|
||||
"INVALID_USERNAME_OR_PASSWORD": "Invalid username or password",
|
||||
"USER_NOT_FOUND": "User not found",
|
||||
"EMAIL_ALREADY_EXISTS": "Email already exists",
|
||||
"USERNAME_ALREADY_EXISTS": "Username already taken",
|
||||
"WEAK_PASSWORD": "Password is too weak",
|
||||
"INVALID_EMAIL": "Invalid email format",
|
||||
"VALIDATION_ERROR": "Validation error",
|
||||
"NETWORK_ERROR": "Network connection failed",
|
||||
"UNKNOWN_ERROR": "Unknown error, please try again later"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,18 @@
|
||||
"loginFailed": "登录失败",
|
||||
"registerFailed": "注册失败",
|
||||
"noAccountRegister": "没有账号?去注册",
|
||||
"haveAccountLogin": "已有账号?去登录"
|
||||
"haveAccountLogin": "已有账号?去登录",
|
||||
"errors": {
|
||||
"INVALID_USERNAME_OR_PASSWORD": "用户名或密码错误",
|
||||
"USER_NOT_FOUND": "用户不存在",
|
||||
"EMAIL_ALREADY_EXISTS": "邮箱已被注册",
|
||||
"USERNAME_ALREADY_EXISTS": "用户名已被占用",
|
||||
"WEAK_PASSWORD": "密码强度不够",
|
||||
"INVALID_EMAIL": "邮箱格式不正确",
|
||||
"VALIDATION_ERROR": "输入信息格式错误",
|
||||
"NETWORK_ERROR": "网络连接失败",
|
||||
"UNKNOWN_ERROR": "未知错误,请稍后重试"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user