feat(i18n): U5 Kubernetes 模块国际化 — 新增 k8s 命名空间(184键) + KubernetesClusterDetail/TopologyView 全量迁移硬编码中文改翻译键

- 新增 k8s 翻译命名空间: cluster/tab/column/empty/label/topology/resource/workload 8 子命名空间
- KubernetesClusterDetail.tsx: 7 Tab(概览/节点/Pod/Deployment/Service/Ingress/事件) 表头+空状态+趋势图标签全量国际化
- TopologyView.tsx: 标题/编辑模式/连线模式/节点编辑弹框/Toast/搜索栏全量国际化
- 新增 common.duration.minAgo 插值键
- 翻译键 1019→1204(+185), 11 命名空间, zh-CN/en-US 完全对齐
- tsc --noEmit=0, npm build✅(17.81s), 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-01 02:28:33 +08:00
1 parent 3b19ae6e98
commit 6db6acc6bd
7 files changed
+611 -129

No files matched your search

+204 -1
View File
@@ -77,7 +77,8 @@
"min": "{{count}}分",
"minSec": "{{m}}分{{s}}秒",
"hour": "{{count}}时",
"hourMin": "{{h}}时{{m}}分"
"hourMin": "{{h}}时{{m}}分",
"minAgo": "{{count}}分钟前"
}
},
"menu": {
@@ -1145,5 +1146,207 @@
"allType": "全部类型",
"pagination": "{{n}}条/页"
}
},
"k8s": {
"cluster": {
"detail": "集群详情",
"version": "版本",
"nodeCount": "节点",
"created": "创建于",
"loadFailed": "加载集群详情失败",
"resourceTrend": "资源使用趋势(模拟最近变化)",
"refreshMetrics": "刷新节点指标",
"resourceDistribution": "资源分布",
"now": "现在"
},
"tab": {
"overview": "概览",
"nodes": "节点",
"pods": "Pod",
"deployments": "Deployment",
"services": "Service",
"ingresses": "Ingress",
"events": "事件"
},
"column": {
"name": "名称",
"namespace": "命名空间",
"role": "角色",
"status": "状态",
"cpu": "CPU",
"memory": "内存",
"os": "操作系统",
"restartCount": "重启次数",
"node": "节点",
"replicas": "副本数",
"availableReplicas": "可用副本",
"image": "镜像",
"type": "类型",
"ports": "端口",
"selector": "Selector",
"hosts": "Hosts",
"backend": "后端服务",
"tls": "TLS",
"createdAt": "创建时间"
},
"empty": {
"nodes": "暂无节点数据",
"pods": "暂无Pod数据",
"deployments": "暂无Deployment数据",
"services": "暂无Service数据",
"ingresses": "暂无Ingress数据",
"events": "暂无事件"
},
"label": {
"cpu": "CPU",
"memory": "内存",
"cpuPercent": "CPU(%)",
"memoryPercent": "内存(%)",
"enabled": "已启用",
"disabled": "未启用",
"cores": "核"
},
"topology": {
"title": "架构拓扑",
"selectCluster": "选择集群",
"allResources": "全部资源",
"editMode": "编辑模式",
"connectMode": "连接模式",
"saveLayout": "保存布局",
"resetLayout": "重置布局",
"addNode": "添加节点",
"editNode": "编辑节点",
"deleteNode": "删除节点",
"nodeName": "节点名称",
"nodeType": "节点类型",
"nodeNote": "节点备注",
"searchPlaceholder": "搜索节点...",
"noData": "暂无拓扑数据,请选择集群",
"layoutSaved": "布局已保存",
"layoutSaveFailed": "保存失败",
"layoutReset": "布局已重置",
"connectHint": "点击两个节点创建连接",
"cancelConnect": "取消连线",
"confirmDeleteNode": "确定删除节点「{{name}}」?",
"customNode": "自定义节点",
"dragHint": "拖拽节点调整位置",
"subtitle": "Kubernetes 集群资源拓扑可视化 · 拖拽节点调整布局",
"editModeActive": "编辑模式",
"connecting": "连线中",
"selectTarget": "选择目标节点",
"selectSource": "选择源节点",
"sourceSelected": "已选择源节点: {{name}},请点击目标节点",
"connectSelf": "不能连接自身",
"connectAdded": "连线已添加",
"exitEdit": "退出编辑",
"addConnection": "添加连线",
"autoGenerate": "重新自动生成",
"autoGenerateTitle": "忽略保存的布局,重新根据 K8s 资源自动生成关联 (Ingress路径→Svc→Deploy→Pod)",
"saving": "保存中...",
"resetConfirm": "将清除已保存的布局并重新自动排列",
"editToolbarHint": "双击节点编辑 · 点击虚线删除 · 拖拽调整位置",
"totalNodes": "总节点数",
"connections": "连接数",
"custom2": "自定义",
"allTypes": "全部类型",
"noDataWithCluster": "该集群暂无拓扑数据",
"noDataSelectCluster": "请选择集群查看拓扑",
"nodeList": "节点列表",
"clickToViewDetail": "点击节点查看详情",
"noNodes": "暂无节点",
"customSuffix": "自定义",
"relatedConnections": "关联连接",
"noConnections": "无关联连接",
"editNodeTitle": "编辑节点",
"addNodeTitle": "添加自定义节点",
"editNodeDesc": "修改节点属性",
"addNodeDesc": "添加数据库、外部服务等非 Kubernetes 资源节点",
"namePlaceholder": "如 MySQL 主库、Redis 集群",
"notePlaceholder": "连接信息、用途说明等",
"add2": "添加",
"nodeUpdated": "节点已更新",
"nodeAdded": "节点已添加",
"nodeDeleted": "节点已删除",
"deleteNodeTitle": "删除节点",
"deleteNodeDesc": "确定删除「{{name}}」?相关连线也会一并删除",
"deleteEdgeTitle": "删除连线",
"deleteEdgeDesc": "确定删除此自定义连线?",
"edgeDeleted": "连线已删除",
"nativeEdgeNoDelete": "Kubernetes 原生关系不可删除",
"nodeTypeLabel": "节点类型",
"nodeNameRequired": "请输入节点名称",
"deleteText": "✕ 删除"
},
"resource": {
"configMaps": "配置映射",
"secrets": "密钥",
"services": "服务",
"ingresses": "路由",
"pvcs": "持久卷声明",
"visualEditor": "可视化编辑",
"yamlEditor": "YAML 编辑",
"editResource": "编辑资源",
"visualMode": "可视化模式",
"yamlMode": "YAML 模式",
"keyValuePairs": "键值对",
"addRow": "添加行",
"key": "键",
"value": "值",
"decodedValue": "解码值",
"portConfig": "端口配置",
"selectorConfig": "选择器配置",
"routeRules": "路由规则",
"storageConfig": "存储配置",
"targetPort": "目标端口",
"protocol": "协议",
"nodePort": "节点端口",
"serviceType": "服务类型",
"storageClass": "存储类",
"accessMode": "访问模式",
"size": "大小",
"path": "路径",
"pathType": "路径类型",
"serviceName": "服务名称",
"servicePort": "服务端口",
"host": "主机",
"addPort": "添加端口",
"addRoute": "添加路由",
"addSelector": "添加选择器",
"labelKey": "标签键",
"labelValue": "标签值",
"noPorts": "暂无端口配置",
"noRoutes": "暂无路由规则",
"noSelectors": "暂无选择器",
"saveSuccess": "资源保存成功",
"saveFailed": "资源保存失败",
"parseFailed": "YAML 解析失败,请检查格式",
"plaintext": "明文",
"encoded": "编码"
},
"workload": {
"scheduling": "调度",
"nodeName": "指定节点",
"nodeSelector": "节点选择器",
"nodeAffinity": "节点亲和性",
"service": "Service",
"storage": "存储",
"updateStrategy": "更新策略",
"rollingUpdate": "滚动更新",
"recreate": "重建",
"volumes": "数据卷",
"mounts": "挂载点",
"addVolume": "添加数据卷",
"addMount": "添加挂载",
"portName": "端口名称",
"port": "端口",
"presetHttp": "HTTP",
"presetWebSocket": "WebSocket",
"presetGrpc": "gRPC",
"capacity": "容量",
"accessModes": "访问模式",
"mountPath": "挂载路径",
"subPath": "子路径",
"readOnly": "只读"
}
}
}