docs: ROADMAP U49 cost-predict.ts i18n 深度治理记录
This commit is contained in:
1 parent
083f4477db
commit
337fbff617
1 file changed
+1
@@ -537,6 +537,7 @@ services/api.ts (1324L)
|
||||
| U47 | i18n 最后 3 处残余硬编码中文清零 — 全量 CJK 扫描验证(cloud-server-import/types.ts 阿里云/腾讯云/华为云→i18n.t('cloud.*') + TerminalSessionsTab.tsx 批量删除→t('system.terminalBatchDelete') + PreviewTable.tsx 类型→t('common.type') — **全前端非注释 CJK 字符 = 0**, 复用已有翻译键零新增, zh/en 8102=8102 对齐;tsc -b=0, npm build✓ (18.02s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||
| F7 | 集群详情 EventsTab 真实后端对接(DEMO_EVENTS 硬编码→kubernetesApi.getEvents 真实 K8s 事件 + 复用 normalizeK8sEvent/formatEventRelative 工具 + loading/empty 状态 + 刷新按钮 + Warning 优先排序 + 限 100 条 — 修复 Q28 拆分时遗留的 demo 数据对接缺口 + 修复 aiops_alert_analysis.go log.Printf %s→%d go vet 失败) | P1 | **done** |
|
||||
| U48 | i18n locale 懒加载优化(en-US.json 静态导入→动态导入独立 chunk — 主 index chunk 696KB→423KB (-39%/-273KB),en-US chunk 290KB 按需懒加载,Vite 600KB 警告消除;zh-CN 默认语言保持内联无行为变化,已选英文用户刷新页面异步加载有短暂中文闪烁;ensureLocaleLoaded() + i18n.addResourceBundle 按需加载模式;setLanguage 调用 ensureLocaleLoaded 确保语言包加载完成后再切换;tsc -b=0, npm build✓ (18.18s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||
| U49 | cost-predict.ts i18n 深度治理 — hash key 清理 + 错误 key 修复 + 硬编码中文清零(23 个 predictutilsts.s* hash 键重命名为 costPredict.* 语义化键 + 7 处 buildCostInsightPrompt 硬编码中文模板字面量→i18n.t() 插值 + 修复 costRecommendation 引用 predictMemLeak(内存泄漏建议)→costPredict.rec* 成本建议 + 修复 dimension 引用 predictDiskFull(磁盘清理)→costPredict.allProviders(全部) + 修复 providerLabel 引用 predictIn24h(24小时后)→costPredict.allProviders — 新增 34 语义化翻译键 aiops.costPredict.*, zh/en 8102→8113 对齐;tsc -b=0, npm build✓ (19.29s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||
| U37 | 全量 JSX 文本节点硬编码中文清零(65 文件 151 处→0: MiddlewareMonitor/SiteMonitor/SNMPMonitor/HealthProbeSection/ContextSwitchCard/ProcessTable/PortMonitorTab/MwTargetChartsPanel/MiddlewareDialog/ChartRangeHint/SnmpDeviceChartsPanel/AlertRulesTab/LogClusterPanel/LogDatasourcePage/LogQueryToolbar/LogAlertsPanel/PrometheusDatasourceManager/PodMetricsPage/CapacityPage/NamespaceManagementPage/NamespaceResourcePage/DeploymentEditService/EventsPage/DeploymentDetail/ClusterOverviewPage/DeploymentEditContainers/DeploymentEditStorage/WorkloadViewPage/BottomStatusBar/UpdateStrategySelectorCards/PodInstancesTable/shared-components/UpdateStrategyCard/TolerationsCard/HostSettingsCard/IngressListItem/ServiceListItem/ServiceCreateForm/IngressCreateForm/CreateHPADialog/DeployCredentials/DeployRBAC/UserGroupsManager/BuildNodesManager/DeployTargetFields/PipelineCreateDialog/CredFormDialog/WorkspaceTermDialog/AgentAlerts/AgentRuleDialog/LiveMonitorDialog/RoleFormDialog/CronJobViewDialog/TerminalOutput/AIAnalysisResult/AIPredictiveAnalytics/PredictiveCostTab/PredictiveCapacityTab/ActiveSessionsPanel/HistorySessionsPanel/TerminalDialog/ServerFileBrowser/PodFileBrowser/SiteResultsPanel/SiteProtocolPieChart — 151 JSX 文本节点中文全部替换为 t()/i18n.t() 调用;新增 common.* 98 翻译键 (selectedCount/itemsCount/newValue/namespaceLabel/containerLabel/replicasLabel/minReplicas/maxReplicas/createNamespace/noNamespace/unknownResource/exportYaml/loadTrend/loadCapacity/predicted/threshold/hostSettings/addVolume/addMount/createService/createIngress/editAction/updateStrategy/selectAndLabel/historyVersion/fileBrowser/scale/back/createHpa/allNamespaces/certLabel/observable/deviceList/addDevice/addMonitor/collectNow/addTask/addProbe/restoreFull/contextSwitch/processTop/listenPorts/terminalRealtime/auditWebssh/buildTerminal/fileBrowse/newDir/loadDeployment/notLinked/selectedPerms/none/hasLabel/deleteNamespace/deleteNamespaceWarn/allResources/notFoundDeploy/nodeList/fileLabel/addCustom/newInstanceService/newInstanceIngress/totalContainers/workContainers/loadingEllipsis/volumeClaimTemplates/containerTemplate/passwordOptional/updated/page/perPage/clusterMode/totalLogs/countLabel/percentage/queryTime/addDatasource/newPermission/newEnv/envLabel/displayName/newUserGroup/auditTrace/predictValue/confidence/predictMonthEnd/noCapacityData/securityMode/standardRdp/domainLabel/noRdpActive/noRdpHistory/buffer/matched/podLogs/createHpaTitle/password/events/total);37 文件已有 import i18n→i18n.t() 模式, 2 文件新增 import i18n;zh/en 7640→3526 namespace-flat +98 键对齐;tsc -b=0, npm build✓ (17.96s), ESLint=0/43/any=0, go build=0, 17/17 测试通过) | P3 | **done** |
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user