diff --git a/packages/emails/src/templates/AttendeeWasRequestedToRescheduleEmail.tsx b/packages/emails/src/templates/AttendeeWasRequestedToRescheduleEmail.tsx index 256e77596b..fe45ce2aca 100644 --- a/packages/emails/src/templates/AttendeeWasRequestedToRescheduleEmail.tsx +++ b/packages/emails/src/templates/AttendeeWasRequestedToRescheduleEmail.tsx @@ -3,23 +3,27 @@ import { OrganizerScheduledEmail } from "./OrganizerScheduledEmail"; export const AttendeeWasRequestedToRescheduleEmail = ( props: { metadata: { rescheduleLink: string } } & React.ComponentProps -) => ( - - {props.calEvent.organizer.language.translate("request_reschedule_subtitle", { - organizer: props.calEvent.organizer.name, - })} - - } - headerType="calendarCircle" - subject="rescheduled_event_type_subject" - callToAction={ - - - - } - {...props} - /> -); +) => { + const t = props.attendee.language.translate; + return ( + + {t("request_reschedule_subtitle", { + organizer: props.calEvent.organizer.name, + })} + + } + headerType="calendarCircle" + subject="rescheduled_event_type_subject" + callToAction={ + + + + } + {...props} + /> + ); +}; diff --git a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts index 6b4ca01e82..881c9890e5 100644 --- a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts +++ b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts @@ -1,10 +1,10 @@ -import type { DateArray, Person } from "ics"; +import type { DateArray } from "ics"; import { createEvent } from "ics"; import dayjs from "@calcom/dayjs"; import { getManageLink } from "@calcom/lib/CalEventParser"; import { APP_NAME } from "@calcom/lib/constants"; -import type { CalendarEvent } from "@calcom/types/Calendar"; +import type { CalendarEvent, Person } from "@calcom/types/Calendar"; import { renderEmail } from ".."; import OrganizerScheduledEmail from "./organizer-scheduled-email"; @@ -14,6 +14,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche constructor(calEvent: CalendarEvent, metadata: { rescheduleLink: string }) { super({ calEvent }); this.metadata = metadata; + this.t = this.calEvent.attendees[0].language.translate; } protected getNodeMailerPayload(): Record { const toAddresses = [this.calEvent.attendees[0].email]; @@ -31,7 +32,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche })}`, html: renderEmail("AttendeeWasRequestedToRescheduleEmail", { calEvent: this.calEvent, - attendee: this.calEvent.organizer, + attendee: this.calEvent.attendees[0], metadata: this.metadata, }), text: this.getTextBody(),