refactor(i18n): U32 全量 hash key 清理 — 151 个 hash key → 语义化键 + React Hooks 警告 53→43

- 151 个 hash-style flat key (s+hex 后缀) 全部重命名为语义化 nested key
  - monitor 58 个: alertChannelDialog/alertManager/alertRulesTab/chartRangeHint/
    esIndexPicker/helpers/hostMonitor/logAlertSpanel/logClusterPanel/logDingAssistant/
    logQueryToolbar/logRbac/lokiLabelBrowse/metricsExplorer/middlewareMonit/
    mwOverviewChart/portPolicyDialog/prometheusDashb/queryHistoryPan/savedQueriesPan/
    siteMonitor/snmpMonitor/snmpOverviewChart/zabbixDashboard/zabbixDatasource
  - kubernetes 42 个: deploymentBundle/deploymentEditAdvanced/deploymentEditService/
    deploymentView/deploymentWorkload/eventsPage/kubernetesCluster/namespaceManage/
    namespaceResource/podExecTerminal/podFileBrowser/podLogsViewer/podMetricsPage/
    resourceVisualEditor/workloadViewPage
  - aiops 17 个: agentCliMessage/aiAnalysisResult/analyzerHelpers/assistant/predictUtils
  - agent 12 个: agentAlerts/agentMonitor/hostDetailDialog
  - cloud 13 个: billingRecordDialog/billingRuleDialog/platformManager
  - pipeline 6 个: buildNodesManage/deployRbac/deployTargetField
  - system 3 个: auditSetting
- 58 个源文件中的 147 处 t()/i18n.t() 调用更新为语义化键路径
- 3 个命名空间冲突修复 (monitor.hostMonitor/agent.agentMonitor/aiops.aiAnalysisResult
  原 string 值提升为 .title 子键)
- React Hooks 警告修复 (53→43, -10):
  - exhaustive-deps 4→0: useMemo/useCallback 添加 t 到 deps 数组
  - preserve-manual-memoization 5→0: 变量遮蔽修复 (filter(t)→filter(tg))
  - 1 个冗余 eslint-disable 指令移除 (CronJobManager)
- zh/en 7480=7480 完全对齐, 0 个 hash key 残留
- tsc -b=0, npm build✓ (17.59s), ESLint errors=0/warnings=43/any=0
- go build=0, 17/17 集成测试通过, Docker healthy
This commit is contained in:
attacker committed 2026-07-12 14:35:01 +08:00
1 parent 4f2d279865
commit ff426d908b
63 files changed
+674 -477

No files matched your search

@@ -202,13 +202,13 @@ export default function BuildNodesManager({ embedded = false }: { embedded?: boo
<div className="flex items-center gap-2">
<Cpu className="h-4 w-4 text-[var(--dg-text-muted)]" />
<span className="text-sm font-medium text-[var(--dg-text-primary)]">{i18n.t('deploy.buildNodes.masterBuiltin')}</span>
<Badge variant="outline" className="text-[10px]"> {i18n.t('pipeline.buildnodesmanag.sa419fe03')} </Badge>
<Badge variant="outline" className="text-[10px]"> {i18n.t('pipeline.buildNodesManage.defaultSchedule')} </Badge>
<span className="text-xs text-[var(--dg-text-muted)]">
{i18n.t('deploy.buildNodes.executorUsage', { running: master.running_count, max: master.max_executors })}
</span>
</div>
<div className="flex items-center gap-2">
<Label className="text-xs text-[var(--dg-text-muted)] shrink-0"> {i18n.t('pipeline.buildnodesmanag.s8e408e28')} </Label>
<Label className="text-xs text-[var(--dg-text-muted)] shrink-0"> {i18n.t('pipeline.buildNodesManage.maxConcurrency')} </Label>
<Input
type="number"
min={1}
@@ -308,11 +308,11 @@ export default function BuildNodesManager({ embedded = false }: { embedded?: boo
</div>
<div className="grid grid-cols-2 gap-2">
<div className="space-y-1">
<Label className="text-xs"> {i18n.t('pipeline.buildnodesmanag.s8e408e28')} </Label>
<Label className="text-xs"> {i18n.t('pipeline.buildNodesManage.maxConcurrency')} </Label>
<Input value={maxExecutors} onChange={(e) => setMaxExecutors(e.target.value)} type="number" min={1} className="h-8 text-xs dg-input" />
</div>
<div className="space-y-1">
<Label className="text-xs"> {i18n.t('pipeline.buildnodesmanag.sbcfcd088')} </Label>
<Label className="text-xs"> {i18n.t('pipeline.buildNodesManage.workspacePath')} </Label>
<Input value={workspacePath} onChange={(e) => setWorkspacePath(e.target.value)} className="h-8 text-xs font-mono dg-input" />
</div>
</div>
@@ -219,7 +219,7 @@ export default function DeployRBAC() {
icon={<Shield className="h-10 w-10" />}
title={i18n.t('deploy.rbac.policy.noPolicy')}
description={i18n.t('deploy.rbac.policy.createHint')}
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logrbactsx.s6058845c')} </Button>}
action={<Button onClick={() => setCreateOpen(true)}><Plus className="h-4 w-4 mr-1" /> {i18n.t('monitor.logRbac.newPermission')} </Button>}
/>
) : (
<div className="space-y-2">
@@ -313,7 +313,7 @@ export default function DeployRBAC() {
</div>
{selectedUser ? (
assignments.length === 0 ? (
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployrbactsx.sef9548ee')} </p>
<p className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployRbac.noJobPermission')} </p>
) : (
<div className="space-y-1.5">
{assignments.map((a) => {
@@ -334,7 +334,7 @@ export default function DeployRBAC() {
</div>
)
) : (
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logrbactsx.s9be00c95')} </p>
<p className="text-xs text-[var(--dg-text-muted)] flex items-center gap-1"><Users className="w-3.5 h-3.5" /> {i18n.t('monitor.logRbac.selectUserHint')} </p>
)}
</CardContent>
</Card>
@@ -369,7 +369,7 @@ export default function DeployRBAC() {
</Badge>
))}
{previewRoleId !== null && previewMatches.length === 0 && (
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logrbactsx.s64096f4d')} </span>
<span className="text-xs text-[var(--dg-text-muted)]"> {i18n.t('monitor.logRbac.noMatchHint')} </span>
)}
</div>
</CardContent>
@@ -210,7 +210,7 @@ export function DeployTargetFields({ value, onChange, requireTarget = true }: De
<Loader2 className="h-4 w-4 animate-spin mr-1.5" />加载中
</div>
) : filteredServers.length === 0 ? (
<p className="text-xs text-[var(--dg-text-muted)] text-center py-8"> {i18n.t('pipeline.deploytargetfie.sb4240171')} </p>
<p className="text-xs text-[var(--dg-text-muted)] text-center py-8"> {i18n.t('pipeline.deployTargetField.noHostAvailable')} </p>
) : (
<div className="p-1.5 space-y-1">
{filteredServers.map((srv) => {
@@ -242,7 +242,7 @@ export function DeployTargetFields({ value, onChange, requireTarget = true }: De
</div>
)}
</ScrollArea>
<p className="text-[10px] text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deploytargetfie.sb2b6db98')} </p>
<p className="text-[10px] text-[var(--dg-text-muted)]"> {i18n.t('pipeline.deployTargetField.scpDeployHint')} </p>
<div className="grid grid-cols-2 gap-2">
<div className="space-y-1">
<Label className="text-xs"> {i18n.t('kubernetes.container.containerName')} </Label>