fix(web): C1 殘留 i18n — 5 處硬編碼中文改 useTranslations
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled

- 告警 badge: alertBadge / alertBadgeZero
- 等待確認: awaitingConfirm
- 主機/拓撲 toggle: hostView / topoView
- HOST_CATALOG description 確認未渲染,不需 i18n

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-09 11:18:05 +08:00
parent c5e475121a
commit 28d2ff704e
3 changed files with 13 additions and 7 deletions

View File

@@ -195,7 +195,10 @@
"hostView": "Hosts",
"topoView": "Topology",
"waitingHostData": "Waiting for host data...",
"dashboardConnecting": "Dashboard API connecting..."
"dashboardConnecting": "Dashboard API connecting...",
"alertBadge": "{count} alerts",
"alertBadgeZero": "0 alerts",
"awaitingConfirm": "⏳ Awaiting Confirmation"
},
"openclaw": {
"name": "OpenClaw",

View File

@@ -196,7 +196,10 @@
"hostView": "主機",
"topoView": "拓撲",
"waitingHostData": "等待主機資料...",
"dashboardConnecting": "Dashboard API 連線中"
"dashboardConnecting": "Dashboard API 連線中",
"alertBadge": "{count} 告警",
"alertBadgeZero": "0 告警",
"awaitingConfirm": "⏳ 等待確認"
},
"openclaw": {
"name": "OpenClaw",

View File

@@ -373,7 +373,7 @@ function MonitoringTools() {
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
background: 'rgba(245,158,11,0.12)', color: '#F59E0B',
}}>
{tool.firing_count}
{tDash('alertBadge', { count: tool.firing_count })}
</span>
) : (
<span style={{
@@ -381,7 +381,7 @@ function MonitoringTools() {
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
background: 'rgba(34,197,94,0.1)', color: '#22C55E',
}}>
0
{tDash('alertBadgeZero')}
</span>
)}
</div>
@@ -683,7 +683,7 @@ export default function Home({ params }: { params: { locale: string } }) {
label: tDashboard('pendingApprovals'),
value: pendingApprovals ?? '--',
sub: hasPendingApprovals ? undefined : tDashboard('stable'),
badge: hasPendingApprovals ? { text: `⏳ 等待確認`, color: '#F59E0B', bg: 'rgba(245,158,11,0.08)' } : undefined,
badge: hasPendingApprovals ? { text: tDashboard('awaitingConfirm'), color: '#F59E0B', bg: 'rgba(245,158,11,0.08)' } : undefined,
valueColor: hasPendingApprovals ? '#F59E0B' : undefined,
},
{
@@ -998,7 +998,7 @@ export default function Home({ params }: { params: { locale: string } }) {
color: infraView === 'host' ? '#d97757' : '#87867f',
boxShadow: infraView === 'host' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
}}
></button>
>{tDashboard('hostView')}</button>
<button
onClick={() => setInfraView('topo')}
style={{
@@ -1008,7 +1008,7 @@ export default function Home({ params }: { params: { locale: string } }) {
color: infraView === 'topo' ? '#d97757' : '#87867f',
boxShadow: infraView === 'topo' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
}}
></button>
>{tDashboard('topoView')}</button>
</div>
</div>
{/* 主機網格 (預設) */}