fix(i18n): 清理语言包损坏 key 并补齐英文翻译

- 删除从 JSX 误切的损坏条目,4 处代码引用改用正常 key(空数据/内存目标/删除确认)
- en-US 补翻 32 条中文残留,修复空值 portUnit
- 修复后 zh/en 各 7655 个 key 完全对齐
This commit is contained in:
Logan.Li committed 2026-09-14 15:28:15 +08:00
1 parent 5cd7ea4a39
commit 115e8b451c
6 files changed
+71 -69

No files matched your search

@@ -120,7 +120,7 @@ export default function CapacityPage() {
</TableRow></TableHeader>
<TableBody>
{rows.length === 0 ? (
<TableRow><TableCell colSpan={8} className="text-center dg-text-muted py-8">{i18n.t('k8s.capacity.s934752c9')}</TableCell></TableRow>
<TableRow><TableCell colSpan={8} className="text-center dg-text-muted py-8">{i18n.t('common.noData')}</TableCell></TableRow>
) : rows.map((r, i) => (
<TableRow key={`${r.deployment}-${r.container}-${i}`} className="border-[var(--dg-border)] hover:bg-[var(--dg-bg-hover)]">
<TableCell className="font-medium text-[var(--dg-text-primary)] text-sm">{r.deployment}</TableCell>
@@ -450,7 +450,7 @@ export default function NamespaceResourcePage() {
const handleDeletePod = async (p: any) => {
const ok = await confirm({
title: i18n.t('kubernetes.pod.deletePod'),
description: i18n.t('k8s.namespaceResource.delete1') + (p.name || '') + i18n.t('k8s.namespaceResource.actions'),
description: i18n.t('k8s.namespaceResource.deleteConfirm', { name: p.name || '' }),
confirmText: i18n.t('kubernetes.storage.delete2'),
});
if (!ok) return;
@@ -131,7 +131,7 @@ export default function PodMetricsPage() {
</TableRow></TableHeader>
<TableBody>
{rows.length === 0 ? (
<TableRow><TableCell colSpan={5} className="text-center dg-text-muted py-8">{i18n.t('k8s.podMetrics.s934752c9')}</TableCell></TableRow>
<TableRow><TableCell colSpan={5} className="text-center dg-text-muted py-8">{i18n.t('common.noData')}</TableCell></TableRow>
) : rows.map((r, i) => (
<TableRow key={`${r.pod}-${r.container}-${i}`} className="border-[var(--dg-border)] hover:bg-[var(--dg-bg-hover)]">
<TableCell className="font-medium text-[var(--dg-text-primary)] text-sm">{r.pod}</TableCell>
@@ -98,7 +98,7 @@ export function CreateHPADialog({ clusterCode, namespace, deploymentName, onCrea
className="dg-input mt-1" />
</div>
<div>
<Label className="dg-text-secondary text-sm">{i18n.t('k8s.misc.memory1')} <span className="dg-text-muted">可选</span></Label>
<Label className="dg-text-secondary text-sm">{i18n.t('k8s.misc.memoryTarget')} <span className="dg-text-muted">可选</span></Label>
<Input type="number" value={form.memPercent} min={0} max={100}
onChange={(e) => setForm({ ...form, memPercent: Number(e.target.value) })}
className="dg-input mt-1" />
+47 -46
View File
@@ -177,7 +177,7 @@
"excludes": "Excludes",
"execute": "Execute",
"executing": "Executing",
"exitFullscreen": "Exit Fullscreen",
"exitFullscreen": "Exit fullscreen",
"exitFullscreen2": "Exit fullscreen",
"expand": "Expand",
"expandAll": "Expand All",
@@ -439,7 +439,6 @@
"start": "Start",
"startTime": "Start Time",
"statistics": "Statistics",
"status": "Status",
"stop": "Stop",
"stopped": "Stopped",
"submit": "Submit",
@@ -456,17 +455,11 @@
"target": "Target",
"test": "Test",
"theme": "Theme",
"themets.s02b08e05": "Atom warm grey IDE, purple-green syntax gradient",
"themets.s17d84295": "Auto-match OS light/dark mode",
"themets.s29ee972b": "GitHub-style blue-black professional dark",
"themets.s2d43cc04": "Bright White",
"themets.s2f82cbb2": "Deep Sea Blue",
"themets.s37e76182": "Enterprise console clean light",
"themets.s525ce260": "Classic purple-pink dark, highly recognizable",
"themets.s571aa09d": "Macaron soft dark, eye-friendly",
"themets.s6f40fb5e": "Tokyo Neon deep blue-purple, VS Code popular",
"themets.s8392cae7": "Mainstream",
"themets.sc2e48855": "Developer",
"thisMonth": "This Month",
"thisWeek": "This Week",
"thisYear": "This Year",
@@ -762,7 +755,8 @@
"cpu": "CPU",
"memory": "Memory",
"disk": "Disk",
"cores": "Cores"
"cores": "Cores",
"noData": "No data yet — connect a host to see resource trends"
}
},
"server": {
@@ -3086,8 +3080,7 @@
"capacity": {
"resources": "Resource Capacity Analysis",
"resources1": "Deployment Resource Requests and Limits",
"namespace": "所有命名空间",
"s934752c9": ">暂无数据{loading ? <span className=",
"namespace": "All Namespaces",
"deploymentResources": "Deployment Resource Requests and Limits",
"allNamespaces": "All namespaces",
"namespaceColumn": "Namespace",
@@ -3131,12 +3124,12 @@
"editBasic": {
"synced": "Synced",
"labels": "Labels",
"name": "名称不能为空",
"name": "Name is required",
"createSuccess": "Created successfully",
"save": "基本信息已保存",
"save": "Basic info saved",
"saveFailed": "Save failed",
"basicIdentity": "Basic Identity",
"readOnly": "基本标识(只读)",
"readOnly": "Basic identity (read-only)",
"loading": "Loading...",
"noManifest": "Manifest data not loaded. Please use YAML editor to modify directly.",
"replicas": "Replicas",
@@ -3162,20 +3155,19 @@
"nameRequired": "Name cannot be empty"
},
"kubectl": {
"disconnected": "\\r\\n\\x1b[31m[连接已断开]\\x1b[0m\\r\\n",
"failed": "WebSocket 连接失败",
"sc8107726": "\\r\\n\\x1b[31m[连接发生错误]\\x1b[0m\\r\\n",
"cluster": "正在连接集群..."
"disconnected": "\\r\\n\\x1b[31m[Disconnected]\\x1b[0m\\r\\n",
"failed": "WebSocket connection failed",
"sc8107726": "\\r\\n\\x1b[31m[Connection error]\\x1b[0m\\r\\n",
"cluster": "Connecting to cluster..."
},
"misc": {
"cluster1": "加载集群列表失败:",
"delete": "删除集群失败:",
"name": "名称不能为空",
"createSuccess1": "HPA 创建成功",
"failed1": "创建失败",
"memory1": ">内存目标 (%) <span className=",
"sd9ac9228": "创建",
"name1": "Deployment 名称不能为空",
"cluster1": "Failed to load clusters: ",
"delete": "Failed to delete cluster: ",
"name": "Name is required",
"createSuccess1": "HPA created successfully",
"failed1": "Creation failed",
"sd9ac9228": "Create",
"name1": "Deployment name is required",
"refresh": "Refresh",
"nodeList": "Node List",
"cores": "cores",
@@ -3184,42 +3176,41 @@
"file": "File",
"upload": "Upload",
"readFailed": "Read failed",
"uploadFailed": "Upload failed"
"uploadFailed": "Upload failed",
"memoryTarget": "Memory Target (%)"
},
"namespaceResource": {
"delete1": "确认删除 Pod \"",
"actions": "\"?操作不可恢复。"
"deleteConfirm": "Confirm delete Pod \"{{name}}\"? This action cannot be undone."
},
"podExec": {
"execError": "Execution error",
"reconnect": "\\r\\n\\x1b[33m⚠ bash 不可用,请切换 /bin/sh 后重连。\\x1b[0m",
"close": "\\r\\n\\x1b[33m[连接已关闭]\\x1b[0m\\r\\n",
"sc8107726": "\\r\\n\\x1b[31m[连接发生错误]\\x1b[0m\\r\\n",
"reconnect": "\\r\\n\\x1b[33m⚠ bash unavailable, switch to /bin/sh and reconnect.\\x1b[0m",
"close": "\\r\\n\\x1b[33m[Connection closed]\\x1b[0m\\r\\n",
"sc8107726": "\\r\\n\\x1b[31m[Connection error]\\x1b[0m\\r\\n",
"connected": "Connected",
"connecting": "Connecting",
"connectionError": "Connection error",
"disconnected1": "Disconnected",
"idle": "Idle",
"container": "Container",
"reconnect1": "正在重连…",
"reconnect1": "Reconnecting…",
"reconnect2": "Reconnect",
"exitFullscreen": "Exit Fullscreen",
"fullscreen": "Fullscreen",
"close1": "Close",
"container1": "正在进入容器...",
"container1": "Entering container...",
"enterPod": "Enter Pod container to execute commands"
},
"podMetrics": {
"resources2": "Pod 资源用量",
"container2": "容器 CPU/内存实时指标",
"sa2e8040e": "Pod 数",
"cpu": "总 CPU",
"memory": "总内存",
"namespace": "所有命名空间",
"s934752c9": ">暂无数据{loading ? <span className="
"resources2": "Pod Resource Usage",
"container2": "Container CPU/Memory live metrics",
"sa2e8040e": "Pods",
"cpu": "Total CPU",
"memory": "Total Memory",
"namespace": "All Namespaces"
},
"resourceEditor": {
"sfe7509e0": "值",
"sfe7509e0": "Value",
"create": "Create",
"edit": "Edit",
"yamlEdit": "YAML Editor",
@@ -5740,7 +5731,6 @@
"podmetricspaget.s6dbb5eb7": "Container CPU/Memory Real-time Metrics",
"podmetricspaget.sac1fc314": "Total CPU",
"podmetricspaget.s58173b22": "All Namespaces",
"podmetricspaget.s934752c9": ">No data{loading ? <span className=",
"podexecterminal.s05f6e923": "Execution Error",
"podexecterminal.s14481be5": "\\r\\n\\x1b[33m⚠ bash unavailable, please switch to /bin/sh and reconnect.\\x1b[0m",
"podexecterminal.s123d9435": "\\r\\n\\x1b[33m[Connection Closed]\\x1b[0m\\r\\n",
@@ -5974,7 +5964,8 @@
"clustercomparep.sbcb4f02f": "Click a row to view cluster overview",
"clustercomparep.s33108c69": "✓ Healthy",
"clustercomparep.s5ddbdd13": "⚠ Warning",
"clustercomparep.sc9410323": "✗ Abnormal"
"clustercomparep.sc9410323": "✗ Abnormal",
"podmetricspaget": {}
},
"pipeline": {
"title": "Pipelines",
@@ -6350,7 +6341,11 @@
"constantsts.se47498d3": "Database Connection Info",
"constantsts.sb3edf0a4": "API Token/Key + Endpoint",
"constantsts.s1d319bb7": "Generic Credential",
"constantsts.s51b5b280": "Custom Key/Value Pairs"
"constantsts.s51b5b280": "Custom Key/Value Pairs",
"credformdialogt": {
"s5f9e5395": "Type",
"s2a14fc8c": "Registry URL"
}
},
"automation": {
"title": "Task Automation",
@@ -7445,7 +7440,13 @@
"exportauditts.s7a85eed7": "Time Offset,Command,High Risk",
"exportauditts.s6e047305": "Time,User,Command,Output Size,Session ID,High Risk",
"useldapmanageme.s1a2b3c4d": "OU \"{{name}}\" already exists, please use a different name",
"useldapmanageme.s2b3c4d5e": "Failed to create OU: "
"useldapmanageme.s2b3c4d5e": "Failed to create OU: ",
"liveMonitor": {
"title": "Live Terminal Monitor",
"description": "Monitor live audited WebSSH session",
"connecting": "Connecting",
"connectFailed": "Connection failed"
}
},
"aiops": {
"title": "AIOps",
+20 -19
View File
@@ -439,7 +439,6 @@
"start": "开始",
"startTime": "开始时间",
"statistics": "统计",
"status": "状态",
"stop": "停止",
"stopped": "已停止",
"submit": "提交",
@@ -456,17 +455,11 @@
"target": "目标",
"test": "测试",
"theme": "主题",
"themets.s02b08e05": "Atom 暖灰 IDE,紫绿语法渐变",
"themets.s17d84295": "自动匹配操作系统浅色/深色",
"themets.s29ee972b": "GitHub 风格蓝黑专业暗色",
"themets.s2d43cc04": "明亮白",
"themets.s2f82cbb2": "深海蓝",
"themets.s37e76182": "企业控制台清爽浅色",
"themets.s525ce260": "经典紫粉暗色,极高辨识度",
"themets.s571aa09d": "马卡龙柔和暗色,护眼",
"themets.s6f40fb5e": "东京霓虹深蓝紫,VS Code 热门",
"themets.s8392cae7": "主流",
"themets.sc2e48855": "开发者",
"thisMonth": "本月",
"thisWeek": "本周",
"thisYear": "今年",
@@ -762,7 +755,8 @@
"cpu": "CPU",
"memory": "内存",
"disk": "磁盘",
"cores": "核"
"cores": "核",
"noData": "暂无数据,接入主机后展示资源趋势"
}
},
"server": {
@@ -3087,7 +3081,6 @@
"resources": "资源容量分析",
"resources1": "Deployment 资源请求与限制",
"namespace": "所有命名空间",
"s934752c9": ">暂无数据{loading ? <span className=",
"deploymentResources": "Deployment 资源请求与限制",
"allNamespaces": "所有命名空间",
"namespaceColumn": "命名空间",
@@ -3173,7 +3166,6 @@
"name": "名称不能为空",
"createSuccess1": "HPA 创建成功",
"failed1": "创建失败",
"memory1": ">内存目标 (%) <span className=",
"sd9ac9228": "创建",
"name1": "Deployment 名称不能为空",
"refresh": "刷新",
@@ -3184,11 +3176,11 @@
"file": "文件",
"upload": "上传",
"readFailed": "读取失败",
"uploadFailed": "上传失败"
"uploadFailed": "上传失败",
"memoryTarget": "内存目标 (%)"
},
"namespaceResource": {
"delete1": "确认删除 Pod \"",
"actions": "\"?操作不可恢复。"
"deleteConfirm": "确认删除 Pod \"{{name}}\"?操作不可恢复。"
},
"podExec": {
"execError": "执行错误",
@@ -3215,8 +3207,7 @@
"sa2e8040e": "Pod 数",
"cpu": "总 CPU",
"memory": "总内存",
"namespace": "所有命名空间",
"s934752c9": ">暂无数据{loading ? <span className="
"namespace": "所有命名空间"
},
"resourceEditor": {
"sfe7509e0": "值",
@@ -5740,7 +5731,6 @@
"podmetricspaget.s6dbb5eb7": "容器 CPU/内存实时指标",
"podmetricspaget.sac1fc314": "总 CPU",
"podmetricspaget.s58173b22": "所有命名空间",
"podmetricspaget.s934752c9": ">暂无数据{loading ? <span className=",
"podexecterminal.s05f6e923": "执行错误",
"podexecterminal.s14481be5": "\\r\\n\\x1b[33m⚠ bash 不可用,请切换 /bin/sh 后重连。\\x1b[0m",
"podexecterminal.s123d9435": "\\r\\n\\x1b[33m[连接已关闭]\\x1b[0m\\r\\n",
@@ -5974,7 +5964,8 @@
"clustercomparep.sbcb4f02f": "点击行可进入集群概览",
"clustercomparep.s33108c69": "✓ 健康",
"clustercomparep.s5ddbdd13": "⚠ 警告",
"clustercomparep.sc9410323": "✗ 异常"
"clustercomparep.sc9410323": "✗ 异常",
"podmetricspaget": {}
},
"pipeline": {
"title": "流水线",
@@ -6350,7 +6341,11 @@
"constantsts.se47498d3": "数据库连接信息",
"constantsts.sb3edf0a4": "API Token/Key + 端点",
"constantsts.s1d319bb7": "通用凭证",
"constantsts.s51b5b280": "自定义 Key/Value 键值对"
"constantsts.s51b5b280": "自定义 Key/Value 键值对",
"credformdialogt": {
"s5f9e5395": "类型",
"s2a14fc8c": "Registry 地址"
}
},
"automation": {
"title": "作业任务",
@@ -7445,7 +7440,13 @@
"exportauditts.s7a85eed7": "时间偏移,命令,高危",
"exportauditts.s6e047305": "时间,用户,命令,输出大小,会话ID,高危",
"useldapmanageme.s1a2b3c4d": "OU \"{{name}}\" 已存在,请使用其他名称",
"useldapmanageme.s2b3c4d5e": "创建 OU 失败:"
"useldapmanageme.s2b3c4d5e": "创建 OU 失败:",
"liveMonitor": {
"title": "终端实时监控",
"description": "审计在线 WebSSH 会话",
"connecting": "连接中",
"connectFailed": "连接失败"
}
},
"aiops": {
"title": "AIOps 智能",