Scheduling infrastructure for absolutely everyone.
chore: move ServerTrans to packages/lib (#20353)
Benny Jooc7c2c03f6aaf
diff --git a/apps/web/components/settings/SecondaryEmailConfirmModal.tsx b/apps/web/components/settings/SecondaryEmailConfirmModal.tsxindex 189bb6020eb..93145fed8a6 100644--- a/apps/web/components/settings/SecondaryEmailConfirmModal.tsx+++ b/apps/web/components/settings/SecondaryEmailConfirmModal.tsx@@ -1,6 +1,6 @@+import ServerTrans from "@calcom/lib/components/ServerTrans";import { useLocale } from "@calcom/lib/hooks/useLocale";import { Dialog, DialogContent, DialogFooter, DialogClose } from "@calcom/ui/components/dialog";-import ServerTrans from "@calcom/web/components/ServerTrans";interface SecondaryEmailConfirmModalProps {email: string;diff --git a/apps/web/modules/connect-and-join/connect-and-join-view.tsx b/apps/web/modules/connect-and-join/connect-and-join-view.tsxindex 2123d8ef153..ca52c97e4f3 100644--- a/apps/web/modules/connect-and-join/connect-and-join-view.tsx+++ b/apps/web/modules/connect-and-join/connect-and-join-view.tsx@@ -12,7 +12,7 @@ import { trpc } from "@calcom/trpc";import { Alert } from "@calcom/ui/components/alert";import { Button } from "@calcom/ui/components/button";import { EmptyScreen } from "@calcom/ui/components/empty-screen";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { TRPCClientError } from "@trpc/client";diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsxindex 582b3644e42..c354214f51b 100644--- a/apps/web/modules/signup-view.tsx+++ b/apps/web/modules/signup-view.tsx@@ -44,7 +44,7 @@ import { Button } from "@calcom/ui/components/button";import { PasswordField, CheckboxField, TextField, Form } from "@calcom/ui/components/form";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import type { getServerSideProps } from "@lib/signup/getServerSideProps";diff --git a/packages/app-store/make/pages/setup/index.tsx b/packages/app-store/make/pages/setup/index.tsxindex 4eb737475db..73665f094b5 100644--- a/packages/app-store/make/pages/setup/index.tsx+++ b/packages/app-store/make/pages/setup/index.tsx@@ -10,7 +10,7 @@ import { Button } from "@calcom/ui/components/button";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";import { Tooltip } from "@calcom/ui/components/tooltip";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import type { getServerSideProps } from "./_getServerSideProps";diff --git a/packages/app-store/zapier/pages/setup/index.tsx b/packages/app-store/zapier/pages/setup/index.tsxindex 12798cf44de..73330e4263c 100644--- a/packages/app-store/zapier/pages/setup/index.tsx+++ b/packages/app-store/zapier/pages/setup/index.tsx@@ -9,7 +9,7 @@ import { Button } from "@calcom/ui/components/button";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";import { Tooltip } from "@calcom/ui/components/tooltip";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export interface IZapierSetupProps {inviteLink?: string;diff --git a/packages/emails/src/templates/AdminOrganizationNotificationEmail.tsx b/packages/emails/src/templates/AdminOrganizationNotificationEmail.tsxindex bbafb9e8cc8..e1bb6c196a3 100644--- a/packages/emails/src/templates/AdminOrganizationNotificationEmail.tsx+++ b/packages/emails/src/templates/AdminOrganizationNotificationEmail.tsx@@ -1,7 +1,7 @@import type { TFunction } from "i18next";import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { BaseEmailHtml, CallToAction } from "../components";diff --git a/packages/emails/src/templates/BrokenIntegrationEmail.tsx b/packages/emails/src/templates/BrokenIntegrationEmail.tsxindex cfdbcca8c84..6f81b79a085 100644--- a/packages/emails/src/templates/BrokenIntegrationEmail.tsx+++ b/packages/emails/src/templates/BrokenIntegrationEmail.tsx@@ -3,7 +3,7 @@ import type { TFunction } from "i18next";import { AppStoreLocationType } from "@calcom/app-store/locations";import { WEBAPP_URL } from "@calcom/lib/constants";import type { CalendarEvent, Person } from "@calcom/types/Calendar";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { BaseScheduledEmail } from "./BaseScheduledEmail";diff --git a/packages/emails/src/templates/OrganizationAdminNoSlots.tsx b/packages/emails/src/templates/OrganizationAdminNoSlots.tsxindex 9770f1f7462..7cc8ab64056 100644--- a/packages/emails/src/templates/OrganizationAdminNoSlots.tsx+++ b/packages/emails/src/templates/OrganizationAdminNoSlots.tsx@@ -1,6 +1,6 @@import type { TFunction } from "i18next";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { BaseEmailHtml, CallToAction } from "../components";diff --git a/packages/emails/src/templates/OrganizationCreationEmail.tsx b/packages/emails/src/templates/OrganizationCreationEmail.tsxindex b7fe958103b..84a8d1549ab 100644--- a/packages/emails/src/templates/OrganizationCreationEmail.tsx+++ b/packages/emails/src/templates/OrganizationCreationEmail.tsx@@ -1,5 +1,5 @@import { APP_NAME, WEBAPP_URL } from "@calcom/lib/constants";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import type { OrganizationCreation } from "../../templates/organization-creation-email";import { V2BaseEmailHtml } from "../components";diff --git a/packages/emails/src/templates/SlugReplacementEmail.tsx b/packages/emails/src/templates/SlugReplacementEmail.tsxindex f1c65011eb6..25ca7877d89 100644--- a/packages/emails/src/templates/SlugReplacementEmail.tsx+++ b/packages/emails/src/templates/SlugReplacementEmail.tsx@@ -1,7 +1,7 @@import type { TFunction } from "i18next";import { WEBAPP_URL } from "@calcom/lib/constants";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { BaseEmailHtml, CallToAction } from "../components";diff --git a/packages/emails/src/templates/TeamInviteEmail.tsx b/packages/emails/src/templates/TeamInviteEmail.tsxindex 2e403a3e0d0..4efe172fa74 100644--- a/packages/emails/src/templates/TeamInviteEmail.tsx+++ b/packages/emails/src/templates/TeamInviteEmail.tsx@@ -1,7 +1,7 @@import type { TFunction } from "i18next";import { APP_NAME, WEBAPP_URL, IS_PRODUCTION } from "@calcom/lib/constants";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { getSubject, getTypeOfInvite } from "../../templates/team-invite-email";import { V2BaseEmailHtml, CallToAction } from "../components";diff --git a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx b/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsxindex 8226b79876b..105c0906f41 100644--- a/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx+++ b/packages/features/bookings/Booker/components/BookEventForm/BookEventForm.tsx@@ -12,7 +12,7 @@ import { Alert } from "@calcom/ui/components/alert";import { Button } from "@calcom/ui/components/button";import { EmptyScreen } from "@calcom/ui/components/empty-screen";import { Form } from "@calcom/ui/components/form";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { useBookerStore } from "../../store";import type { UseBookingFormReturnType } from "../hooks/useBookingForm";diff --git a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsxindex 08743a1007d..83b09a02399 100644--- a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx+++ b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx@@ -5,7 +5,7 @@ import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";import { useLocale } from "@calcom/lib/hooks/useLocale";import classNames from "@calcom/ui/classNames";import { Button } from "@calcom/ui/components/button";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";interface IOutOfOfficeInSlotsProps {date: string;diff --git a/packages/features/ee/teams/components/MemberInvitationModal.tsx b/packages/features/ee/teams/components/MemberInvitationModal.tsxindex 92bdbde2162..c5a5e53f7de 100644--- a/packages/features/ee/teams/components/MemberInvitationModal.tsx+++ b/packages/features/ee/teams/components/MemberInvitationModal.tsx@@ -23,7 +23,7 @@ import { Select } from "@calcom/ui/components/form";import { ToggleGroup } from "@calcom/ui/components/form";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import type { PendingMember } from "../lib/types";import { GoogleWorkspaceInviteButton } from "./GoogleWorkspaceInviteButton";diff --git a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx b/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsxindex 24ff64b7cfb..e2a3eabdd22 100644--- a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx+++ b/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx@@ -23,7 +23,7 @@ import {SheetTitle,} from "@calcom/ui/components/sheet";import { showToast } from "@calcom/ui/components/toast";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";type TeamMemberItemProps = {member: Omit<TeamMember, "defaultScheduleId"> & { weight?: number };diff --git a/packages/features/eventtypes/components/Locations.tsx b/packages/features/eventtypes/components/Locations.tsxindex f2332072c8d..5ed0d056da9 100644--- a/packages/features/eventtypes/components/Locations.tsx+++ b/packages/features/eventtypes/components/Locations.tsx@@ -27,7 +27,7 @@ import { Button } from "@calcom/ui/components/button";import { Input } from "@calcom/ui/components/form";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export type TEventTypeLocation = Pick<EventTypeSetupProps["eventType"], "locations">;export type TLocationOptions = Pick<EventTypeSetupProps, "locationOptions">["locationOptions"];diff --git a/packages/features/eventtypes/components/WeightDescription.tsx b/packages/features/eventtypes/components/WeightDescription.tsxindex 2b1aec5b84d..9740dd15753 100644--- a/packages/features/eventtypes/components/WeightDescription.tsx+++ b/packages/features/eventtypes/components/WeightDescription.tsx@@ -1,7 +1,7 @@import type { TFunction } from "i18next";import Link from "next/link";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export default function WeightDescription({ t }: { t: TFunction }) {return (diff --git a/packages/features/eventtypes/components/dialogs/ManagedEventDialog.tsx b/packages/features/eventtypes/components/dialogs/ManagedEventDialog.tsxindex e337507f89e..bd52553c7f7 100644--- a/packages/features/eventtypes/components/dialogs/ManagedEventDialog.tsx+++ b/packages/features/eventtypes/components/dialogs/ManagedEventDialog.tsx@@ -1,7 +1,7 @@import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";import { useLocale } from "@calcom/lib/hooks/useLocale";import { ConfirmationDialogContent, Dialog } from "@calcom/ui/components/dialog";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";interface ManagedEventDialogProps {slugExistsChildrenDialogOpen: ChildrenEventType[];diff --git a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsxindex 785250d8e89..2b5af951cd9 100644--- a/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx+++ b/packages/features/eventtypes/components/tabs/advanced/DisableAllEmailsSetting.tsx@@ -7,7 +7,7 @@ import { Button } from "@calcom/ui/components/button";import { Dialog, DialogContent, DialogFooter, DialogClose } from "@calcom/ui/components/dialog";import { InputField } from "@calcom/ui/components/form";import { SettingsToggle } from "@calcom/ui/components/form";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export type EmailNotificationToggleCustomClassNames = SettingsToggleClassNames & {confirmationDialog?: {diff --git a/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.tsx b/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.tsxindex d791128ac00..7a539e033b9 100644--- a/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.tsx+++ b/packages/features/eventtypes/components/tabs/advanced/RequiresConfirmationController.tsx@@ -16,7 +16,7 @@ import { CheckboxField } from "@calcom/ui/components/form";import { Input } from "@calcom/ui/components/form";import { SettingsToggle } from "@calcom/ui/components/form";import { RadioField } from "@calcom/ui/components/radio";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export type RequiresConfirmationCustomClassNames = SettingsToggleClassNames & {radioGroupContainer?: string;diff --git a/packages/features/eventtypes/components/tabs/apps/EventAppsTab.tsx b/packages/features/eventtypes/components/tabs/apps/EventAppsTab.tsxindex e4074ad581e..190fcaf52fd 100644--- a/packages/features/eventtypes/components/tabs/apps/EventAppsTab.tsx+++ b/packages/features/eventtypes/components/tabs/apps/EventAppsTab.tsx@@ -12,7 +12,7 @@ import { trpc } from "@calcom/trpc/react";import { Alert } from "@calcom/ui/components/alert";import { Button } from "@calcom/ui/components/button";import { EmptyScreen } from "@calcom/ui/components/empty-screen";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export type EventType = Pick<EventTypeSetupProps, "eventType">["eventType"] &EventTypeAppCardComponentProps["eventType"];diff --git a/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx b/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsxindex 2ce396de5fe..6eead0bf0f5 100644--- a/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx+++ b/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx@@ -28,7 +28,7 @@ import { Label } from "@calcom/ui/components/form";import { Select } from "@calcom/ui/components/form";import { SettingsToggle } from "@calcom/ui/components/form";import { RadioAreaGroup as RadioArea } from "@calcom/ui/components/radio";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import { EditWeightsForAllTeamMembers } from "../../EditWeightsForAllTeamMembers";import WeightDescription from "../../WeightDescription";diff --git a/packages/features/eventtypes/components/tabs/webhooks/EventWebhooksTab.tsx b/packages/features/eventtypes/components/tabs/webhooks/EventWebhooksTab.tsxindex 46415210975..af9ceb034d2 100644--- a/packages/features/eventtypes/components/tabs/webhooks/EventWebhooksTab.tsx+++ b/packages/features/eventtypes/components/tabs/webhooks/EventWebhooksTab.tsx@@ -17,7 +17,7 @@ import { Button } from "@calcom/ui/components/button";import { Dialog, DialogContent } from "@calcom/ui/components/dialog";import { EmptyScreen } from "@calcom/ui/components/empty-screen";import { showToast } from "@calcom/ui/components/toast";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";export const EventWebhooksTab = ({ eventType }: Pick<EventTypeSetupProps, "eventType">) => {const { t } = useLocale();diff --git a/packages/features/eventtypes/components/tabs/workflows/EventWorkfowsTab.tsx b/packages/features/eventtypes/components/tabs/workflows/EventWorkfowsTab.tsxindex da9a4af164e..865ed770857 100644--- a/packages/features/eventtypes/components/tabs/workflows/EventWorkfowsTab.tsx+++ b/packages/features/eventtypes/components/tabs/workflows/EventWorkfowsTab.tsx@@ -22,7 +22,7 @@ import { Switch } from "@calcom/ui/components/form";import { Icon } from "@calcom/ui/components/icon";import { showToast } from "@calcom/ui/components/toast";import { Tooltip } from "@calcom/ui/components/tooltip";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";type PartialWorkflowType = Pick<WorkflowType, "name" | "activeOn" | "isOrg" | "steps" | "id" | "readOnly">;diff --git a/packages/features/settings/BookerLayoutSelector.tsx b/packages/features/settings/BookerLayoutSelector.tsxindex 9562fcc1a4c..8b4d07265c3 100644--- a/packages/features/settings/BookerLayoutSelector.tsx+++ b/packages/features/settings/BookerLayoutSelector.tsx@@ -11,7 +11,7 @@ import classNames from "@calcom/ui/classNames";import { Button } from "@calcom/ui/components/button";import { Label } from "@calcom/ui/components/form";import { CheckboxField } from "@calcom/ui/components/form";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import SectionBottomActions from "./SectionBottomActions";diff --git a/packages/features/settings/outOfOffice/OutOfOfficeEntriesList.tsx b/packages/features/settings/outOfOffice/OutOfOfficeEntriesList.tsxindex c0e77868b76..a7fe7627fa7 100644--- a/packages/features/settings/outOfOffice/OutOfOfficeEntriesList.tsx+++ b/packages/features/settings/outOfOffice/OutOfOfficeEntriesList.tsx@@ -31,7 +31,7 @@ import { Icon } from "@calcom/ui/components/icon";import { SkeletonText } from "@calcom/ui/components/skeleton";import { showToast } from "@calcom/ui/components/toast";import { Tooltip } from "@calcom/ui/components/tooltip";-import ServerTrans from "@calcom/web/components/ServerTrans";+import ServerTrans from "@calcom/lib/components/ServerTrans";import CreateNewOutOfOfficeEntryButton from "./CreateNewOutOfOfficeEntryButton";import { CreateOrEditOutOfOfficeEntryModal } from "./CreateOrEditOutOfOfficeModal";diff --git a/apps/web/components/ServerTrans.tsx b/packages/lib/components/ServerTrans.tsxsimilarity index 100%rename from apps/web/components/ServerTrans.tsxrename to packages/lib/components/ServerTrans.tsx