refactor(i18n): U27 多模块 phantom key 批量清理 — Cloud/Deploy/Agent/Monitor/System 5 模块 25 文件, 180 个 phantom key → 51 残留, 129 个替换为语义化键, 新增 12 子命名空间, zh/en 7185→7294 +109 键对齐, tsc -b=0, npm build✓ (16.31s), ESLint=0/0/0, go build=0, 17/17 测试通过

This commit is contained in:
attacker committed 2026-07-12 03:00:20 +08:00
1 parent 7f5295cfc2
commit b812b3b20c
27 files changed
+459 -148

No files matched your search

@@ -34,7 +34,7 @@ export default function PrometheusDatasourceManager() {
const [editingDs, setEditingDs] = useState<PromDS | null>(null);
useEffect(() => {
if (isError) toast.error(i18n.t('获取数据源列表失败'));
if (isError) toast.error(i18n.t('monitor.promDs2.listFailed'));
}, [isError]);
const openCreate = () => {
@@ -67,7 +67,7 @@ export default function PrometheusDatasourceManager() {
await setDefaultMutation.mutateAsync(ds.id);
toast.success(`已将「${ds.name}」设为默认数据源`);
} catch {
toast.error(i18n.t('删除失败'));
toast.error(i18n.t('monitor.promDs2.deleteFailed'));
}
};
@@ -95,8 +95,8 @@ export default function PrometheusDatasourceManager() {
{sources.length === 0 ? (
<PageEmpty
icon={<Database className="h-12 w-12" />}
title={i18n.t('暂无 Prometheus 数据源')}
description={i18n.t('添加数据源后可用于指标监控与监控大屏')}
title={i18n.t('monitor.promDs2.noData')}
description={i18n.t('monitor.promDs2.addHint')}
action={(
<Button onClick={openCreate} size="sm" className="dg-btn-primary">
<Plus className="w-4 h-4 mr-1" />添加数据源