refactor(i18n): U41 残余硬编码中文清零 — 工具函数+审计RDP标签+AIOps分析+Monitor残余+审批选项
18 文件 ~35 处 UI 硬编码中文→t()/i18n.t() 调用: - agent-utils.ts timeAgo() 秒前/分钟前/小时前 - utils.ts formatDistanceToNow() 分钟前/小时前/天前 - request.ts 响应解析失败错误消息 - ActiveSessionsPanel/HistorySessionsPanel RDP 在线/历史会话标签 - MetricsExplorer 清除/已选/最近1小时 - HostMonitor 当前主机 subtitle - AIAnalysisResult 证据链 (新增 useTranslation hook) - capacity-predict.ts 容量预测摘要模板 - ApprovalResourcePage 阿里云/腾讯云/华为云 - ApprovalPermissionPage 堡垒机 - site-monitor/helpers.ts 频率/时间/证书天数格式化 - site-monitor/analytics.ts 证书剩余/检查失败/延迟波动事件 - middleware-monitor MwTargetChartsPanel/MwTrendChart/helpers.ts - snmp-monitor SnmpMetricTrendChart/SnmpDeviceChartsPanel - host-monitor/utils.ts 图表点数标签 + PortPolicyDialog 系统进程说明 新增 34 翻译键 (common.duration.secAgo/hourAgo/dayAgo + common.selected/ responseParseError/rdpActiveSessions/rdpHistorySessions/rdpSessionCount/ evidenceChain/last1Hour/currentHost + monitor.lbl 10键 + monitor.siteMonitor 8键 + approval.provider 3键 + approval.permType 1键 + monitor.portPolicyDialog.systemProcessDesc + aiops.capacity.summary) zh/en 7813→7847 对齐; tsc -b=0, npm build✓ (17.31s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
This commit is contained in:
1 parent
4e2ba77aa8
commit
a7838aaf65
23 files changed
+140
-57
No files matched your search
@@ -181,7 +181,10 @@
|
||||
"minSec": "{{m}}m {{s}}s",
|
||||
"hour": "{{count}}h",
|
||||
"hourMin": "{{h}}h {{m}}m",
|
||||
"minAgo": "{{count}} min ago"
|
||||
"minAgo": "{{count}} min ago",
|
||||
"secAgo": "{{count}}s ago",
|
||||
"hourAgo": "{{count}}h ago",
|
||||
"dayAgo": "{{count}}d ago"
|
||||
},
|
||||
"ebCaughtError": "[ErrorBoundary] Caught error:",
|
||||
"ebCopyError": "Copy Error",
|
||||
@@ -623,7 +626,15 @@
|
||||
"fillIfMultiContainer": "(required for multi-container)",
|
||||
"confirmDeleteType": "Delete {{type}} \"{{name}}\"?",
|
||||
"unitCount": "",
|
||||
"fieldValues": "{{count}} values"
|
||||
"fieldValues": "{{count}} values",
|
||||
"selected": "{{count}} selected",
|
||||
"responseParseError": "Response parse failed",
|
||||
"rdpActiveSessions": "RDP Active Sessions",
|
||||
"rdpHistorySessions": "RDP History Sessions",
|
||||
"rdpSessionCount": "RDP sessions: {{count}}",
|
||||
"evidenceChain": "Evidence Chain",
|
||||
"last1Hour": "Last 1 hour",
|
||||
"currentHost": "Current host: {{host}}"
|
||||
},
|
||||
"menu": {
|
||||
"aiAgentCli": "Agent CLI",
|
||||
@@ -1478,7 +1489,15 @@
|
||||
"general": "General Approval"
|
||||
},
|
||||
"workflowSubtitle": "Configure multi-level approval workflows for resource, application, and permission requests",
|
||||
"workflowTitle": "Approval Workflow Config"
|
||||
"workflowTitle": "Approval Workflow Config",
|
||||
"provider": {
|
||||
"aliyun": "Alibaba Cloud",
|
||||
"tencent": "Tencent Cloud",
|
||||
"huawei": "Huawei Cloud"
|
||||
},
|
||||
"permType": {
|
||||
"bastion": "Bastion"
|
||||
}
|
||||
},
|
||||
"audit": {
|
||||
"csvHeader": "Time,User,Command,Output Size,Session ID,Critical",
|
||||
@@ -4423,7 +4442,16 @@
|
||||
"snmpVersion": "SNMP Version",
|
||||
"snmpNoDevice": "No SNMP devices. Click \"Add Device\" to start monitoring.",
|
||||
"snmpCollectMetrics": "Collected Metrics",
|
||||
"snmpNoMetrics": "No metrics yet. Please collect first."
|
||||
"snmpNoMetrics": "No metrics yet. Please collect first.",
|
||||
"noTrendData": "No trend data",
|
||||
"noTrendDataWaiting": "No trend data, waiting for collection",
|
||||
"selectInstanceHint": "Select an instance to view trends and health",
|
||||
"clickDeviceHint": "Click a device row to view CPU / Memory / Temperature / Fan trends",
|
||||
"noMetricsHint": "No visualizable metrics, please complete at least one collection",
|
||||
"usedHint": "Used {{value}}",
|
||||
"clusterNodesHint": "Cluster {{value}} nodes",
|
||||
"slowQueriesHint": "Slow queries {{value}}",
|
||||
"pointCount": "{{min}} — {{max}} · {{count}} pts"
|
||||
},
|
||||
"logAlertBell": {
|
||||
"linked": "Alert Policy Linked",
|
||||
@@ -4813,7 +4841,8 @@
|
||||
"neverReport": "Never report",
|
||||
"filterMode": "Filter Mode",
|
||||
"title": "Port Monitoring Policy",
|
||||
"desc": "Configure Agent port reporting filter rules"
|
||||
"desc": "Configure Agent port reporting filter rules",
|
||||
"systemProcessDesc": "⚠️ Regardless of mode, the following system process ports {{neverReport}}: sshd, rpcbind, master, systemd, dbus-daemon, rsyslogd, etc. Automatically skipped during collection."
|
||||
},
|
||||
"postgresql": "PostgreSQL",
|
||||
"prevPage": "Previous",
|
||||
@@ -5004,7 +5033,15 @@
|
||||
"probeDesc": "Configure probe tasks by protocol type, the system will automatically probe at intervals",
|
||||
"taskNotFound": "Probe task does not exist or has been deleted",
|
||||
"clickToObserve": "Click to view details",
|
||||
"alerting": "Alerting"
|
||||
"alerting": "Alerting",
|
||||
"recommendFreq": "Recommended {{freq}}, min {{minFreq}}",
|
||||
"seconds": "{{count}}s",
|
||||
"minutes": "{{count}}min",
|
||||
"hours": "{{count}}h",
|
||||
"certDays": "{{count}}d",
|
||||
"certRemaining": "Certificate remaining {{days}} days",
|
||||
"checkFailed": "{{label}} failed",
|
||||
"latencyFluctuation": "{{label}} latency fluctuation"
|
||||
},
|
||||
"siteProbe": "Site Probe",
|
||||
"siteProbeTitle": "Site Probe Tasks",
|
||||
@@ -7933,7 +7970,8 @@
|
||||
"expertPrompt": "You are an AIOps capacity planning expert. Based on the following server resource capacity forecast data, provide a comprehensive risk assessment and actionable operations recommendations:",
|
||||
"resCpu": "Server CPU Compute",
|
||||
"resMemory": "Server Memory",
|
||||
"resDisk": "Storage Disk Space"
|
||||
"resDisk": "Storage Disk Space",
|
||||
"summary": "- {{resource}}: Current {{current}}% → 7-day forecast {{predicted}}% (threshold {{threshold}}%), {{risk}}"
|
||||
},
|
||||
"capacityPlanPrompt": "Based on the following host resource usage, provide cost optimization and capacity planning advice (identify idle/overloaded hosts; suggest scale-down/scale-up)",
|
||||
"capacityPlanning": "Capacity Planning",
|
||||
|
||||
@@ -181,7 +181,10 @@
|
||||
"minSec": "{{m}}分{{s}}秒",
|
||||
"hour": "{{count}}时",
|
||||
"hourMin": "{{h}}时{{m}}分",
|
||||
"minAgo": "{{count}}分钟前"
|
||||
"minAgo": "{{count}}分钟前",
|
||||
"secAgo": "{{count}}秒前",
|
||||
"hourAgo": "{{count}}小时前",
|
||||
"dayAgo": "{{count}}天前"
|
||||
},
|
||||
"ebCaughtError": "[ErrorBoundary] 捕获到错误:",
|
||||
"ebCopyError": "复制错误",
|
||||
@@ -623,7 +626,15 @@
|
||||
"fillIfMultiContainer": "(多容器时填写)",
|
||||
"confirmDeleteType": "确认删除 {{type}} \"{{name}}\"?",
|
||||
"unitCount": "个",
|
||||
"fieldValues": "{{count}} 个值"
|
||||
"fieldValues": "{{count}} 个值",
|
||||
"selected": "{{count}} 已选",
|
||||
"responseParseError": "响应解析失败",
|
||||
"rdpActiveSessions": "RDP 在线会话",
|
||||
"rdpHistorySessions": "RDP 历史会话",
|
||||
"rdpSessionCount": "RDP 会话共 {{count}} 条",
|
||||
"evidenceChain": "证据链",
|
||||
"last1Hour": "最近 1 小时",
|
||||
"currentHost": "当前主机: {{host}}"
|
||||
},
|
||||
"menu": {
|
||||
"aiAgentCli": "Agent CLI",
|
||||
@@ -1478,7 +1489,15 @@
|
||||
"general": "通用审批"
|
||||
},
|
||||
"workflowSubtitle": "为资源申请、应用申请、权限审批配置多级审批流程",
|
||||
"workflowTitle": "审批流程配置"
|
||||
"workflowTitle": "审批流程配置",
|
||||
"provider": {
|
||||
"aliyun": "阿里云",
|
||||
"tencent": "腾讯云",
|
||||
"huawei": "华为云"
|
||||
},
|
||||
"permType": {
|
||||
"bastion": "堡垒机"
|
||||
}
|
||||
},
|
||||
"audit": {
|
||||
"csvHeader": "时间,用户,命令,输出大小,会话ID,高危",
|
||||
@@ -4423,7 +4442,16 @@
|
||||
"snmpVersion": "SNMP 版本",
|
||||
"snmpNoDevice": "暂无 SNMP 设备,点击「添加设备」开始监控",
|
||||
"snmpCollectMetrics": "采集指标",
|
||||
"snmpNoMetrics": "暂无指标,请先采集"
|
||||
"snmpNoMetrics": "暂无指标,请先采集",
|
||||
"noTrendData": "暂无趋势数据",
|
||||
"noTrendDataWaiting": "暂无趋势数据,等待后台采集",
|
||||
"selectInstanceHint": "选择左侧实例查看趋势与健康度",
|
||||
"clickDeviceHint": "点击设备行查看 CPU / 内存 / 温度 / 风扇趋势图",
|
||||
"noMetricsHint": "暂无可视化指标,请先完成至少一次采集",
|
||||
"usedHint": "已用 {{value}}",
|
||||
"clusterNodesHint": "集群 {{value}} 节点",
|
||||
"slowQueriesHint": "慢查询 {{value}}",
|
||||
"pointCount": "{{min}} — {{max}} · {{count}} 点"
|
||||
},
|
||||
"logAlertBell": {
|
||||
"linked": "已关联告警策略",
|
||||
@@ -4813,7 +4841,8 @@
|
||||
"neverReport": "永远不上报",
|
||||
"filterMode": "过滤模式",
|
||||
"title": "端口监控策略",
|
||||
"desc": "配置 Agent 端口上报过滤规则"
|
||||
"desc": "配置 Agent 端口上报过滤规则",
|
||||
"systemProcessDesc": "⚠️ 无论选择哪种模式,以下系统进程端口 {{neverReport}}:sshd、rpcbind、master、systemd、dbus-daemon、rsyslogd 等。Agent 采集时自动跳过。"
|
||||
},
|
||||
"postgresql": "PostgreSQL",
|
||||
"prevPage": "上一页",
|
||||
@@ -5004,7 +5033,15 @@
|
||||
"probeDesc": "按协议类型配置探活任务,系统将按间隔自动拨测",
|
||||
"taskNotFound": "拨测任务不存在或已删除",
|
||||
"clickToObserve": "点击可观测进入详情页",
|
||||
"alerting": "告警中"
|
||||
"alerting": "告警中",
|
||||
"recommendFreq": "推荐 {{freq}},最小 {{minFreq}}",
|
||||
"seconds": "{{count}}秒",
|
||||
"minutes": "{{count}}分钟",
|
||||
"hours": "{{count}}小时",
|
||||
"certDays": "{{count}}天",
|
||||
"certRemaining": "证书剩余 {{days}} 天",
|
||||
"checkFailed": "{{label}}失败",
|
||||
"latencyFluctuation": "{{label}}延迟波动"
|
||||
},
|
||||
"siteProbe": "站点拨测",
|
||||
"siteProbeTitle": "站点拨测任务",
|
||||
@@ -7933,7 +7970,8 @@
|
||||
"expertPrompt": "你是 AIOps 容量规划专家。基于以下服务器资源容量预测数据,给出综合风险评估与可执行的运维建议:",
|
||||
"resCpu": "服务器CPU算力",
|
||||
"resMemory": "服务器内存",
|
||||
"resDisk": "存储磁盘空间"
|
||||
"resDisk": "存储磁盘空间",
|
||||
"summary": "- {{resource}}:当前 {{current}}% → 7天后预测 {{predicted}}%(阈值 {{threshold}}%),{{risk}}"
|
||||
},
|
||||
"capacityPlanPrompt": "根据以下主机资源使用数据,提供成本优化和容量规划建议(识别闲置/过载主机,给出缩容/扩容建议)",
|
||||
"capacityPlanning": "容量规划",
|
||||
|
||||
Reference in new issue
Block a user