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:
1 parent
b2715ca3bd
commit
064b6c4ec2
12 files changed
+71
-37
No files matched your search
@@ -183,11 +183,11 @@ export function PodLogsViewer({
|
||||
}
|
||||
}
|
||||
flush();
|
||||
appendLines([i18n.t('\\x1b[33m— 流式结束 —\\x1b[0m')]);
|
||||
appendLines(['\x1b[33m— 流式结束 —\x1b[0m']);
|
||||
} catch (e) {
|
||||
const errName = (e as { name?: string })?.name;
|
||||
if (errName === 'AbortError') {
|
||||
appendLines([i18n.t('\\x1b[33m— 已停止 —\\x1b[0m')]);
|
||||
appendLines(['\x1b[33m— 已停止 —\x1b[0m']);
|
||||
} else {
|
||||
const msg = e instanceof Error ? e.message : String(e);
|
||||
appendLines([`\x1b[31m[流式连接中断: ${msg}]\x1b[0m`]);
|
||||
|
||||
Reference in new issue
Block a user