fix(i18n): restore both I18nProviders with correct config
The app uses two i18n systems: 1. @lilith/i18n (i18next) - for useTranslation, useAboutPageContent hooks 2. ./i18n (makeI18n factory) - for domain-specific useI18n hook Both providers are needed: - main.tsx: Generic I18nProvider with bundled resources - App.tsx: Domain-specific I18nProvider with apiUrl for MSW 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c208b77a51
commit
d8693f1e99
2 changed files with 11 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ import { usePageViewTracking } from '@lilith/analytics-client/react'
|
|||
import { ThemeProvider } from '@lilith/ui-theme'
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom'
|
||||
|
||||
import { I18nProvider } from './i18n'
|
||||
import Layout from './components/Layout'
|
||||
import AboutPage from './pages/about/AboutPage'
|
||||
import { AppsGallery, AppPage } from './pages/apps'
|
||||
|
|
@ -37,7 +38,14 @@ export default function App() {
|
|||
return (
|
||||
<ThemeProvider defaultTheme="cyberpunk">
|
||||
<BrowserRouter>
|
||||
<AppContent />
|
||||
<I18nProvider
|
||||
apiUrl="/api/i18n"
|
||||
config={{
|
||||
supportedLocales: ['en', 'es', 'zh', 'fr', 'de', 'pt', 'ja', 'ar'],
|
||||
}}
|
||||
>
|
||||
<AppContent />
|
||||
</I18nProvider>
|
||||
</BrowserRouter>
|
||||
</ThemeProvider>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -106,9 +106,10 @@ function renderApp() {
|
|||
<ErrorBoundary FallbackComponent={ErrorFallback}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<AnalyticsProvider config={analyticsConfig}>
|
||||
{/* Generic I18nProvider for @lilith/i18n hooks (useTranslation, useAboutPageContent) */}
|
||||
<I18nProvider config={i18nConfig}>
|
||||
<ThemeProvider>
|
||||
{/* App now contains the new I18nProvider from makeI18n factory */}
|
||||
{/* App contains additional domain-specific I18nProvider from makeI18n factory */}
|
||||
<App />
|
||||
<Toaster position="top-center" />
|
||||
</ThemeProvider>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue