refactor(i18n): U24 Monitor 模块 i18n hook 迁移 — 26 个 .tsx 文件从全局 i18n.t() 迁移到 useTranslation() hook + 89 个 phantom 中文文本键替换为 monitor.lbl.* 语义化键

- 新增 monitor.lbl 翻译子命名空间 89 键(HostMonitor/Middleware/Site/SNMP/Shared)
- 26 .tsx: import i18n → useTranslation() hook + i18n.t('中文') → t('monitor.lbl.semanticKey')
- 模块级代码(TABS/METRIC_CATEGORIES)保留 i18n.t() + 语义化键
- 1 .ts helpers 文件 phantom 键替换
- zh/en 6886→6975 +89 键对齐
- tsc -b=0, npm build✓ (17.16s), ESLint=0/53/0, go build=0, Docker healthy
This commit is contained in:
attacker committed 2026-07-11 20:15:44 +08:00
1 parent de6f9454fc
commit d21eac9117
29 files changed
+520 -284

No files matched your search

+91
View File
@@ -4492,6 +4492,97 @@
"userPolicyHint": "Users without any policy are not blocked (backward compatible); once assigned, only queries matching policies are allowed.",
"assign": "Assign",
"all": "All"
},
"lbl": {
"unlimited": "Unlimited",
"hitRate": "Hit Rate",
"totalDevices": "Total Devices",
"instances": "Instances",
"instanceStatus": "Instance Status",
"connections": "Connections",
"online": "Online",
"fragmentationRate": "Fragmentation Rate",
"trafficSent": "Traffic Sent",
"evictedKeys": "Evicted Keys",
"noMaxMemory": "No maxmemory configured",
"standalone": "Standalone",
"middleware": "Middleware",
"hostMonitor": "Host Monitor",
"basicMonitor": "Basic Monitor",
"diskMonitor": "Disk Monitor",
"networkMonitor": "Network Monitor",
"processMonitor": "Process Monitor",
"selectHost": "Select host...",
"selectHostHint": "Select a host to view metrics",
"coreMetrics": "Core Metrics",
"allMetrics": "All Metrics",
"cpuUsage": "CPU Usage (%)",
"cpuIowait": "CPU IO Wait (%)",
"memUsage": "Memory Usage (%)",
"memAvailable": "Available Memory (GB)",
"swapUsage": "Swap Usage (%)",
"load1": "System Load (1m)",
"diskUsage": "Disk Usage (%)",
"diskRead": "Disk Read (KB/s)",
"diskWrite": "Disk Write (KB/s)",
"diskIoBusy": "Disk IO Busy (%)",
"fdUsage": "FD Usage Rate",
"fdRate": "FD Usage",
"nicRxErrors": "NIC RX Errors",
"nicTxErrors": "NIC TX Errors",
"nicBandwidth": "NIC Bandwidth",
"saving": "Saving...",
"allPortsReport": "All discovered ports are reported, any port change triggers alert + recovery.",
"selectedOnlyReport": "Only selected port changes are reported, others are silently ignored. System process ports are not alerted by default.",
"whitelistAutoReport": "In whitelist mode, all ports are automatically reported",
"nameIpRequired": "Name and IP are required",
"updateSuccess": "Updated successfully",
"editMw": "Edit Middleware",
"addMw": "Add Middleware",
"siteProbe": "Site Probe",
"availability24h": "Availability (24h)",
"totalProbes": "Total Probes",
"editTask": "Edit Probe Task",
"addProbe": "Add Probe",
"editProbe": "Edit Probe",
"deleteProbe": "Delete Probe",
"selectTemplate": "Select Template",
"deleteMonitor": "Delete Monitor",
"partialFail": "Partial Failure",
"defaultAdded": "Default monitoring added",
"defaultExists": "Default target already exists",
"collectDone": "Collection completed",
"deleteFail": "Delete failed",
"nameAddrRequired": "Name and address are required",
"taskUpdated": "Task updated",
"taskCreated": "Probe task created",
"taskDeleted": "Task deleted",
"totalTasks": "Total Tasks",
"noTasks": "No probe tasks",
"noFilteredTasks": "No tasks match current filter",
"urlPlaceholder": "e.g., Homepage",
"probeDone": "Probe completed",
"probeFail": "Probe failed",
"metricDetail": "Metric Details",
"notDetected": "Not Detected",
"snmpTitle": "Network Device / BMC Collection & Trends",
"fillRequired": "Please fill device name, IP and select OID template",
"deviceAdded": "Device added",
"collectFail": "Collection failed",
"demoSwitch": "Core-Switch-A",
"oidTemplate": "OID Template",
"device": "Device",
"centerSubtitle": "Comprehensive infrastructure & application monitoring",
"explorerTitle": "Metrics Explorer",
"searchMetrics": "Search metrics...",
"explorerSubtitle": "Browse all metrics by category/host, supports overlay comparison",
"loadingTargets": "Loading targets...",
"selectTarget": "Please select a target",
"selectHint": "After selecting a target host, check metrics from the left panel",
"selectMetricsHint": "Please check metrics from the left panel",
"probeName": "Probe Name",
"execCommand": "Execute Command",
"refreshing": " · Refreshing..."
}
},
"task": {