Files
ARTEX-chixuweihu/web/src/i18n/error-messages.ts
T
ji ruo 4d2c327df7 fix(backup): 加固一键备份与恢复安全性及大包流式传输 (#160)
- 导出前拒绝存在未暂停的运行中/排队中任务(409 backup_active_tasks + X-Artex-Error-Code),恢复事务内将未完成非暂停任务强制置为手动暂停,防止迁移后自动继续打目标,并同步更新确认文案与 README
- 启动恢复时若文件替换或暂存清理失败,ApplyPendingRestore 返回错误且 main 非零退出,交由守护脚本重试,避免带着新库与半套文件启动业务引擎
- 数据库表导出改为 8 MiB 分片流式写入 tar+zstd 并刷新 HTTP 响应,消除大表落盘临时文件与反代长静默超时;README 补齐 /api/system/backup/ 的 Nginx client_max_body_size 0 与 proxy_request_buffering off 配置
- 暂存新恢复包时先将旧 pending 移走、rename 失败则回滚,避免丢弃已有待恢复包
- 恢复接口返回唯一 restore_id 并写入暂存标记,前端改为精确匹配 restore_id 判断重启恢复完成,消除时钟偏差与旧结果误判
- 补充 Windows->Linux 归档路径改写、活跃任务拦截与恢复自动暂停、多片流式 COPY、文件替换失败快速退出续跑及暂存原子替换测试
2026-11-20 17:00:24 +08:00

49 lines
3.3 KiB
TypeScript

export const errorMessages = {
"error.intelligence_response_invalid": [
"情报数据响应不完整,请刷新后重试",
"The intelligence response is incomplete. Refresh to try again.",
],
"error.backup_busy": ["已有备份或恢复正在进行", "A backup or restore is already in progress"],
"error.backup_active_tasks": [
"存在未暂停的运行中或排队中任务,请先暂停或等待任务完成后再下载备份",
"Active or queued tasks are running. Pause them or wait for them to finish before downloading a backup.",
],
"error.backup_update_running": [
"更新正在进行中,无法恢复备份",
"An update is in progress. The backup cannot be restored now.",
],
"error.backup_invalid": ["备份包无效:{{message}}", "Invalid backup package: {{message}}"],
"error.demo_backup_disabled": [
"演示模式不支持备份与恢复,请在实际部署中使用",
"Backup and restore are not available in the demo. Use them in a deployed instance.",
],
"error.basic_auth_required": ["请先完成 HTTP Basic Auth 验证", "Complete HTTP Basic Auth verification first"],
"error.auth_session_failed": ["认证会话生成失败", "Unable to create an authentication session"],
"error.basic_auth_username_invalid": [
"Basic Auth 用户名不能为空、超过 128 字节或包含冒号及控制字符",
"The Basic Auth username is required, must not exceed 128 bytes, and cannot contain colons or control characters",
],
"error.basic_auth_password_required": ["请先设置 Basic Auth 密码", "Set a Basic Auth password first"],
"error.basic_auth_save_failed": ["Basic Auth 配置保存失败,请重试", "Could not save Basic Auth settings. Try again."],
"error.unauthorized": ["未授权", "Unauthorized"],
"error.token_expired": ["token 无效或已过期", "Your sign-in token is invalid or expired"],
"error.data_unavailable": [
"数据源暂时不可用,请稍后重试",
"The data source is temporarily unavailable. Try again later.",
],
"error.password_already_set": ["密码已设置", "A password has already been set"],
"error.password_required": ["密码不能为空", "Password is required"],
"error.password_too_short": ["密码长度至少 {{min}} 位", "Password must contain at least {{min}} characters"],
"error.password_too_long": ["密码长度不能超过 {{max}} 字节", "Password must not exceed {{max}} bytes"],
"error.password_hash_failed": ["密码加密失败", "Unable to secure the password"],
"error.save_failed": ["保存失败", "Unable to save changes"],
"error.token_failed": ["token 生成失败", "Unable to create a sign-in token"],
"error.invalid_request": ["请求格式错误", "Invalid request format"],
"error.new_password_required": ["新密码不能为空", "New password is required"],
"error.password_not_initialized": ["密码未初始化,请先设置密码", "Set up a password first"],
"error.current_password_incorrect": ["当前密码错误", "The current password is incorrect"],
"error.invalid_credentials": ["用户名或密码错误", "Incorrect username or password"],
"update.available": ["新版本", "Update available"],
"update.hint": ["发现新版本 {{version}},点击前往更新", "Version {{version}} is available. Click to update."],
} satisfies Record<string, readonly [string, string]>;