Scheduling infrastructure for absolutely everyone.
Email language fixes
zomarse863b71dfaeb
diff --git a/packages/emails/src/components/LocationInfo.tsx b/packages/emails/src/components/LocationInfo.tsxindex 6341f4f37c3..4a985aac661 100644--- a/packages/emails/src/components/LocationInfo.tsx+++ b/packages/emails/src/components/LocationInfo.tsx@@ -1,11 +1,13 @@+import type { TFunction } from "next-i18next";+import { getAppName } from "@calcom/app-store/utils";import type { CalendarEvent } from "@calcom/types/Calendar";import { Info } from "./Info";import { LinkIcon } from "./LinkIcon";-export function LocationInfo(props: { calEvent: CalendarEvent }) {- const t = props.calEvent.attendees[0].language.translate;+export function LocationInfo(props: { calEvent: CalendarEvent; t: TFunction }) {+ const { t } = props;let providerName = props.calEvent.location && getAppName(props.calEvent.location);if (props.calEvent.location && props.calEvent.location.includes("integrations:")) {diff --git a/packages/emails/src/components/WhoInfo.tsx b/packages/emails/src/components/WhoInfo.tsxindex 0b9505658ee..f9d720f465c 100644--- a/packages/emails/src/components/WhoInfo.tsx+++ b/packages/emails/src/components/WhoInfo.tsx@@ -1,3 +1,5 @@+import { TFunction } from "next-i18next";+import type { CalendarEvent } from "@calcom/types/Calendar";import { Info } from "./Info";@@ -13,8 +15,8 @@ const PersonInfo = ({ name = "", email = "", role = "" }) => (</div>);-export function WhoInfo(props: { calEvent: CalendarEvent }) {- const t = props.calEvent.attendees[0].language.translate;+export function WhoInfo(props: { calEvent: CalendarEvent; t: TFunction }) {+ const { t } = props;return (<Infolabel={t("who")}diff --git a/packages/emails/src/templates/BaseScheduledEmail.tsx b/packages/emails/src/templates/BaseScheduledEmail.tsxindex 22779b464cd..bf55356c2b7 100644--- a/packages/emails/src/templates/BaseScheduledEmail.tsx+++ b/packages/emails/src/templates/BaseScheduledEmail.tsx@@ -3,7 +3,7 @@ import localizedFormat from "dayjs/plugin/localizedFormat";import timezone from "dayjs/plugin/timezone";import toArray from "dayjs/plugin/toArray";import utc from "dayjs/plugin/utc";-import { TFunction } from "next-i18next";+import type { TFunction } from "next-i18next";import type { CalendarEvent, Person, RecurringEvent } from "@calcom/types/Calendar";@@ -70,8 +70,8 @@ export const BaseScheduledEmail = (<Info label={t("rejection_reason")} description={props.calEvent.rejectionReason} withSpacer /><Info label={t("what")} description={props.calEvent.type} withSpacer /><WhenInfo calEvent={props.calEvent} recurringEvent={props.recurringEvent} t={t} timeZone={timeZone} />- <WhoInfo calEvent={props.calEvent} />- <LocationInfo calEvent={props.calEvent} />+ <WhoInfo calEvent={props.calEvent} t={t} />+ <LocationInfo calEvent={props.calEvent} t={t} /><Info label={t("description")} description={props.calEvent.description} withSpacer /><Info label={t("additional_notes")} description={props.calEvent.additionalNotes} withSpacer /><CustomInputs calEvent={props.calEvent} />diff --git a/packages/emails/src/templates/ForgotPasswordEmail.tsx b/packages/emails/src/templates/ForgotPasswordEmail.tsxindex 045d48acf78..704bfb7a220 100644--- a/packages/emails/src/templates/ForgotPasswordEmail.tsx+++ b/packages/emails/src/templates/ForgotPasswordEmail.tsx@@ -1,4 +1,4 @@-import { TFunction } from "next-i18next";+import type { TFunction } from "next-i18next";import { BaseEmailHtml, CallToAction } from "../components";diff --git a/packages/emails/src/templates/TeamInviteEmail.tsx b/packages/emails/src/templates/TeamInviteEmail.tsxindex af965f024f0..19ef631feab 100644--- a/packages/emails/src/templates/TeamInviteEmail.tsx+++ b/packages/emails/src/templates/TeamInviteEmail.tsx@@ -1,4 +1,4 @@-import { TFunction } from "next-i18next";+import type { TFunction } from "next-i18next";import { BaseEmailHtml, CallToAction } from "../components";