mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-29 11:05:33 +02:00
chore(dependencies): update zod version across multiple packages to 3.25.76 and remove unused i18next dependencies
- Updated zod version from 3.25.32 to 3.25.76 in pnpm-lock.yaml, package.json files for api, dokploy, schedules, and server. - Removed i18next and related localization code from the dokploy application to streamline the codebase.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import Cookies from "js-cookie";
|
||||
import type { LanguageCode } from "@/lib/languages";
|
||||
|
||||
export default function useLocale() {
|
||||
const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as LanguageCode;
|
||||
|
||||
const setLocale = (locale: LanguageCode) => {
|
||||
Cookies.set("DOKPLOY_LOCALE", locale, { expires: 365 });
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
return {
|
||||
locale: currentLocale,
|
||||
setLocale,
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import type { NextApiRequestCookies } from "next/dist/server/api-utils";
|
||||
|
||||
export function getLocale(cookies: NextApiRequestCookies) {
|
||||
const locale = cookies.DOKPLOY_LOCALE ?? "en";
|
||||
return locale;
|
||||
}
|
||||
|
||||
import { serverSideTranslations as originalServerSideTranslations } from "next-i18next/serverSideTranslations";
|
||||
import { Languages } from "@/lib/languages";
|
||||
|
||||
export const serverSideTranslations = (
|
||||
locale: string,
|
||||
namespaces = ["common"],
|
||||
) =>
|
||||
originalServerSideTranslations(locale, namespaces, {
|
||||
fallbackLng: "en",
|
||||
keySeparator: false,
|
||||
i18n: {
|
||||
defaultLocale: "en",
|
||||
locales: Object.values(Languages).map((language) => language.code),
|
||||
localeDetection: false,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user