refactor(i18n): U23 Task 模块 i18n 治理 — 4 文件 phantom key + hash key + 硬编码中文清零
- CronJobManager/CronJobFormDialog/ScriptManager/RemoteExecPage
从 import i18n 全局调用改为 useTranslation() hook
- 42 处 phantom key (i18n.t('Chinese text') → 语义化键)
- 28 个孤儿 hash key 清理 (cronjobformdial.s*/remoteexecpaget.s*)
- 50+ 处硬编码 JSX 中文 → t() 调用
- 新增 task.cronJob.*/task.scriptList.*/task.remoteExec.* 子命名空间
- zh/en 6825→6886 keys 对齐
- tsc -b=0, npm build✓ (17.46s), ESLint=0/45/0, go build=0
- 17/17 集成回归测试通过
This commit is contained in:
1 parent
a8f6fd190b
commit
de6f9454fc
7 files changed
+361
-229
No files matched your search
@@ -4520,6 +4520,56 @@
|
||||
"minutesAgo": "{{count}} 分钟前",
|
||||
"hoursAgo": "{{count}} 小时前",
|
||||
"daysAgo": "{{count}} 天前"
|
||||
},
|
||||
"form": {
|
||||
"titleCreate": "新建定时任务",
|
||||
"titleEdit": "编辑定时任务",
|
||||
"desc": "配置 Cron 定时任务,支持脚本关联和自定义命令",
|
||||
"labelName": "任务名称",
|
||||
"labelDesc": "描述",
|
||||
"labelCronExpr": "Cron 表达式",
|
||||
"labelJobType": "执行类型",
|
||||
"labelScript": "选择脚本",
|
||||
"labelCommand": "命令",
|
||||
"placeholderName": "例如: 数据库备份",
|
||||
"placeholderCommand": "/scripts/backup.sh arg1 arg2",
|
||||
"quickSelect": "快速选择",
|
||||
"cronHint": "格式: 分 时 日 月 周",
|
||||
"noScriptType": "脚本库中没有 {{type}} 脚本",
|
||||
"noScriptHint": "请先到「脚本库」创建 {{type}} 脚本",
|
||||
"selectScriptPlaceholder": "选择脚本库中的脚本...",
|
||||
"emptyScript": "(空脚本)",
|
||||
"scriptLines": "{{count}} 行",
|
||||
"cancel": "取消",
|
||||
"toastNameRequired": "请填写任务名称和 Cron 表达式",
|
||||
"toastSaved": "任务更新成功"
|
||||
},
|
||||
"typeShell": "关联脚本库中的 Shell 脚本",
|
||||
"typePython": "关联脚本库中的 Python 脚本",
|
||||
"typePowershell": "关联脚本库中的 PowerShell 脚本",
|
||||
"typeCommandDesc": "手动输入命令或脚本路径",
|
||||
"typeCommandLabel": "自定义命令",
|
||||
"list": {
|
||||
"subtitle": "Cron 调度 · 脚本执行 · 内置系统任务",
|
||||
"searchPlaceholder": "搜索名称、描述、脚本…",
|
||||
"filterStatus": "状态",
|
||||
"filterHealth": "健康",
|
||||
"filterType": "类型",
|
||||
"selectAll": "全选",
|
||||
"batchDelete": "删除",
|
||||
"clearFilter": "清除筛选",
|
||||
"filterResult": "筛选结果 {{shown}}/{{total}}",
|
||||
"selectedCount": "已选 {{count}}",
|
||||
"allHistory": "全部历史",
|
||||
"refresh": "刷新",
|
||||
"create": "新建",
|
||||
"createTask": "新建任务",
|
||||
"delete": "删除定时任务",
|
||||
"toastToggled": "状态已切换",
|
||||
"toastDeleted": "已删除 {{count}} 个任务",
|
||||
"batchDeleteConfirm": "确定删除选中的 {{count}} 个任务吗?此操作不可恢复。",
|
||||
"confirmDelete": "确定删除「{{name}}」吗?此操作不可恢复。",
|
||||
"execDuration": "耗时 {{ms}}ms"
|
||||
}
|
||||
},
|
||||
"script": {
|
||||
@@ -4566,34 +4616,53 @@
|
||||
"noPython": "Python 未安装,Python 类型脚本将无法执行。",
|
||||
"partialUnavailable": "部分解释器不可用,对应类型的脚本创建后无法执行。"
|
||||
},
|
||||
"remoteexecpaget.seb6e67f1": "批量执行命令",
|
||||
"remoteexecpaget.s30048caa": "批量上传文件",
|
||||
"remoteexecpaget.sb7e21a1e": "选择本地文件",
|
||||
"remoteexecpaget.sb47f0323": "远程目标路径(目录则自动追加文件名)",
|
||||
"cronjobformdial.s2e10ee70": "配置 Cron 定时任务",
|
||||
"cronjobformdial.s3b56b1f9": "格式: 分 时 日 月 周",
|
||||
"cronjobformdial.s15d864c1": "执行类型",
|
||||
"systemtaskspanel.s4d5e6f7g": "内置",
|
||||
"systemtaskspanel.s5e6f7g8h": "进程内置调度,不可编辑;清理与成本类任务支持手动触发",
|
||||
"systemtaskspanel.s6f7g8h9i": "{{count}} 个任务",
|
||||
"systemtaskspanel.s7g8h9i0j": "{{count}} 个失败",
|
||||
"systemtaskspanel.s8h9i0j1k": "任务",
|
||||
"systemtaskspanel.s9i0j1k2l": "调度 / 说明",
|
||||
"systemtaskspanel.s0j1k2l3m": "最近执行",
|
||||
"systemtaskspanel.s1k2l3m4n": "操作",
|
||||
"systemtaskspanel.s2l3m4n5o": "保留 {{days}} 天",
|
||||
"systemtaskspanel.s3m4n5o6p": "{{count}} 次",
|
||||
"systemtaskspanel.s4n5o6p7q": "自动",
|
||||
"systemtaskspanel.s5o6p7q8r": "立即执行",
|
||||
"systemtaskspanel.s6p7q8r9s": "确定手动执行系统任务「{{name}}」吗?",
|
||||
"systemtaskspanel.s7q8r9s0t": "执行",
|
||||
"systemtaskspanel.s8r9s0t1u": "执行完成",
|
||||
"systemtaskspanel.s9s0t1u2v": "执行失败",
|
||||
"systemtaskspanel.s0t1u2v3w": "加载系统任务失败",
|
||||
"systemtaskspanel.s1u2v3w4x": "暂无系统任务",
|
||||
"systemtaskspanel.monitor": "监控",
|
||||
"systemtaskspanel.cleanup": "清理",
|
||||
"systemtaskspanel.finops": "成本"
|
||||
"scriptList": {
|
||||
"subtitle": "脚本编辑与管理",
|
||||
"refresh": "刷新",
|
||||
"create": "新建脚本",
|
||||
"batchDelete": "批量删除",
|
||||
"cancelSelect": "取消选择",
|
||||
"selectedCount": "已选择 {{selected}} 项 / 共 {{total}} 项",
|
||||
"empty": "暂无脚本",
|
||||
"emptyHint": "点击「新建脚本」创建第一个",
|
||||
"delete": "删除脚本",
|
||||
"confirmDelete": "确定删除「{{name}}」吗?此操作不可恢复。",
|
||||
"batchDeleteConfirm": "确定删除选中的 {{count}} 个脚本吗?此操作不可恢复。",
|
||||
"toastDeleted": "已删除 {{count}} 个脚本",
|
||||
"toastFetchFailed": "获取脚本列表失败",
|
||||
"toastSaved": "脚本更新成功",
|
||||
"toastNameRequired": "请填写脚本名称和内容",
|
||||
"copySuffix": "(副本)"
|
||||
},
|
||||
"remoteExec": {
|
||||
"subtitle": "关联主机后批量执行命令 / 上传文件(Go-native SSH)",
|
||||
"refresh": "刷新",
|
||||
"searchPlaceholder": "搜索 主机名/IP",
|
||||
"emptyHint": "请先在「服务器管理」添加",
|
||||
"selectAllCount": "全选({{count}} 台)",
|
||||
"selectedCount": "已选 {{count}}",
|
||||
"tabExec": "执行命令",
|
||||
"tabUpload": "上传文件",
|
||||
"execTitle": "批量执行命令",
|
||||
"execPlaceholder": "输入要在选中主机上执行的 shell 命令,例如:df -h | head -5",
|
||||
"execButton": "执行({{count}} 台)",
|
||||
"execResultTitle": "执行结果",
|
||||
"uploadTitle": "批量上传文件",
|
||||
"uploadFileLabel": "选择本地文件",
|
||||
"uploadPathLabel": "远程目标路径(目录则自动追加文件名)",
|
||||
"uploadPathPlaceholder": "/tmp/ 或 /opt/app/config.yaml",
|
||||
"uploadButton": "上传({{count}} 台)",
|
||||
"toastFetchFailed": "加载服务器列表失败",
|
||||
"toastCommandRequired": "请输入要执行的命令",
|
||||
"toastHostRequired": "请至少选择一台主机",
|
||||
"toastFileRequired": "请选择要上传的文件",
|
||||
"toastPathRequired": "请填写远程目标路径",
|
||||
"toastExecResult": "执行完成:{{success}}/{{total}} 成功",
|
||||
"toastUploadResult": "上传完成:{{success}}/{{total}} 成功",
|
||||
"toastExecConfirm": "确认批量执行命令",
|
||||
"toastExecConfirmDesc": "将在 {{count}} 台主机上执行该命令,请确认命令安全:\n\n{{command}}",
|
||||
"noOutput": "(无输出)"
|
||||
}
|
||||
},
|
||||
"rbac": {
|
||||
"logRole": {
|
||||
|
||||
Reference in new issue
Block a user