refactor: extract dedicated @calcom/i18n package (#28141)
This commit is contained in:
1 parent
f00be08e8c
commit
648ad72a54
208 files changed
+548
-459
No files matched your search
@@ -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";
|
||||
|
||||
|
||||
@@ -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] `] });
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"main": "index.ts",
|
||||
"dependencies": {
|
||||
"@calcom/dayjs": "workspace:*",
|
||||
"@calcom/i18n": "workspace:*",
|
||||
"@calcom/lib": "workspace:*",
|
||||
"@calcom/prisma": "workspace:*",
|
||||
"@calcom/trpc": "workspace:*",
|
||||
|
||||
Reference in new issue
Block a user