Replace react-intl with next-intl and consolidate lang files.
Migrate i18n from react-intl to next-intl, eliminating the formatjs compilation pipeline. Translation files now live as nested JSON in public/intl/messages/ (single source of truth), removing the duplicated src/lang/ directory and the copy/compile build steps. The useMessages() hook API is preserved so all 195+ consumer components are unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
fed8d4c71a
commit
a1890e9261
118 files changed
+18151
-136657
No files matched your search
@@ -2,8 +2,8 @@
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { RouterProvider, ZenProvider } from '@umami/react-zen';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import { useEffect } from 'react';
|
||||
import { IntlProvider } from 'react-intl';
|
||||
import { ErrorBoundary } from '@/components/common/ErrorBoundary';
|
||||
import { useLocale } from '@/components/hooks';
|
||||
import 'chartjs-adapter-date-fns';
|
||||
@@ -27,9 +27,9 @@ function MessagesProvider({ children }) {
|
||||
}, [locale, dir]);
|
||||
|
||||
return (
|
||||
<IntlProvider locale={locale} messages={messages[locale]} onError={() => null}>
|
||||
<NextIntlClientProvider locale={locale} messages={messages[locale]} onError={() => null}>
|
||||
{children}
|
||||
</IntlProvider>
|
||||
</NextIntlClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user