refactor(i18n): U36 全量 JSX 属性 + toast 硬编码中文清零 — 20 文件 30 处 → 0
清理 23 处 JSX 属性 (title/placeholder/label/description) + 7 处 toast 调用硬编码中文: - Deploy 模块 (AppRelease/DeployCredentials/PipelineManager/WorkspaceTermDialog/CredFormDialog/JobRoleCreateDialog/PipelineCreateDialog/AdvancedSettingsPanel) - Server 模块 (ServerForm) - System 模块 (LdapManagementSection/LiveMonitorDialog/SystemManager) - Audit 模块 (ActiveSessionsPanel/HistorySessionsPanel) - Monitor 模块 (AlertRulesTab/PrometheusDatasourceManager/SNMPMonitor) - AIOps 模块 (PredictiveCapacityTab) - Common/UI (TerminalLoadingOverlay/copy-button) 新增 25 翻译键 (common.connectingEllipsis/enteringWorkspace/connectingMonitor + deploy.* 11键 + server.jsonFormatPlaceholder + system.* 3键 + audit.* 2键 + monitor.* 3键 + aiops.aiAnalysisFailedToast + pipeline.subtitle) copy-button.tsx 从 import i18n → useTranslation() hook 3 组件新增 useTranslation hook (TerminalLoadingOverlay/WorkspaceTermDialog/LiveMonitorDialog/PredictiveCapacityTab) zh/en 7616→7640 +24 对齐, tsc -b=0, npm build✓ (17.25s), ESLint=0/43/0, go build=0, 17/17 测试通过
This commit is contained in:
1 parent
8d64936caf
commit
09b7fd4ad5
22 files changed
+114
-55
No files matched your search
@@ -138,7 +138,7 @@ function RdpActiveSessionRow({
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-red" onClick={() => onKill(session.id, session.username)} title={t('audit.terminal.killTitle')}>
|
||||
<XOctagon className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-blue" onClick={() => onMonitor(session.id)} title="RDP 实时审计">
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-blue" onClick={() => onMonitor(session.id)} title={t('audit.rdpRealtimeAudit')}>
|
||||
<Eye className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -290,7 +290,7 @@ export function HistorySessionsPanel() {
|
||||
<TableCell>{getStatusBadge(s.status)}</TableCell>
|
||||
<TableCell>
|
||||
<div className="flex items-center justify-end gap-0.5">
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-blue" onClick={() => openRdpReplay(s.id)} disabled={!s.record_size} title="RDP 历史回放">
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-blue" onClick={() => openRdpReplay(s.id)} disabled={!s.record_size} title={t('audit.rdpHistoryReplay')}>
|
||||
<Play className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 dg-text-secondary hover:dg-text-green" onClick={() => rdpSessionApi.download(s.id)} disabled={!s.record_size} title={t('audit.terminal.downloadRecord')}>
|
||||
|
||||
@@ -135,7 +135,7 @@ export function SNMPMonitor() {
|
||||
setCollectingId(d.id);
|
||||
try {
|
||||
await snmpApi.collectDevice(d.id);
|
||||
toast.success(`${d.name} 采集成功`);
|
||||
toast.success(t('monitor.collectSuccess', { name: d.name }));
|
||||
refresh();
|
||||
} catch (err) {
|
||||
toast.error((err as { message?: string }).message || t('monitor.lbl.collectFail'));
|
||||
|
||||
Reference in new issue
Block a user