feat(i18n): 增量国际化迁移 — deploy/kubernetes/monitor/task 全模块 + 补全 28 缺失翻译键

迁移范围:
- deploy 模块 (PipelineEditor/PipelineDetailDialog/PipelineFormDialog/PipelineRunDialog/ReleaseCreateDialog/ReleaseDetailDialog/ReleaseManager/ToolConfigTab/JobRoleCreateDialog 等 14 文件)
- kubernetes 模块 (YamlEditorToolbar/DeploymentHpaTab/DeploymentLogsTab/DeploymentPodsTab/DnsHostSection/SchedulingSection/EventsTab/HPACronHPATab/HistoryTab/PodsTab/ServicesTab/ActionModals 等 12 文件)
- monitor 模块 (AlertEventsTab/AlertCenterDetail/DatasourcePage/LogAlertBell/LogCenter/LogCenterArchBanner/StatChartPanel/LogRoleCreateDialog 等 8 文件)
- task 模块 (CronJobStatsPanel/CronJobTable/CronJobViewDialog/ExecutionHistoryDialog 4 文件)
- layout (PageEmpty/PageLoading 2 文件)
- site-monitor/snmp-monitor 模块 (6 文件)

翻译键: 3975 → 4003 (+28 缺失键补全), 22 命名空间, zh-CN/en-US 完全对齐
新增命名空间: agent/aiops/cloud/kubernetes/monitor/pipeline/rbac/system/task/ui

验证: go build✅ tsc -b=0 npm build✅ (20.78s) 17/17 集成测试通过
This commit is contained in:
attacker committed 2026-07-02 12:39:36 +08:00
1 parent eddf01dd79
commit 63e4c220d4
59 files changed
+6713 -641

No files matched your search

@@ -1,5 +1,6 @@
// code-snippet-block.tsx — 代码片段展示 + 外侧复制按钮 // Logan.Li
import { CopyButton } from '@/components/ui/copy-button';
import { useTranslation } from 'react-i18next';
import { cn } from '@/lib/utils';
export interface CodeSnippetBlockProps {
@@ -13,8 +14,10 @@ export interface CodeSnippetBlockProps {
}
export function CodeSnippetBlock({
label, code, copyLabel = '已复制', className, copyDisabled, copyDisabledTitle,
label, code, copyLabel, className, copyDisabled, copyDisabledTitle,
}: CodeSnippetBlockProps) {
const { t } = useTranslation();
const resolvedCopyLabel = copyLabel ?? t('common.copied');
return (
<div className={cn('space-y-1.5', className)}>
<div className="flex items-center justify-between gap-2">
@@ -25,14 +28,14 @@ export function CodeSnippetBlock({
)}
<CopyButton
text={code}
label={copyLabel}
label={resolvedCopyLabel}
variant="outline"
size="sm"
className="border-[var(--dg-border)] text-[var(--dg-text-secondary)] h-7 px-2"
disabled={copyDisabled}
title={copyDisabled ? (copyDisabledTitle || '不可复制') : '复制'}
title={copyDisabled ? (copyDisabledTitle || t('ui.codeSnippet.copyDisabled')) : t('common.copy')}
>
复制
{t('common.copy')}
</CopyButton>
</div>
<pre className="text-[11px] font-mono text-[var(--dg-text-secondary)] bg-[var(--dg-bg-secondary)] border border-[var(--dg-border)] rounded-md p-3 overflow-x-auto whitespace-pre-wrap leading-relaxed">