fix(web): C1 殘留 i18n — 5 處硬編碼中文改 useTranslations
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
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:
@@ -195,7 +195,10 @@
|
|||||||
"hostView": "Hosts",
|
"hostView": "Hosts",
|
||||||
"topoView": "Topology",
|
"topoView": "Topology",
|
||||||
"waitingHostData": "Waiting for host data...",
|
"waitingHostData": "Waiting for host data...",
|
||||||
"dashboardConnecting": "Dashboard API connecting..."
|
"dashboardConnecting": "Dashboard API connecting...",
|
||||||
|
"alertBadge": "{count} alerts",
|
||||||
|
"alertBadgeZero": "0 alerts",
|
||||||
|
"awaitingConfirm": "⏳ Awaiting Confirmation"
|
||||||
},
|
},
|
||||||
"openclaw": {
|
"openclaw": {
|
||||||
"name": "OpenClaw",
|
"name": "OpenClaw",
|
||||||
|
|||||||
@@ -196,7 +196,10 @@
|
|||||||
"hostView": "主機",
|
"hostView": "主機",
|
||||||
"topoView": "拓撲",
|
"topoView": "拓撲",
|
||||||
"waitingHostData": "等待主機資料...",
|
"waitingHostData": "等待主機資料...",
|
||||||
"dashboardConnecting": "Dashboard API 連線中"
|
"dashboardConnecting": "Dashboard API 連線中",
|
||||||
|
"alertBadge": "{count} 告警",
|
||||||
|
"alertBadgeZero": "0 告警",
|
||||||
|
"awaitingConfirm": "⏳ 等待確認"
|
||||||
},
|
},
|
||||||
"openclaw": {
|
"openclaw": {
|
||||||
"name": "OpenClaw",
|
"name": "OpenClaw",
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ function MonitoringTools() {
|
|||||||
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
|
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
|
||||||
background: 'rgba(245,158,11,0.12)', color: '#F59E0B',
|
background: 'rgba(245,158,11,0.12)', color: '#F59E0B',
|
||||||
}}>
|
}}>
|
||||||
{tool.firing_count} 告警
|
{tDash('alertBadge', { count: tool.firing_count })}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span style={{
|
<span style={{
|
||||||
@@ -381,7 +381,7 @@ function MonitoringTools() {
|
|||||||
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
|
fontSize: 10, padding: '1px 7px', borderRadius: 8, fontWeight: 600,
|
||||||
background: 'rgba(34,197,94,0.1)', color: '#22C55E',
|
background: 'rgba(34,197,94,0.1)', color: '#22C55E',
|
||||||
}}>
|
}}>
|
||||||
0 告警
|
{tDash('alertBadgeZero')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -683,7 +683,7 @@ export default function Home({ params }: { params: { locale: string } }) {
|
|||||||
label: tDashboard('pendingApprovals'),
|
label: tDashboard('pendingApprovals'),
|
||||||
value: pendingApprovals ?? '--',
|
value: pendingApprovals ?? '--',
|
||||||
sub: hasPendingApprovals ? undefined : tDashboard('stable'),
|
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,
|
valueColor: hasPendingApprovals ? '#F59E0B' : undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -998,7 +998,7 @@ export default function Home({ params }: { params: { locale: string } }) {
|
|||||||
color: infraView === 'host' ? '#d97757' : '#87867f',
|
color: infraView === 'host' ? '#d97757' : '#87867f',
|
||||||
boxShadow: infraView === 'host' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
|
boxShadow: infraView === 'host' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
|
||||||
}}
|
}}
|
||||||
>主機</button>
|
>{tDashboard('hostView')}</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => setInfraView('topo')}
|
onClick={() => setInfraView('topo')}
|
||||||
style={{
|
style={{
|
||||||
@@ -1008,7 +1008,7 @@ export default function Home({ params }: { params: { locale: string } }) {
|
|||||||
color: infraView === 'topo' ? '#d97757' : '#87867f',
|
color: infraView === 'topo' ? '#d97757' : '#87867f',
|
||||||
boxShadow: infraView === 'topo' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
|
boxShadow: infraView === 'topo' ? '0 1px 2px rgba(0,0,0,0.06)' : 'none',
|
||||||
}}
|
}}
|
||||||
>拓撲</button>
|
>{tDashboard('topoView')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 主機網格 (預設) */}
|
{/* 主機網格 (預設) */}
|
||||||
|
|||||||
Reference in New Issue
Block a user