refactor(i18n): U37 全量 JSX 文本节点硬编码中文清零 — 65 文件 151 处→0, 新增 common.* 98 翻译键, zh/en 对齐, tsc -b=0, npm build✓ (17.96s), ESLint=0/43/any=0, go build=0, 17/17 测试通过

This commit is contained in:
attacker committed 2026-07-13 06:39:08 +08:00
1 parent e274ba7b9b
commit 7c80e35411
68 files changed
+11819 -11622

No files matched your search

@@ -19,7 +19,7 @@ export function IngressCreateForm({ ingForm, setIngForm, deploymentName, onCance
return (
<div className="mt-3 border border-purple-800/50 rounded-lg p-3 bg-purple-950/20 space-y-2">
<div className="text-xs font-semibold text-purple-300 flex items-center gap-1.5">
<Plus className="h-3 w-3" />创建新 Ingress
<Plus className="h-3 w-3" />{i18n.t("common.newInstanceIngress")}
</div>
<div className="grid grid-cols-2 gap-2">
<div>
@@ -23,7 +23,7 @@ export function IngressListItem({ ing, matched, onEdit, onDelete }: Props) {
{matched && <Badge className="bg-purple-500/20 text-purple-300 border-purple-500/30 text-[10px]"> {i18n.t('kubernetes.deploymentEditService.associated')} </Badge>}
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green ml-auto"
onClick={onEdit}>
<Pencil className="h-3 w-3 mr-1" />编辑
<Pencil className="h-3 w-3 mr-1" />{i18n.t("common.editAction")}
</Button>
<Button size="sm" variant="ghost" className="h-6 w-6 p-0 dg-text-red hover:dg-text-red"
title={i18n.t('kubernetes.ingress.deleteIngress')} onClick={onDelete}>
@@ -44,7 +44,7 @@ export function ServiceCreateForm({ svcForm, setSvcForm, selectorLabels, deploym
return (
<div className="mt-3 border border-blue-800/50 rounded-lg p-3 bg-blue-950/20 space-y-3">
<div className="text-xs font-semibold text-blue-300 flex items-center gap-1.5">
<Plus className="h-3 w-3" />创建新 Service
<Plus className="h-3 w-3" />{i18n.t("common.newInstanceService")}
</div>
{/* 基本信息 */}
@@ -122,7 +122,7 @@ export function ServiceCreateForm({ svcForm, setSvcForm, selectorLabels, deploym
{/* 添加自定义端口 */}
<Button size="sm" variant="outline" className="h-7 w-full border-dashed border-[var(--dg-border)] dg-text-secondary text-xs"
onClick={() => addPort()}>
<Plus className="h-3 w-3 mr-1" />添加自定义端口
<Plus className="h-3 w-3 mr-1" />{i18n.t("common.addCustom")}
</Button>
</div>
@@ -24,7 +24,7 @@ export function ServiceListItem({ svc, matched, onEdit, onDelete }: Props) {
<code className="text-[11px] dg-text-muted ml-auto">{svc.clusterIP}</code>
<Button size="sm" variant="ghost" className="h-6 text-xs dg-text-green"
onClick={onEdit}>
<Pencil className="h-3 w-3 mr-1" />编辑
<Pencil className="h-3 w-3 mr-1" />{i18n.t("common.editAction")}
</Button>
<Button size="sm" variant="ghost" className="h-6 w-6 p-0 dg-text-red hover:dg-text-red"
title={i18n.t('kubernetes.service.deleteService')} onClick={onDelete}>