refactor: extract dedicated @calcom/i18n package (#28141)

This commit is contained in:
Benny Joo authored and GitHub committed 2026-02-23 13:30:12 +00:00
1 parent f00be08e8c
commit 648ad72a54
208 files changed
+548 -459

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ import { lookup } from "bcp-47-match";
import type { GetTokenParams } from "next-auth/jwt";
import { getToken } from "next-auth/jwt";
import { i18n } from "@calcom/config/next-i18next.config";
import { i18n } from "@calcom/i18n/next-i18next.config";
type ReadonlyHeaders = Awaited<ReturnType<typeof import("next/headers").headers>>;
type ReadonlyRequestCookies = Awaited<ReturnType<typeof import("next/headers").cookies>>;
@@ -5,7 +5,7 @@ import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
type Maybe<T> = T | null | undefined;
const { i18n } = require("@calcom/config/next-i18next.config");
const { i18n } = require("@calcom/i18n/next-i18next.config");
export async function getLocaleFromRequest(
req: NextApiRequest | GetServerSidePropsContext["req"]
@@ -1,5 +1,5 @@
import dayjs from "@calcom/dayjs";
import { getTranslation } from "@calcom/lib/server/i18n";
import { getTranslation } from "@calcom/i18n/server";
import prisma from "@calcom/prisma";
import type { User } from "@calcom/prisma/client";
+1 -1
View File
@@ -13,7 +13,7 @@ import { checkRateLimitAndThrowError } from "@calcom/lib/checkRateLimitAndThrowE
import { WEBAPP_URL } from "@calcom/lib/constants";
import logger from "@calcom/lib/logger";
import { hashEmail } from "@calcom/lib/server/PiiHasher";
import { getTranslation } from "@calcom/lib/server/i18n";
import { getTranslation } from "@calcom/i18n/server";
import { prisma } from "@calcom/prisma";
const log = logger.getSubLogger({ prefix: [`[[Auth] `] });
+1
View File
@@ -8,6 +8,7 @@
"main": "index.ts",
"dependencies": {
"@calcom/dayjs": "workspace:*",
"@calcom/i18n": "workspace:*",
"@calcom/lib": "workspace:*",
"@calcom/prisma": "workspace:*",
"@calcom/trpc": "workspace:*",