feat: 语言国际化重构

This commit is contained in:
DEV_DSW
2026-04-21 16:52:45 +08:00
parent 0c068e9f4d
commit 3349d41881
76 changed files with 4440 additions and 3232 deletions

View File

@@ -1,10 +1,11 @@
import { Suspense, lazy, useEffect, type ReactNode } from 'react';
import { Navigate, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
import MainLayout from '../components/layout/MainLayout';
import { useI18n } from '../i18n';
import LoginPage from '../pages/Login';
import { DEFAULT_PATH } from './routes';
import { RedirectAuthenticated, RequireAuth, isAuthenticated } from './auth';
import { onAuthLogout } from './auth-session';
import { DEFAULT_PATH } from './routes';
const HomePage = lazy(() => import('../pages/Home'));
const ChannelsPage = lazy(() => import('../pages/Channels'));
@@ -15,9 +16,11 @@ const SettingPage = lazy(() => import('../pages/Setting'));
const KnowledgePage = lazy(() => import('../pages/Knowledge'));
function RouteLoadingFallback() {
const { t } = useI18n();
return (
<div className="flex h-full min-h-0 w-full items-center justify-center bg-[#f6f9fc] text-sm text-[#99A0AE] dark:bg-[#0f0f10] dark:text-gray-500">
...
{t('dashboard.route.loading')}
</div>
);
}