diff --git a/apps/api/package.json b/apps/api/package.json index 70c8aaac8..71d948076 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -20,7 +20,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "redis": "4.7.0", - "zod": "^3.25.32" + "zod": "^3.25.76" }, "devDependencies": { "@types/node": "^20.16.0", diff --git a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx index 461a4c17c..8540835c8 100644 --- a/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx +++ b/apps/dokploy/components/dashboard/settings/profile/profile-form.tsx @@ -1,6 +1,5 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Loader2, Palette, User } from "lucide-react"; -import { useTranslation } from "next-i18next"; import { useEffect, useMemo, useRef, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -73,7 +72,6 @@ export const ProfileForm = () => { isError, error, } = api.user.update.useMutation(); - const { t } = useTranslation("settings"); const [gravatarHash, setGravatarHash] = useState(null); const colorInputRef = useRef(null); @@ -157,10 +155,10 @@ export const ProfileForm = () => {
- {t("settings.profile.title")} + Account - {t("settings.profile.description")} + Change the details of your profile here.
@@ -213,12 +211,9 @@ export const ProfileForm = () => { name="email" render={({ field }) => ( - {t("settings.profile.email")} + Email - + @@ -233,7 +228,7 @@ export const ProfileForm = () => { @@ -247,13 +242,11 @@ export const ProfileForm = () => { name="password" render={({ field }) => ( - - {t("settings.profile.password")} - + Password @@ -268,9 +261,7 @@ export const ProfileForm = () => { name="image" render={({ field }) => ( - - {t("settings.profile.avatar")} - + Avatar { @@ -454,7 +445,7 @@ export const ProfileForm = () => {
diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx index 42b73cf59..b4a9ff946 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-dokploy-actions.tsx @@ -1,4 +1,3 @@ -import { useTranslation } from "next-i18next"; import { toast } from "sonner"; import { UpdateServerIp } from "@/components/dashboard/settings/web-server/update-server-ip"; import { Button } from "@/components/ui/button"; @@ -17,7 +16,6 @@ import { TerminalModal } from "../../web-server/terminal-modal"; import { GPUSupportModal } from "../gpu-support-modal"; export const ShowDokployActions = () => { - const { t } = useTranslation("settings"); const { mutateAsync: reloadServer, isLoading } = api.settings.reloadServer.useMutation(); @@ -30,13 +28,11 @@ export const ShowDokployActions = () => { - - {t("settings.server.webServer.actions")} - + Actions { }} className="cursor-pointer" > - {t("settings.server.webServer.reload")} + Reload - {t("settings.common.enterTerminal")} + Terminal e.preventDefault()} > - {t("settings.server.webServer.watchLogs")} + View Logs @@ -70,7 +66,7 @@ export const ShowDokployActions = () => { className="cursor-pointer" onSelect={(e) => e.preventDefault()} > - {t("settings.server.webServer.updateServerIp")} + Update Server IP diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx index c80648142..1ec326205 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx @@ -1,4 +1,3 @@ -import { useTranslation } from "next-i18next"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; import { @@ -16,7 +15,6 @@ interface Props { serverId?: string; } export const ShowStorageActions = ({ serverId }: Props) => { - const { t } = useTranslation("settings"); const { mutateAsync: cleanAll, isLoading: cleanAllIsLoading } = api.settings.cleanAll.useMutation(); @@ -64,13 +62,11 @@ export const ShowStorageActions = ({ serverId }: Props) => { } variant="outline" > - {t("settings.server.webServer.storage.label")} + Space - - {t("settings.server.webServer.actions")} - + Actions { }); }} > - - {t("settings.server.webServer.storage.cleanUnusedImages")} - + Clean unused images { }); }} > - - {t("settings.server.webServer.storage.cleanUnusedVolumes")} - + Clean unused volumes { }); }} > - - {t("settings.server.webServer.storage.cleanStoppedContainers")} - + Clean stopped containers { }); }} > - - {t("settings.server.webServer.storage.cleanDockerBuilder")} - + Clean Docker Builder & System {!serverId && ( { }); }} > - - {t("settings.server.webServer.storage.cleanMonitoring")} - + Clean Monitoring )} @@ -180,7 +166,7 @@ export const ShowStorageActions = ({ serverId }: Props) => { }); }} > - {t("settings.server.webServer.storage.cleanAll")} + Clean all diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx index 5b4d751ff..11c3c19c8 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/show-traefik-actions.tsx @@ -1,4 +1,3 @@ -import { useTranslation } from "next-i18next"; import { toast } from "sonner"; import { AlertBlock } from "@/components/shared/alert-block"; import { DialogAction } from "@/components/shared/dialog-action"; @@ -22,7 +21,6 @@ interface Props { serverId?: string; } export const ShowTraefikActions = ({ serverId }: Props) => { - const { t } = useTranslation("settings"); const { mutateAsync: reloadTraefik, isLoading: reloadTraefikIsLoading } = api.settings.reloadTraefik.useMutation(); @@ -75,13 +73,11 @@ export const ShowTraefikActions = ({ serverId }: Props) => { } variant="outline" > - {t("settings.server.webServer.traefik.label")} + Traefik - - {t("settings.server.webServer.actions")} - + Actions { className="cursor-pointer" disabled={isReloadHealthCheckExecuting} > - {t("settings.server.webServer.reload")} + Reload { onSelect={(e) => e.preventDefault()} className="cursor-pointer" > - {t("settings.server.webServer.watchLogs")} + View Logs @@ -119,7 +115,7 @@ export const ShowTraefikActions = ({ serverId }: Props) => { onSelect={(e) => e.preventDefault()} className="cursor-pointer" > - {t("settings.server.webServer.traefik.modifyEnv")} + Modify Environment @@ -176,7 +172,7 @@ export const ShowTraefikActions = ({ serverId }: Props) => { onSelect={(e) => e.preventDefault()} className="cursor-pointer" > - {t("settings.server.webServer.traefik.managePorts")} + Additional Port Mappings diff --git a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx index 99804ba6b..010f0d2f4 100644 --- a/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/handle-servers.tsx @@ -1,7 +1,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Pencil, PlusIcon } from "lucide-react"; import Link from "next/link"; -import { useTranslation } from "next-i18next"; import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -63,8 +62,6 @@ interface Props { } export const HandleServers = ({ serverId, asButton = false }: Props) => { - const { t } = useTranslation("settings"); - const utils = api.useUtils(); const [isOpen, setIsOpen] = useState(false); const { data: canCreateMoreServers, refetch } = @@ -365,7 +362,7 @@ export const HandleServers = ({ serverId, asButton = false }: Props) => { name="ipAddress" render={({ field }) => ( - {t("settings.terminal.ipAddress")} + IP Address @@ -379,7 +376,7 @@ export const HandleServers = ({ serverId, asButton = false }: Props) => { name="port" render={({ field }) => ( - {t("settings.terminal.port")} + Port { name="username" render={({ field }) => ( - {t("settings.terminal.username")} + Username diff --git a/apps/dokploy/components/dashboard/settings/servers/show-servers.tsx b/apps/dokploy/components/dashboard/settings/servers/show-servers.tsx index 92d6fc5c3..657ac2453 100644 --- a/apps/dokploy/components/dashboard/settings/servers/show-servers.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/show-servers.tsx @@ -13,7 +13,6 @@ import { } from "lucide-react"; import Link from "next/link"; import { useRouter } from "next/router"; -import { useTranslation } from "next-i18next"; import { toast } from "sonner"; import { AlertBlock } from "@/components/shared/alert-block"; import { DialogAction } from "@/components/shared/dialog-action"; @@ -52,7 +51,6 @@ import { ShowTraefikFileSystemModal } from "./show-traefik-file-system-modal"; import { WelcomeSuscription } from "./welcome-stripe/welcome-suscription"; export const ShowServers = () => { - const { t } = useTranslation("settings"); const router = useRouter(); const query = router.query; const { data, refetch, isLoading } = api.server.all.useQuery(); diff --git a/apps/dokploy/components/dashboard/settings/web-domain.tsx b/apps/dokploy/components/dashboard/settings/web-domain.tsx index e0be5c7f3..f593d2b10 100644 --- a/apps/dokploy/components/dashboard/settings/web-domain.tsx +++ b/apps/dokploy/components/dashboard/settings/web-domain.tsx @@ -1,6 +1,5 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { GlobeIcon } from "lucide-react"; -import { useTranslation } from "next-i18next"; import { useEffect } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; @@ -66,7 +65,6 @@ const addServerDomain = z type AddServerDomain = z.infer; export const WebDomain = () => { - const { t } = useTranslation("settings"); const { data, refetch } = api.settings.getWebServerSettings.useQuery(); const { mutateAsync, isLoading } = api.settings.assignDomainServer.useMutation(); @@ -119,10 +117,10 @@ export const WebDomain = () => {
- {t("settings.server.domain.title")} + Server Domain - {t("settings.server.domain.description")} + Add a domain to your server application.
@@ -151,9 +149,7 @@ export const WebDomain = () => { render={({ field }) => { return ( - - {t("settings.server.domain.form.domain")} - + Domain { render={({ field }) => { return ( - - {t("settings.server.domain.form.letsEncryptEmail")} - + Let's Encrypt Email { render={({ field }) => { return ( - - {t("settings.server.domain.form.certificate.label")} - + Certificate Provider @@ -254,7 +236,7 @@ export const WebDomain = () => {
diff --git a/apps/dokploy/components/dashboard/settings/web-server.tsx b/apps/dokploy/components/dashboard/settings/web-server.tsx index c9cb7985b..d9df975e7 100644 --- a/apps/dokploy/components/dashboard/settings/web-server.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server.tsx @@ -1,5 +1,4 @@ import { ServerIcon } from "lucide-react"; -import { useTranslation } from "next-i18next"; import { Card, CardContent, @@ -15,7 +14,6 @@ import { ToggleDockerCleanup } from "./servers/actions/toggle-docker-cleanup"; import { UpdateServer } from "./web-server/update-server"; export const WebServer = () => { - const { t } = useTranslation("settings"); const { data: webServerSettings } = api.settings.getWebServerSettings.useQuery(); @@ -29,18 +27,16 @@ export const WebServer = () => { - {t("settings.server.webServer.title")} + Web Server - - {t("settings.server.webServer.description")} - + Reload or clean the web server. {/* - {t("settings.server.webServer.title")} + Web Server - {t("settings.server.webServer.description")} + Reload or clean the web server. */} diff --git a/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx index cb0218c5a..3ea1d965c 100644 --- a/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx @@ -1,6 +1,5 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Settings } from "lucide-react"; -import { useTranslation } from "next-i18next"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { @@ -52,8 +51,6 @@ interface Props { } const LocalServerConfig = ({ onSave }: Props) => { - const { t } = useTranslation("settings"); - const form = useForm({ defaultValues: getLocalServerData(), resolver: zodResolver(Schema), @@ -77,9 +74,7 @@ const LocalServerConfig = ({ onSave }: Props) => {
- - {t("settings.terminal.connectionSettings")} - + Connection settings
@@ -96,7 +91,7 @@ const LocalServerConfig = ({ onSave }: Props) => { name="port" render={({ field }) => ( - {t("settings.terminal.port")} + Port { name="username" render={({ field }) => ( - {t("settings.terminal.username")} + Username @@ -142,7 +137,7 @@ const LocalServerConfig = ({ onSave }: Props) => { className="ml-auto" disabled={!form.formState.isDirty} > - {t("settings.common.save")} + Save diff --git a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx index 73973ef06..9d29c1937 100644 --- a/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx +++ b/apps/dokploy/components/dashboard/settings/web-server/manage-traefik-ports.tsx @@ -1,6 +1,5 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { ArrowRightLeft, Plus, Trash2 } from "lucide-react"; -import { useTranslation } from "next-i18next"; import { useHealthCheckAfterMutation } from "@/hooks/use-health-check-after-mutation"; import type React from "react"; import { useEffect, useState } from "react"; @@ -56,7 +55,6 @@ const TraefikPortsSchema = z.object({ type TraefikPortsForm = z.infer; export const ManageTraefikPorts = ({ children, serverId }: Props) => { - const { t } = useTranslation("settings"); const [open, setOpen] = useState(false); const form = useForm({ @@ -84,7 +82,7 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => { isExecuting: isHealthCheckExecuting, } = useHealthCheckAfterMutation({ initialDelay: 5000, - successMessage: t("settings.server.webServer.traefik.portsUpdated"), + successMessage: "Ports updated successfully", onSuccess: () => { refetchPorts(); setOpen(false); @@ -129,14 +127,12 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => { - {t("settings.server.webServer.traefik.managePorts")} + Additional Port Mappings
- {t( - "settings.server.webServer.traefik.managePortsDescription", - )} + Add or remove additional ports for Traefik {fields.length} port mapping{fields.length !== 1 ? "s" : ""}{" "} configured @@ -179,9 +175,7 @@ export const ManageTraefikPorts = ({ children, serverId }: Props) => { render={({ field }) => ( - {t( - "settings.server.webServer.traefik.targetPort", - )} + Target Port { render={({ field }) => ( - {t( - "settings.server.webServer.traefik.publishedPort", - )} + Published Port { const { data } = api.user.get.useQuery(); const { data: isCloud } = api.settings.isCloud.useQuery(); - const { locale, setLocale } = useLocale(); // const { mutateAsync } = api.auth.logout.useMutation(); return ( @@ -155,39 +145,19 @@ export const UserNav = () => { )} -
- { - await authClient.signOut().then(() => { - router.push("/"); - }); - // await mutateAsync().then(() => { - // router.push("/"); - // }); - }} - > - Log out - -
- -
-
+ { + await authClient.signOut().then(() => { + router.push("/"); + }); + // await mutateAsync().then(() => { + // router.push("/"); + // }); + }} + > + Log out + ); diff --git a/apps/dokploy/lib/languages.ts b/apps/dokploy/lib/languages.ts deleted file mode 100644 index 7a4d54fa5..000000000 --- a/apps/dokploy/lib/languages.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Sorted list based off of population of the country / speakers of the language. - */ -export const Languages = { - english: { code: "en", name: "English" }, - spanish: { code: "es", name: "Español" }, - chineseSimplified: { code: "zh-Hans", name: "简体中文" }, - chineseTraditional: { code: "zh-Hant", name: "繁體中文" }, - portuguese: { code: "pt-br", name: "Português" }, - russian: { code: "ru", name: "Русский" }, - japanese: { code: "ja", name: "日本語" }, - german: { code: "de", name: "Deutsch" }, - korean: { code: "ko", name: "한국어" }, - french: { code: "fr", name: "Français" }, - turkish: { code: "tr", name: "Türkçe" }, - italian: { code: "it", name: "Italiano" }, - polish: { code: "pl", name: "Polski" }, - ukrainian: { code: "uk", name: "Українська" }, - persian: { code: "fa", name: "فارسی" }, - dutch: { code: "nl", name: "Nederlands" }, - indonesian: { code: "id", name: "Bahasa Indonesia" }, - kazakh: { code: "kz", name: "Қазақ" }, - norwegian: { code: "no", name: "Norsk" }, - azerbaijani: { code: "az", name: "Azərbaycan" }, - malayalam: { code: "ml", name: "മലയാളം" }, -}; - -export type Language = keyof typeof Languages; -export type LanguageCode = (typeof Languages)[keyof typeof Languages]["code"]; diff --git a/apps/dokploy/next.config.mjs b/apps/dokploy/next.config.mjs index 48231114a..2f12eccee 100644 --- a/apps/dokploy/next.config.mjs +++ b/apps/dokploy/next.config.mjs @@ -10,15 +10,6 @@ const nextConfig = { ignoreBuildErrors: true, }, transpilePackages: ["@dokploy/server"], - /** - * If you are using `appDir` then you must comment the below `i18n` config out. - * - * @see https://github.com/vercel/next.js/issues/41980 - */ - i18n: { - locales: ["en"], - defaultLocale: "en", - }, async headers() { return [ { diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index 4566c71de..45a50563b 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -8,7 +8,7 @@ "build": "npm run build-server && npm run build-next", "start": "node -r dotenv/config dist/migration.mjs && node -r dotenv/config dist/server.mjs", "build-server": "tsx esbuild.config.ts", - "build-next": "next build --webpack", + "build-next": "next build", "setup": "tsx -r dotenv/config setup.ts && sleep 5 && pnpm run migration:run", "wait-for-postgres": "node -r dotenv/config dist/wait-for-postgres.mjs", "wait-for-postgres-dev": "tsx -r dotenv/config wait-for-postgres.ts", @@ -41,13 +41,13 @@ "dependencies": { "resend": "^6.0.2", "@better-auth/sso": "1.4.18", - "@ai-sdk/anthropic": "^2.0.5", - "@ai-sdk/azure": "^2.0.16", - "@ai-sdk/cohere": "^2.0.4", - "@ai-sdk/deepinfra": "^1.0.10", - "@ai-sdk/mistral": "^2.0.7", - "@ai-sdk/openai": "^2.0.16", - "@ai-sdk/openai-compatible": "^1.0.10", + "@ai-sdk/anthropic": "^3.0.44", + "@ai-sdk/azure": "^3.0.30", + "@ai-sdk/cohere": "^3.0.21", + "@ai-sdk/deepinfra": "^2.0.34", + "@ai-sdk/mistral": "^3.0.20", + "@ai-sdk/openai": "^3.0.29", + "@ai-sdk/openai-compatible": "^2.0.30", "@codemirror/autocomplete": "^6.18.6", "@codemirror/lang-json": "^6.0.1", "@codemirror/lang-yaml": "^6.1.2", @@ -95,8 +95,8 @@ "@xterm/addon-clipboard": "0.1.0", "@xterm/xterm": "^5.5.0", "adm-zip": "^0.5.16", - "ai": "^5.0.17", - "ai-sdk-ollama": "^0.5.1", + "ai": "^6.0.86", + "ai-sdk-ollama": "^3.7.0", "bcrypt": "5.1.1", "better-auth": "1.4.18", "bl": "6.0.11", @@ -113,7 +113,6 @@ "drizzle-orm": "^0.41.0", "drizzle-zod": "0.5.1", "fancy-ansi": "^0.1.3", - "i18next": "^23.16.8", "input-otp": "^1.4.2", "js-cookie": "^3.0.5", "lodash": "4.17.21", @@ -121,7 +120,6 @@ "micromatch": "4.0.8", "nanoid": "3.3.11", "next": "^16.1.6", - "next-i18next": "^15.4.2", "next-themes": "^0.2.1", "nextjs-toploader": "^3.9.17", "node-os-utils": "2.0.1", @@ -139,7 +137,6 @@ "react-day-picker": "8.10.1", "react-dom": "18.2.0", "react-hook-form": "^7.56.4", - "react-i18next": "^15.5.2", "react-markdown": "^9.1.0", "recharts": "^2.15.3", "slugify": "^1.6.6", @@ -147,7 +144,7 @@ "ssh2": "1.15.0", "stripe": "17.2.0", "superjson": "^2.2.2", - "swagger-ui-react": "^5.22.0", + "swagger-ui-react": "^5.31.1", "tailwind-merge": "^2.6.0", "tailwindcss-animate": "^1.0.7", "toml": "3.0.0", @@ -156,7 +153,7 @@ "ws": "8.16.0", "xterm-addon-fit": "^0.8.0", "yaml": "2.8.1", - "zod": "^3.25.32", + "zod": "^3.25.76", "zod-form-data": "^2.0.7", "semver": "7.7.3" }, diff --git a/apps/dokploy/pages/_app.tsx b/apps/dokploy/pages/_app.tsx index 78e9862d0..ad6f8d336 100644 --- a/apps/dokploy/pages/_app.tsx +++ b/apps/dokploy/pages/_app.tsx @@ -4,13 +4,11 @@ import type { NextPage } from "next"; import type { AppProps } from "next/app"; import { Inter } from "next/font/google"; import Head from "next/head"; -import { appWithTranslation } from "next-i18next"; import { ThemeProvider } from "next-themes"; import NextTopLoader from "nextjs-toploader"; import type { ReactElement, ReactNode } from "react"; import { SearchCommand } from "@/components/dashboard/search-command"; import { Toaster } from "@/components/ui/sonner"; -import { Languages } from "@/lib/languages"; import { api } from "@/utils/api"; const inter = Inter({ subsets: ["latin"] }); @@ -58,14 +56,4 @@ const MyApp = ({ ); }; -export default api.withTRPC( - appWithTranslation(MyApp, { - i18n: { - defaultLocale: "en", - locales: Object.values(Languages).map((language) => language.code), - localeDetection: false, - }, - fallbackLng: "en", - keySeparator: false, - }), -); +export default api.withTRPC(MyApp); diff --git a/apps/dokploy/pages/dashboard/settings/ai.tsx b/apps/dokploy/pages/dashboard/settings/ai.tsx index 925bc561a..0dc9b203e 100644 --- a/apps/dokploy/pages/dashboard/settings/ai.tsx +++ b/apps/dokploy/pages/dashboard/settings/ai.tsx @@ -6,7 +6,6 @@ import superjson from "superjson"; import { AiForm } from "@/components/dashboard/settings/ai-form"; import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { return ( @@ -26,7 +25,6 @@ export async function getServerSideProps( ) { const { req, res } = ctx; const { user, session } = await validateRequest(req); - const locale = getLocale(req.cookies); const helpers = createServerSideHelpers({ router: appRouter, @@ -55,7 +53,6 @@ export async function getServerSideProps( return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/pages/dashboard/settings/license.tsx b/apps/dokploy/pages/dashboard/settings/license.tsx index 28e0d54ae..6a0f0f854 100644 --- a/apps/dokploy/pages/dashboard/settings/license.tsx +++ b/apps/dokploy/pages/dashboard/settings/license.tsx @@ -7,7 +7,6 @@ import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { LicenseKeySettings } from "@/components/proprietary/license-keys/license-key"; import { Card } from "@/components/ui/card"; import { appRouter } from "@/server/api/root"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { return ( @@ -35,7 +34,6 @@ export async function getServerSideProps( ctx: GetServerSidePropsContext<{ serviceId: string }>, ) { const { req, res } = ctx; - const locale = await getLocale(req.cookies); const { user, session } = await validateRequest(ctx.req); if (!user) { return { @@ -70,7 +68,6 @@ export async function getServerSideProps( return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/pages/dashboard/settings/profile.tsx b/apps/dokploy/pages/dashboard/settings/profile.tsx index 7e0ccdc83..22077fb41 100644 --- a/apps/dokploy/pages/dashboard/settings/profile.tsx +++ b/apps/dokploy/pages/dashboard/settings/profile.tsx @@ -9,7 +9,6 @@ import { ProfileForm } from "@/components/dashboard/settings/profile/profile-for import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; import { api } from "@/utils/api"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { const { data } = api.user.get.useQuery(); @@ -37,7 +36,6 @@ export async function getServerSideProps( ctx: GetServerSidePropsContext<{ serviceId: string }>, ) { const { req, res } = ctx; - const locale = getLocale(req.cookies); const { user, session } = await validateRequest(req); const helpers = createServerSideHelpers({ @@ -67,7 +65,6 @@ export async function getServerSideProps( return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/pages/dashboard/settings/server.tsx b/apps/dokploy/pages/dashboard/settings/server.tsx index dbe4917dd..eba6c8764 100644 --- a/apps/dokploy/pages/dashboard/settings/server.tsx +++ b/apps/dokploy/pages/dashboard/settings/server.tsx @@ -10,7 +10,6 @@ import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { Card } from "@/components/ui/card"; import { appRouter } from "@/server/api/root"; import { api } from "@/utils/api"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { const { data: user } = api.user.get.useQuery(); @@ -42,7 +41,6 @@ export async function getServerSideProps( ctx: GetServerSidePropsContext<{ serviceId: string }>, ) { const { req, res } = ctx; - const locale = await getLocale(req.cookies); if (IS_CLOUD) { return { redirect: { @@ -85,7 +83,6 @@ export async function getServerSideProps( return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/pages/dashboard/settings/servers.tsx b/apps/dokploy/pages/dashboard/settings/servers.tsx index 5562f460b..9912f1e82 100644 --- a/apps/dokploy/pages/dashboard/settings/servers.tsx +++ b/apps/dokploy/pages/dashboard/settings/servers.tsx @@ -6,7 +6,6 @@ import superjson from "superjson"; import { ShowServers } from "@/components/dashboard/settings/servers/show-servers"; import { DashboardLayout } from "@/components/layouts/dashboard-layout"; import { appRouter } from "@/server/api/root"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { return ( @@ -25,7 +24,6 @@ export async function getServerSideProps( ctx: GetServerSidePropsContext<{ serviceId: string }>, ) { const { req, res } = ctx; - const locale = await getLocale(req.cookies); const { user, session } = await validateRequest(req); if (!user) { return { @@ -61,7 +59,6 @@ export async function getServerSideProps( return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/pages/dashboard/settings/sso.tsx b/apps/dokploy/pages/dashboard/settings/sso.tsx index 164e2c3da..4203d7725 100644 --- a/apps/dokploy/pages/dashboard/settings/sso.tsx +++ b/apps/dokploy/pages/dashboard/settings/sso.tsx @@ -8,7 +8,6 @@ import { EnterpriseFeatureGate } from "@/components/proprietary/enterprise-featu import { SSOSettings } from "@/components/proprietary/sso/sso-settings"; import { Card } from "@/components/ui/card"; import { appRouter } from "@/server/api/root"; -import { getLocale, serverSideTranslations } from "@/utils/i18n"; const Page = () => { return ( @@ -43,7 +42,6 @@ Page.getLayout = (page: ReactElement) => { export async function getServerSideProps(ctx: GetServerSidePropsContext) { const { req, res } = ctx; - const locale = await getLocale(req.cookies); const { user, session } = await validateRequest(ctx.req); if (!user) { return { @@ -78,7 +76,6 @@ export async function getServerSideProps(ctx: GetServerSidePropsContext) { return { props: { trpcState: helpers.dehydrate(), - ...(await serverSideTranslations(locale, ["settings"])), }, }; } diff --git a/apps/dokploy/tsconfig.json b/apps/dokploy/tsconfig.json index 9f664e78a..de0d647d2 100644 --- a/apps/dokploy/tsconfig.json +++ b/apps/dokploy/tsconfig.json @@ -39,8 +39,7 @@ "**/*.js", ".next/types/**/*.ts", "env.js", - "next.config.mjs", - "next-i18next.config.mjs" + "next.config.mjs" ], "exclude": [ "node_modules", diff --git a/apps/dokploy/utils/hooks/use-locale.ts b/apps/dokploy/utils/hooks/use-locale.ts deleted file mode 100644 index 0d6ac9b55..000000000 --- a/apps/dokploy/utils/hooks/use-locale.ts +++ /dev/null @@ -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, - }; -} diff --git a/apps/dokploy/utils/i18n.ts b/apps/dokploy/utils/i18n.ts deleted file mode 100644 index c56673d28..000000000 --- a/apps/dokploy/utils/i18n.ts +++ /dev/null @@ -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, - }, - }); diff --git a/apps/schedules/package.json b/apps/schedules/package.json index 620b73f92..52e91470d 100644 --- a/apps/schedules/package.json +++ b/apps/schedules/package.json @@ -20,7 +20,7 @@ "pino-pretty": "11.2.2", "react": "18.2.0", "react-dom": "18.2.0", - "zod": "^3.25.32" + "zod": "^3.25.76" }, "devDependencies": { "@types/node": "^20.16.0", diff --git a/packages/server/DEBUG-BUILD.md b/packages/server/DEBUG-BUILD.md new file mode 100644 index 000000000..f092645a7 --- /dev/null +++ b/packages/server/DEBUG-BUILD.md @@ -0,0 +1,27 @@ +# Debug build OOM – orden para probar + +Ejecuta desde `packages/server` (o `pnpm --filter=@dokploy/server run