feat(i18n): 安全批量转换 135 文件 — 覆盖率 34%→62%
使用 i18n.t() 全局方式(避免 hook 定位问题): - 288 目标文件中 135 个成功转换 - 2228 处中文替换为 i18n.t() 调用 - 1006 个新翻译 key 添加到 zh-CN.json + en-US.json - 词典总量: 3554 keys (22 namespaces) - tsc 零错误 + Vite 构建成功 - 6 个含代码示例/数据字符串的文件安全回退
This commit is contained in:
1 parent
72bfb0e12d
commit
55f216cfbb
131 files changed
+4049
-1908
No files matched your search
@@ -1,6 +1,7 @@
|
||||
// 服务器统计条 — 紧凑型替代 4 张大卡片
|
||||
import { StatStrip } from '@/components/ui/stat-strip';
|
||||
import type { JsonData } from '@/types/common';
|
||||
import i18n from '@/i18n';
|
||||
|
||||
interface ServerStatsStripProps {
|
||||
servers: JsonData[];
|
||||
@@ -14,10 +15,10 @@ export function ServerStatsStrip({ servers }: ServerStatsStripProps) {
|
||||
return (
|
||||
<StatStrip
|
||||
items={[
|
||||
{ label: '服务器', value: servers.length, color: 'blue' },
|
||||
{ label: '运行中', value: runningCount, color: 'emerald' },
|
||||
{ label: '维护中', value: maintenanceCount, color: 'amber' },
|
||||
{ label: '已停止', value: stoppedCount, color: 'muted' },
|
||||
{ label: i18n.t('system.terminalServer'), value: servers.length, color: 'blue' },
|
||||
{ label: i18n.t('agent.agentServiceRunning'), value: runningCount, color: 'emerald' },
|
||||
{ label: i18n.t('dashboard.serversStatus.maintenance'), value: maintenanceCount, color: 'amber' },
|
||||
{ label: i18n.t('agent.agentServiceStopped'), value: stoppedCount, color: 'muted' },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user