mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-11-16 23:04:24 +08:00
fix(i18n): use English runtime text and localize system UI
This commit is contained in:
+38
-38
@@ -5,44 +5,44 @@
|
||||
package user
|
||||
|
||||
const (
|
||||
errBindParamsFailed = "参数绑定失败"
|
||||
errInvalidParams = "无效的参数"
|
||||
errPasswordLoginDisabled = "管理员关闭了密码登录" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errUsernameOrPasswordWrong = "用户名或密码错误" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errLoginEmailMissing = "该账号未绑定邮箱,请联系管理员绑定邮箱后再登录"
|
||||
errBindParamsFailed = "Failed to bind parameters"
|
||||
errInvalidParams = "invalid parameters"
|
||||
errPasswordLoginDisabled = "Password login is disabled by the administrator" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errUsernameOrPasswordWrong = "Incorrect username or password" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errLoginEmailMissing = "This account has no email address; contact an administrator to bind an email before signing in"
|
||||
errNeedEmailCodePrefix = "need_email_code:"
|
||||
errSMTPInvalidUseTempCodePrefix = "smtp_invalid:"
|
||||
errSMTPInvalidUseTempCode = "smtp 配置无效,使用临时码登录"
|
||||
errEmailCodeInvalidOrExpired = "验证码错误或已过期"
|
||||
errSaveSessionFailed = "无法保存会话信息,请重试"
|
||||
errRegistrationDisabled = "管理员关闭了注册"
|
||||
errPasswordTooShort = "密码长度不能少于 8 位" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errEmailOrCodeRequired = "邮箱或验证码未填写"
|
||||
errNewPasswordTooShort = "新密码长度不能少于 8 位" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errLoginRequired = "请先登录"
|
||||
errUserNotFound = "未找到该用户"
|
||||
errOldPasswordIncorrect = "原密码不正确" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errPasswordEncryptFailed = "密码加密失败,请重试" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errEmailRequired = "邮箱地址不能为空"
|
||||
errUnsupportedEmailScene = "不支持的验证场景"
|
||||
errEmailAlreadyRegistered = "该邮箱已被注册"
|
||||
errEmailCodeCooldown = "验证码发送频繁,请稍后再试"
|
||||
errLoginRateLimited = "登录尝试过于频繁,请稍后再试"
|
||||
errEmailFormatInvalid = "邮箱格式不正确"
|
||||
errEmailAlreadyBound = "该邮箱已被其他账号绑定"
|
||||
errRenderEmailTemplateFailed = "渲染验证邮件模板失败:%w"
|
||||
errGenerateEmailCodeFailed = "生成验证码失败,请重试"
|
||||
errDispatchEmailTaskFailed = "投递验证邮件发送任务失败,请重试"
|
||||
errTokenNameRequired = "令牌名称不能为空" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errAccessTokenLimitReached = "已达到访问令牌最大创建数量限制" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errGenerateTokenFailed = "生成令牌失败" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errInvalidTokenID = "无效的令牌ID" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errTokenNotFoundOrForbidden = "令牌不存在或无权操作" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errAdminTokenRequiresAdmin = "只有管理员才能创建具有管理员权限的令牌" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errTaskPayloadRequired = "任务参数不能为空"
|
||||
errInvalidJSONFormat = "无效的 JSON 格式: %w"
|
||||
errEmailTaskFieldsRequired = "to、subject、body 不能为空"
|
||||
errParseEmailPayloadFailed = "解析邮件发送参数失败: %w"
|
||||
errSMTPConfigIncomplete = "系统 SMTP 邮件服务配置不完整"
|
||||
errSendMailFailed = "发送邮件失败: %w"
|
||||
errSMTPInvalidUseTempCode = "Invalid SMTP configuration; use a temporary code to sign in"
|
||||
errEmailCodeInvalidOrExpired = "verification code is incorrect or expired"
|
||||
errSaveSessionFailed = "Unable to save session; please try again"
|
||||
errRegistrationDisabled = "Registration is disabled by the administrator"
|
||||
errPasswordTooShort = "password must contain at least 8 characters" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errEmailOrCodeRequired = "email address or verification code is missing"
|
||||
errNewPasswordTooShort = "New password must contain at least 8 characters" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errLoginRequired = "Please sign in first"
|
||||
errUserNotFound = "user was not found"
|
||||
errOldPasswordIncorrect = "current password is incorrect" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errPasswordEncryptFailed = "password encryption failed; please try again" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errEmailRequired = "email address must not be empty"
|
||||
errUnsupportedEmailScene = "Unsupported verification scenario"
|
||||
errEmailAlreadyRegistered = "email address is already registered"
|
||||
errEmailCodeCooldown = "verification codes are being requested too frequently; try again later"
|
||||
errLoginRateLimited = "Too many login attempts; try again later"
|
||||
errEmailFormatInvalid = "invalid email address format"
|
||||
errEmailAlreadyBound = "this email address is bound to another account"
|
||||
errRenderEmailTemplateFailed = "failed to render verification email template: %w"
|
||||
errGenerateEmailCodeFailed = "failed to generate verification code; please try again"
|
||||
errDispatchEmailTaskFailed = "failed to enqueue verification email task; please try again"
|
||||
errTokenNameRequired = "Token name must not be empty" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errAccessTokenLimitReached = "Maximum number of access tokens reached" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errGenerateTokenFailed = "failed to generate token" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errInvalidTokenID = "Invalid token ID" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errTokenNotFoundOrForbidden = "token was not found or access is not permitted" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errAdminTokenRequiresAdmin = "Only administrators can create tokens with administrator privileges" //nolint:gosec // false positive: this is an error message, not hardcoded credentials
|
||||
errTaskPayloadRequired = "task parameters must not be empty"
|
||||
errInvalidJSONFormat = "invalid JSON format: %w"
|
||||
errEmailTaskFieldsRequired = "to, subject and body must not be empty"
|
||||
errParseEmailPayloadFailed = "failed to parse email parameters: %w"
|
||||
errSMTPConfigIncomplete = "system SMTP configuration is incomplete"
|
||||
errSendMailFailed = "failed to send email: %w"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user