refactor(i18n): U39 残余 JSX 属性/模板字面量中文清零 — 14 处→0

10 文件修复:
- DualLineChart: subtitle 接收/发送→i18n.t(monitor.lbl.receiveSend)
- NetworkTab: 5处 unit="个"→t(common.unitCount)
- FDUsageCard: subtitle 当前→t(monitor.lbl.currentFDUsage)
- NamespaceOverviewPage: subtitle 命名空间概览→i18n.t(k8s.nsOverview.subtitle)
- NamespaceManagementPage: subtitle 资源配额→i18n.t(k8s.nsMgmt.quotaSubtitle)
- CreateHPADialog: title+text 命名空间→i18n.t(k8s.hpa.targetInfo)
- LogFieldSidebar: title 个值→i18n.t(common.fieldValues)
- LiveMonitorDialog: title 全屏/退出全屏→t(common.fullscreen/exitFullscreen)
- ExecutionHistoryDialog: title 成功/失败→t(task.execHistory.successFail)
- LdapSettingsTab: className 成功检查→ldapTestSuccess boolean 状态

新增 11 翻译键 (common.unitCount/fieldValues/exitFullscreen/fullscreen +
monitor.lbl.receiveSend/currentFDUsage + k8s.nsOverview.subtitle/nsMgmt.quotaSubtitle/hpa.targetInfo +
task.execHistory.successFail), zh/en 7751→7762 对齐

tsc -b=0, npm build✓ (16.94s), ESLint=0/0/any=0, go build=0, 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-13 13:12:54 +08:00
1 parent a1d82574a7
commit 5205def47f
14 files changed
+67 -29

No files matched your search

@@ -68,7 +68,7 @@ export function DualLineChart({
unit={unit}
chartId={`dual-${title.replace(/\s/g, '')}`}
title={title}
subtitle={`接收 ${currentRx} · 发送 ${currentTx}`}
subtitle={i18n.t('monitor.lbl.receiveSend', { rx: currentRx, tx: currentTx })}
height={208}
toolbarPlacement="header"
onZoomedChange={setZoomed}
@@ -63,7 +63,7 @@ export function FDUsageCard({ fdInfo, fdMetrics, aggType, fdChartRef, fdChartZoo
unit="%"
chartId="fd-usage"
title={t('monitor.lbl.nicBandwidth')}
subtitle={fdInfo?.usage_pct != null ? `当前 ${fdInfo.usage_pct.toFixed(1)}%` : undefined}
subtitle={fdInfo?.usage_pct != null ? t('monitor.lbl.currentFDUsage', { pct: fdInfo.usage_pct.toFixed(1) }) : undefined}
height={160}
toolbarPlacement="header"
onZoomedChange={setFdChartZoomed}
@@ -28,11 +28,11 @@ export function NetworkTab({ metrics, netInfo, currentVal, aggType }: NetworkTab
<MetricChartCard title="TCP EST" value={currentVal('tcp')} icon={<Network />} iconTone="purple"
data={metrics.tcpEst} color="#8b5cf6" unit={t('monitor.hostMonitorPanel.portUnit')} domain={[0, 'auto']} aggType={aggType} />
<MetricChartCard title="TCP TIME_WAIT" value={currentVal('tw')} icon={<Clock />} iconTone="yellow"
data={metrics.tcpTW} color="#f59e0b" unit="个" domain={[0, 'auto']} aggType={aggType} />
data={metrics.tcpTW} color="#f59e0b" unit={t('common.unitCount')} domain={[0, 'auto']} aggType={aggType} />
<MetricChartCard title="TCP CLOSE_WAIT" value={netInfo?.tcp_close_wait != null ? String(netInfo.tcp_close_wait) : '--'} icon={<Clock />} iconTone="red"
data={metrics.tcpCW} color="#ef4444" unit="个" domain={[0, 'auto']} aggType={aggType} />
data={metrics.tcpCW} color="#ef4444" unit={t('common.unitCount')} domain={[0, 'auto']} aggType={aggType} />
<MetricChartCard title={t('monitor.lbl.memUsage')} value={connTotal} icon={<Network />} iconTone="cyan"
data={metrics.connTotal} color="#22d3ee" unit="个" domain={[0, 'auto']} aggType={aggType} />
data={metrics.connTotal} color="#22d3ee" unit={t('common.unitCount')} domain={[0, 'auto']} aggType={aggType} />
</div>
<DualLineChart
title={t('monitor.lbl.hostMonitor')}
@@ -43,9 +43,9 @@ export function NetworkTab({ metrics, netInfo, currentVal, aggType }: NetworkTab
/>
<div className="grid grid-cols-1 md:grid-cols-2 gap-3 mt-3">
<MetricChartCard title={t('monitor.lbl.nicRxErrors')} value={netInfo?.net_rx_errors != null ? String(netInfo.net_rx_errors) : '--'} icon={<XCircle />} iconTone="red"
data={metrics.rxErr} color="#ef4444" unit="个" domain={[0, 'auto']} aggType={aggType} />
data={metrics.rxErr} color="#ef4444" unit={t('common.unitCount')} domain={[0, 'auto']} aggType={aggType} />
<MetricChartCard title={t('monitor.lbl.nicTxErrors')} value={netInfo?.net_tx_errors != null ? String(netInfo.net_tx_errors) : '--'} icon={<XCircle />} iconTone="orange"
data={metrics.txErr} color="#f97316" unit="个" domain={[0, 'auto']} aggType={aggType} />
data={metrics.txErr} color="#f97316" unit={t('common.unitCount')} domain={[0, 'auto']} aggType={aggType} />
</div>
</div>
);