feat(i18n): 安全审计模块全量国际化 — 7 文件硬编码中文改翻译键 + audit 命名空间(89 键)

迁移文件:
- AuditOperationsTab.tsx — 操作审计(搜索/筛选/虚拟滚动表格/详情弹窗/统计弹窗)
- TerminalAuditTab.tsx — 终端审计子标签(在线/历史/命令)
- LoginLogsTab.tsx — 登录日志(DataTable + 状态筛选 + 登录方式)
- ActiveSessionsPanel.tsx — 在线会话(自动刷新 + 阻断确认 + 实时监控)
- HistorySessionsPanel.tsx — 历史会话(回放/下载录制)
- SessionCommandsPanel.tsx — 会话命令(虚拟滚动)
- helpers.tsx — formatDuration/getStatusBadge (i18n.t 非组件模式)

翻译键: audit 命名空间 89 键 (operations/login/terminal 三子域)
  + common.duration 时长单位(秒/分/时)
总键数: 481→610, 命名空间: 8→9 (common/menu/header/login/dashboard/server/alert/approval/audit)
zh-CN/en-US 完全对齐, tsc -b=0, npm build✓, 17/17 测试通过
This commit is contained in:
attacker committed 2026-06-29 20:44:08 +08:00
1 parent fef4997391
commit 186ece6495
10 files changed
+375 -141

No files matched your search

+110 -1
View File
@@ -71,7 +71,14 @@
"operationSuccess": "操作成功",
"operationFailed": "操作失败",
"loadFailed": "加载失败",
"saveFailed": "保存失败"
"saveFailed": "保存失败",
"duration": {
"sec": "{{count}}秒",
"min": "{{count}}分",
"minSec": "{{m}}分{{s}}秒",
"hour": "{{count}}时",
"hourMin": "{{h}}时{{m}}分"
}
},
"menu": {
"dashboard": "仪表盘",
@@ -545,5 +552,107 @@
"templateNotLoaded": "模板未加载",
"pleaseFill": "请填写「{{label}}」"
}
},
"audit": {
"operations": {
"searchPlaceholder": "搜索操作日志...",
"allModules": "全部模块",
"allActions": "全部操作",
"noData": "暂无操作日志",
"viewDetail": "查看详情",
"totalLogs": "共 {{count}} 条日志",
"virtualScroll": "虚拟滚动渲染",
"detailTitle": "操作日志详情",
"statsTitle": "审计统计",
"noStats": "暂无统计数据",
"topModules": "热门模块",
"topUsers": "活跃用户",
"col": {
"time": "时间",
"user": "用户",
"module": "模块",
"actionType": "操作类型",
"resource": "资源",
"ip": "IP",
"result": "结果",
"detail": "详情"
},
"detailCol": {
"userId": "用户ID",
"ipAddress": "IP地址",
"userAgent": "User-Agent",
"message": "详情"
},
"stats": {
"totalLogs": "总日志数",
"todayLogs": "今日日志",
"successCount": "成功数",
"failureCount": "失败数"
}
},
"login": {
"searchPlaceholder": "搜索用户/IP/归属地...",
"noData": "暂无登录日志",
"all": "全部",
"col": {
"loginTime": "登录时间",
"user": "用户",
"loginType": "登录方式",
"ip": "IP",
"location": "归属地",
"browser": "浏览器/OS",
"status": "状态"
},
"type": {
"password": "密码登录",
"ldap": "LDAP",
"token": "Token",
"oauth": "OAuth"
}
},
"terminal": {
"searchUserServer": "搜索用户/服务器...",
"searchUserServerIp": "搜索用户/服务器/IP...",
"searchUserCommand": "搜索用户/命令...",
"sessionIdPlaceholder": "会话 ID(可选)",
"noActive": "暂无在线会话",
"noHistory": "暂无历史会话",
"noCommands": "暂无会话命令记录",
"totalCommands": "共 {{count}} 条命令",
"virtualScroll": "虚拟滚动渲染",
"autoRefresh": "自动刷新",
"autoRefreshHintOn": "每 {{sec}}s 自动刷新 · 点击关闭",
"autoRefreshHintOff": "点击开启自动刷新",
"killTitle": "阻断会话",
"killConfirm": "确认强制断开用户「{{user}}」的当前会话吗?",
"killConfirmBtn": "阻断",
"liveMonitor": "实时查看",
"replay": "回放",
"downloadRecord": "下载录制",
"tab": {
"active": "在线会话",
"history": "历史会话",
"commands": "会话命令"
},
"col": {
"id": "ID",
"user": "用户",
"targetServer": "目标服务器",
"port": "端口",
"startTime": "开始时间",
"endTime": "结束时间",
"duration": "时长",
"status": "状态",
"actions": "操作",
"command": "命令",
"outputSize": "输出大小",
"sessionRef": "关联会话"
},
"status": {
"active": "活动中",
"failed": "失败",
"closed": "已关闭"
}
}
}
}