refactor(i18n): U29 phantom key 全项目清零 — 28 个 phantom key → 0

AlertRuleDialog.tsx (9处) + DeployTargetFields.tsx (3处) + HealthProbeSection.tsx (2处+1处硬编码) + PodLogsViewer.tsx (2处终端ANSI字符串) + AlertChannelDialog.tsx (2处) + PodMetricsPage.tsx/CapacityPage.tsx (各1处) + PodExecTerminal.tsx (1处终端ANSI) + BuildNodesManager.tsx (1处) + HostDetailDialog.tsx (1处)

修复类型:
- 批量正则损坏的 i18n.t('>中文 <span className=') → 语义化键
- 终端 ANSI 转义字符串 (PodLogsViewer/PodExecTerminal) → 移除 i18n.t() 包裹改纯字符串
- 硬编码中文 (取消/通知渠道提示/日志数据源提示) → i18n.t() 调用

新增 16 个翻译键 (monitor.alertRuleDialog2.* + monitor.alertChannel.name + agent.portCount + monitor.lbl.noProbeHint)
zh/en 7358→7375 +17 键对齐
phantom key 28→0 (全项目零 phantom key)
tsc -b=0, npm build✓ (17.00s), ESLint=0/53/0, go build=0, 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-12 07:34:42 +08:00
1 parent b2715ca3bd
commit 064b6c4ec2
12 files changed
+71 -37

No files matched your search

+21 -4
View File
@@ -4192,7 +4192,8 @@
"typeSms": "SMS",
"typeWebhook": "Webhook",
"typeWechat": "WeCom",
"updated": "Channel updated"
"updated": "Channel updated",
"name": "Channel Name"
},
"alertChannels": {
"addChannel": "Add Channel",
@@ -4905,12 +4906,27 @@
"siteClientError": "Client/Auth Error",
"siteRequestFailed": "Request Failed",
"siteRequestTimeout": "Request Timeout",
"siteConnFailed": "Connection Failed"
"siteConnFailed": "Connection Failed",
"noProbeHint": "No health probes. Click \"{{action}}\" to create one."
},
"alertRuleDialog2": {
"editRule": "Edit Alert Rule",
"newRule": "New Alert Rule",
"namePlaceholder": "e.g., CPU Usage Alert"
"namePlaceholder": "e.g., CPU Usage Alert",
"alertType": "Alert Type",
"metricAlert": "Metric Alert",
"eventAlert": "Event Alert",
"logDatasource": "Log Data Source",
"selectLogSource": "Select a log source",
"expression": "Expression",
"logqlHint": "LogQL query or count_over_time expression",
"esHint": "Elasticsearch Lucene query",
"promqlHint": "PromQL or metric expression, e.g. cpu_usage > 80",
"severity": "Severity",
"duration": "Duration (sec)",
"ruleDesc": "Rule Description",
"noChannels": "No notification channels configured. Please add them in Notification Settings first.",
"addLogSourceFirst": "Please add a {{type}} datasource in Log Sources first"
},
"alertMgr2": {
"alertEvents": "Alert Events",
@@ -6874,7 +6890,8 @@
},
"monitor2": {
"commandPlaceholder2": "e.g., free -m && df -h"
}
},
"portCount": "Port Count"
},
"system": {
"title": "System",
+21 -4
View File
@@ -4455,7 +4455,8 @@
"hintFeishu": "飞书机器人: {\"url\":\"https://open.feishu.cn/open-apis/bot/v2/hook/...\"}",
"hintEmail": "邮件: {\"to\":\"ops@ezops.io\"}",
"hintSms": "短信: {\"phones\":\"13800138000\"}",
"hintWebhook": "Webhook: {\"url\":\"https://...\"}"
"hintWebhook": "Webhook: {\"url\":\"https://...\"}",
"name": "渠道名称"
},
"alertChannels": {
"fetchFailed": "获取通知渠道失败",
@@ -4905,12 +4906,27 @@
"siteClientError": "客户端/鉴权错误",
"siteRequestFailed": "请求失败",
"siteRequestTimeout": "请求超时",
"siteConnFailed": "连接失败"
"siteConnFailed": "连接失败",
"noProbeHint": "暂无健康探针,点击「{{action}}」创建"
},
"alertRuleDialog2": {
"editRule": "编辑告警规则",
"newRule": "新建告警规则",
"namePlaceholder": "如:CPU 使用率告警"
"namePlaceholder": "如:CPU 使用率告警",
"alertType": "告警类型",
"metricAlert": "指标告警",
"eventAlert": "事件告警",
"logDatasource": "日志数据源",
"selectLogSource": "请选择日志数据源",
"expression": "规则表达式",
"logqlHint": "LogQL 查询或 count_over_time 表达式",
"esHint": "Elasticsearch Lucene 查询",
"promqlHint": "PromQL 或指标表达式,例如 cpu_usage > 80",
"severity": "告警级别",
"duration": "持续时间(秒)",
"ruleDesc": "规则描述",
"noChannels": "暂无已配置的通知渠道,请先在「通知渠道配置」中添加",
"addLogSourceFirst": "请先前往「日志库」添加 {{type}} 数据源"
},
"alertMgr2": {
"alertEvents": "告警事件",
@@ -6874,7 +6890,8 @@
},
"monitor2": {
"commandPlaceholder2": "例如:free -m && df -h"
}
},
"portCount": "端口数"
},
"system": {
"title": "系统管理",