feat(frontend): 控制台 next-intl 中英双语

接入无 URL 前缀的 zh-CN/en,顶栏与外观设置可切换语言;选择写入 cookie 后刷新生效。
This commit is contained in:
ryan
2026-08-16 16:49:16 +08:00
parent 64fbaa7ef1
commit 5a8722ff07
219 changed files with 21437 additions and 5212 deletions
@@ -1,6 +1,7 @@
'use client';
import type { ReactNode } from 'react';
import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
@@ -28,6 +29,8 @@ export function SectionShell({
saving = false,
children,
}: SectionShellProps) {
const t = useTranslations('proxyRoutes');
const tc = useTranslations('common');
return (
<Card>
<CardHeader className='flex flex-row items-start justify-between gap-4 space-y-0'>
@@ -45,7 +48,7 @@ export function SectionShell({
className='h-8 shrink-0 text-xs'
disabled={saving}
>
{saving ? '保存中...' : '保存'}
{saving ? t('saving') : tc('save')}
</Button>
</CardHeader>
<CardContent>{children}</CardContent>