refactor(i18n): U40 Monitor + Agent 子组件残余硬编码中文 i18n 补全 — 14 文件 ~50 处→0

- ContextSwitchCard: CTX/IRQ/次 → t()
- ProcessTable: agentWaitData/cpuUsagePercent → t()
- FDUsageCard: fdHandles → t()
- PortMonitorTab: 黑名单/白名单/策略配置/暂无端口数据 → t()
- PortPolicyDialog: 白名单全量上报/黑名单仅上报/端口列表/逗号分隔/白名单无需配置/已输入端口 → t()
- HostTimeRangePicker: 时间范围/自定义/取消/应用 → t()
- DualLineChart: 接收/发送 → t(), i18n.t→useTranslation hook
- ZoomableAreaChart: 暂无数据 → t()
- SiteResultsPanel: 选择任务/次/可用率/立即拨测/SSL证书预警/到期/剩余/阈值/天 → t()
- MiddlewareMonitor: Redis单机集群/上次更新/添加平台默认/暂无实例 → t()
- SiteMonitor: subtitle → t()
- SNMPMonitor: 标题/采集间隔/IP地址/OID模板/SNMP版本/确认/暂无设备/采集指标/暂无指标 → t()
- HealthProbeSection: TCP目标地址/TCP端口 → t()
- AgentAlerts: Agent告警/刷新/未恢复/已恢复/恢复/新建规则/创建第一条规则 → i18n.t()

