refactor(i18n): U42 残余硬编码中文彻底清零 — 33文件54处→0, zh/en 7847→7898对齐

全量 JSX children + toast/confirm + sr-only 描述硬编码中文清零:
- Kubernetes模块: UpdateStrategyCard maxSurge/maxUnavailable说明 + IngressCreateForm host域名/Service端口 + ServiceCreateForm 端口配置/selector + DeploymentEditService 无selector/个关联/暂无Service/Ingress + ClusterOverviewPage 核 + KubernetesClusterDialog 已配置 + KubectlTerminal/ResourceVisualEditor/CreateHPADialog/DeploymentEditContainers/Storage + PodInstancesTable/UpdateStrategySelectorCards
- AI模块: PredictiveCapacityTab AI深度解读/紧急/警告/7天预测/预计N天 + PredictiveCostTab AI深度解读 + event-handler.ts 高危操作确认toast
- Deploy模块: DeployCredentials 启用/禁用 + DeployRBAC 删除角色confirm + WorkspaceTermDialog + CredFormDialog Windows用户
- Monitor模块: AlertRulesTab 删除confirm/分钟 + PrometheusDatasourceManager/LogDatasourcePage 删除confirm + QueryHistoryPanel 条
- System模块: ServerFileBrowser/TerminalDialog/RdpAuditViewer sr-only + SystemManager/CredentialManager/TerminalSessionsTab 删除confirm + SecuritySettingsTab 30分钟/2小时
- Task模块: CronJobViewDialog 次

新增 61 翻译键 (k8s.editAdvanced 6 + k8s.editService 11 + k8s.cluster 2 + k8s.misc 9 + aiops.capacity 9 + aiops.cost 1 + aiops.cli 2 + deploy 4 + monitor 5 + system 10 + task 1 + common 2)
tsc -b=0, npm build✓ (17.71s), ESLint=0/43/any=0, go build=0, 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-14 00:51:36 +08:00
1 parent a7838aaf65
commit c6e0d6ca57
35 files changed
+217 -104

No files matched your search

@@ -75,7 +75,7 @@ export function AlertRulesTab({
if (selectedIds.length === 0) return;
const ok = await confirm({
title: i18n.t('monitor.alertRulesTab.deleteRule'),
description: `确定删除选中的 ${selectedIds.length} 条告警规则吗?此操作不可撤销。`,
description: i18n.t("monitor.deleteRulesConfirmDesc", { count: selectedIds.length }),
confirmText: i18n.t('system.terminalBatchDelete'),
variant: 'destructive',
});
@@ -194,7 +194,7 @@ export function AlertRulesTab({
)}
</TableCell>
<TableCell>
<span className="text-sm text-[var(--dg-text-secondary)]">{(rule.duration || 0) / 60}分钟</span>
<span className="text-sm text-[var(--dg-text-secondary)]">{i18n.t("monitor.durationMinutes", { count: (rule.duration || 0) / 60 })}</span>
</TableCell>
<TableCell>
{renderRuleChannels(rule, notifyChannels)}
@@ -50,7 +50,7 @@ export default function PrometheusDatasourceManager() {
const handleDelete = async (ds: PromDS) => {
const ok = await _confirm({
title: i18n.t('monitor.deleteDatasource'),
description: `确定删除数据源「${ds.name}」吗?此操作不可撤销。`,
description: i18n.t("monitor.deleteDatasourceConfirmDesc", { name: ds.name }),
variant: 'destructive',
});
if (!ok) return;
@@ -48,7 +48,7 @@ export function LogDatasourcePage() {
const handleDelete = async (ds: LogDataSource) => {
const ok = await confirm({
title: i18n.t('monitor.deleteDatasource'),
description: `确认删除「${ds.name}」?`,
description: i18n.t("monitor.deleteLogDsConfirmDesc", { name: ds.name }),
variant: 'destructive',
confirmText: i18n.t('kubernetes.storage.delete2'),
});
@@ -131,7 +131,7 @@ export function QueryHistoryPanel({ visible, onClose, onSelect, onCreateAlert }:
<div className="flex items-center gap-2">
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}>{item.timeRange}</span>
{item.resultCount !== undefined && (
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}>{item.resultCount} 条</span>
<span className="text-[10px]" style={{ color: 'var(--dg-text-muted)' }}>{i18n.t("monitor.queryHistory.count", { count: item.resultCount })}</span>
)}
</div>
<div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity">