claude-ws 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/i18n/request.ts +15 -2
package/package.json
CHANGED
package/src/i18n/request.ts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { getRequestConfig } from 'next-intl/server';
|
|
2
|
-
import { locales } from './config';
|
|
2
|
+
import { locales, type Locale } from './config';
|
|
3
|
+
|
|
4
|
+
// Static imports for Turbopack compatibility (dynamic template literal imports not supported)
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
const messageImports: Record<Locale, () => Promise<{ default: Record<string, any> }>> = {
|
|
7
|
+
de: () => import('@/locales/de.json'),
|
|
8
|
+
en: () => import('@/locales/en.json'),
|
|
9
|
+
es: () => import('@/locales/es.json'),
|
|
10
|
+
fr: () => import('@/locales/fr.json'),
|
|
11
|
+
ja: () => import('@/locales/ja.json'),
|
|
12
|
+
ko: () => import('@/locales/ko.json'),
|
|
13
|
+
vi: () => import('@/locales/vi.json'),
|
|
14
|
+
zh: () => import('@/locales/zh.json'),
|
|
15
|
+
};
|
|
3
16
|
|
|
4
17
|
export default getRequestConfig(async ({ requestLocale }) => {
|
|
5
18
|
let locale = await requestLocale;
|
|
@@ -10,6 +23,6 @@ export default getRequestConfig(async ({ requestLocale }) => {
|
|
|
10
23
|
|
|
11
24
|
return {
|
|
12
25
|
locale,
|
|
13
|
-
messages: (await
|
|
26
|
+
messages: (await messageImports[locale as Locale]()).default,
|
|
14
27
|
};
|
|
15
28
|
});
|