Update i18n settings and upgrade dependencies in lockfile
This commit refactors the i18n settings in `i18n.settings.ts` to improve language handling. In addition, it updates the `pnpm-lock.yaml` file to upgrade the lockfile version and several package dependencies. Most notably, it integrates `tailwind-merge` and `@tanstack/react-table` into various packages.
This commit is contained in:
@@ -45,5 +45,11 @@
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-table": "^8.16.0",
|
||||
"next": "14.3.0-canary.7",
|
||||
"tailwind-merge": "^2.2.2",
|
||||
"zod": "^3.22.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@ export function I18nProvider({
|
||||
settings: InitOptions;
|
||||
resolver: Resolver;
|
||||
}>) {
|
||||
if (!client) {
|
||||
// If the client is not initialized or
|
||||
// the language has changed, reinitialize the client
|
||||
if (!client || client.language !== settings.lng) {
|
||||
throw withI18nClient(settings, resolver);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ export async function initializeServerI18n(
|
||||
}
|
||||
|
||||
await i18nInstance
|
||||
.use(initReactI18next)
|
||||
.use(
|
||||
resourcesToBackend(async (language, namespace, callback) => {
|
||||
try {
|
||||
@@ -36,6 +35,7 @@ export async function initializeServerI18n(
|
||||
}
|
||||
}),
|
||||
)
|
||||
.use(initReactI18next)
|
||||
.init(settings);
|
||||
|
||||
return i18nInstance;
|
||||
|
||||
Reference in New Issue
Block a user