新增 monitor.lbl 46 语义化翻译键 + agent.alerts 6 键
zh/en 7762→7814 对齐
tsc -b=0, npm build✓ (16.88s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-13 19:45:45 +08:00
1 parent 70a7c2907c
commit 4e2ba77aa8
17 files changed
+165 -61

No files matched your search

+54 -3
View File
@@ -4377,7 +4377,53 @@
"noProbeHint": "No health probes. Click \"{{action}}\" to create one.",
"searchFields": "Search fields",
"receiveSend": "RX {{rx}} · TX {{tx}}",
"currentFDUsage": "Current {{pct}}%"
"currentFDUsage": "Current {{pct}}%",
"ctxPerSec": "CTX switches/sec",
"irqPerSec": "IRQ interrupts/sec",
"times": "times",
"agentWaitData": "Agent v2.0+ required, waiting for data…",
"cpuUsagePercent": "CPU Usage(%)",
"fdHandles": "FD File Handles",
"blacklistLabel": "Blacklist",
"whitelistModeLabel": "Whitelist mode",
"policyConfig": "Policy Config",
"noPortData": "No port data",
"whitelistFullReport": "Whitelist — Report all",
"blacklistSelectedOnly": "Blacklist — Report selected only",
"portListLabel": "Port list",
"portListHint": "(comma-separated, e.g.: 80,443,3306,6379)",
"whitelistNoConfig": "— No config needed in whitelist mode",
"portsEntered": "{{count}} ports entered",
"timeRange": "Time range",
"custom": "Custom",
"apply": "Apply",
"rx": "RX",
"tx": "TX",
"noData": "No data",
"selectTaskHint": "Select a task to view protocol-specific metrics",
"probeNow": "Probe now",
"sslCertWarning": "SSL Certificate Warning",
"sslExpiring": "Expires",
"sslRemaining": "remaining",
"sslThreshold": "threshold",
"sslDays": "days",
"availabilityRate": "Availability",
"redisMysqlAutoRefresh": "Redis standalone/cluster · MySQL · 30s auto refresh",
"lastUpdate": "Last update",
"addPlatformDefault": "Add platform default",
"noInstancePrefix": "No",
"instanceSuffix": "instances",
"siteMonitorSubtitle": "HTTP Web probe · SSL cert detection · TCP / DNS / PING",
"snmpMonitorTitle": "SNMP Monitor",
"snmpCollectInterval": "5 min collection · 7 day retention",
"tcpTargetAddr": "TCP target address",
"tcpPort": "TCP port",
"ipAddress": "IP address",
"snmpOidTemplate": "OID Template",
"snmpVersion": "SNMP Version",
"snmpNoDevice": "No SNMP devices. Click \"Add Device\" to start monitoring.",
"snmpCollectMetrics": "Collected Metrics",
"snmpNoMetrics": "No metrics yet. Please collect first."
},
"logAlertBell": {
"linked": "Alert Policy Linked",
@@ -7043,7 +7089,7 @@
"loadFailed": "Failed to load alert data",
"resolveAlert": "Resolve Alert",
"resolveConfirm": "Mark this alert as resolved?",
"resolved": "Alert resolved",
"resolved": "Resolved",
"deleteRule": "Delete Rule",
"thresholdTriggered": "Alert threshold triggered",
"noResolved": "No resolved alerts",
@@ -7051,7 +7097,12 @@
"metricSwap": "Swap Usage",
"metricLoad1": "1-min Load Average",
"metricInode": "Inode Usage",
"metricTcpEst": "TCP Established"
"metricTcpEst": "TCP Established",
"title": "Agent Alerts",
"unresolved": "Unresolved",
"resolve": "Resolve",
"newRule": "New Rule",
"createFirstRule": "Create your first rule"
},
"allPortsHint": "All ports reported automatically",
"allPortsMode": "All Ports",
+54 -3
View File
@@ -4377,7 +4377,53 @@
"noProbeHint": "暂无健康探针,点击「{{action}}」创建",
"searchFields": "搜索字段",
"receiveSend": "接收 {{rx}} · 发送 {{tx}}",
"currentFDUsage": "当前 {{pct}}%"
"currentFDUsage": "当前 {{pct}}%",
"ctxPerSec": "CTX 切换/秒",
"irqPerSec": "IRQ 中断/秒",
"times": "次",
"agentWaitData": "Agent v2.0+ 支持,等待数据上报…",
"cpuUsagePercent": "CPU使用率(%)",
"fdHandles": "FD 文件句柄",
"blacklistLabel": "黑名单",
"whitelistModeLabel": "白名单模式",
"policyConfig": "策略配置",
"noPortData": "暂无端口数据",
"whitelistFullReport": "白名单 ─ 全量上报",
"blacklistSelectedOnly": "黑名单 ─ 仅上报选中",
"portListLabel": "端口列表",
"portListHint": "(逗号分隔,如: 80,443,3306,6379)",
"whitelistNoConfig": "— 白名单模式无需配置",
"portsEntered": "已输入 {{count}} 个端口",
"timeRange": "时间范围",
"custom": "自定义",
"apply": "应用",
"rx": "接收",
"tx": "发送",
"noData": "暂无数据",
"selectTaskHint": "选择任务查看协议专属可观测指标",
"probeNow": "立即拨测",
"sslCertWarning": "SSL 证书预警",
"sslExpiring": "到期",
"sslRemaining": "剩余",
"sslThreshold": "阈值",
"sslDays": "天",
"availabilityRate": "可用率",
"redisMysqlAutoRefresh": "Redis 单机/集群 · MySQL · 30s 自动刷新",
"lastUpdate": "上次更新",
"addPlatformDefault": "添加平台默认",
"noInstancePrefix": "暂无",
"instanceSuffix": "实例",
"siteMonitorSubtitle": "HTTP Web 拨测 · SSL 证书检测 · TCP / DNS / PING",
"snmpMonitorTitle": "SNMP 监控",
"snmpCollectInterval": "5 分钟采集 · 指标保留 7 天",
"tcpTargetAddr": "TCP 目标地址",
"tcpPort": "TCP 端口",
"ipAddress": "IP 地址",
"snmpOidTemplate": "OID 模板",
"snmpVersion": "SNMP 版本",
"snmpNoDevice": "暂无 SNMP 设备,点击「添加设备」开始监控",
"snmpCollectMetrics": "采集指标",
"snmpNoMetrics": "暂无指标,请先采集"
},
"logAlertBell": {
"linked": "已关联告警策略",
@@ -7043,7 +7089,7 @@
"loadFailed": "加载告警数据失败",
"resolveAlert": "恢复告警",
"resolveConfirm": "确定将此告警标记为已恢复?",
"resolved": "告警已恢复",
"resolved": "已恢复",
"deleteRule": "删除规则",
"thresholdTriggered": "触发告警阈值",
"noResolved": "暂无已恢复的告警",
@@ -7051,7 +7097,12 @@
"metricSwap": "Swap 使用率",
"metricLoad1": "1分钟负载",
"metricInode": "Inode 使用率",
"metricTcpEst": "TCP 已建立"
"metricTcpEst": "TCP 已建立",
"title": "Agent 告警",
"unresolved": "未恢复",
"resolve": "恢复",
"newRule": "新建规则",
"createFirstRule": "创建第一条规则"
},
"allPortsHint": "全部端口自动上报",
"allPortsMode": "全量上报",