fix: translate (#9108)
parent
bbf93a7435
commit
abc9dfdaf4
|
@ -3,23 +3,27 @@ import { OrganizerScheduledEmail } from "./OrganizerScheduledEmail";
|
||||||
|
|
||||||
export const AttendeeWasRequestedToRescheduleEmail = (
|
export const AttendeeWasRequestedToRescheduleEmail = (
|
||||||
props: { metadata: { rescheduleLink: string } } & React.ComponentProps<typeof OrganizerScheduledEmail>
|
props: { metadata: { rescheduleLink: string } } & React.ComponentProps<typeof OrganizerScheduledEmail>
|
||||||
) => (
|
) => {
|
||||||
<OrganizerScheduledEmail
|
const t = props.attendee.language.translate;
|
||||||
title="request_reschedule_title_attendee"
|
return (
|
||||||
subtitle={
|
<OrganizerScheduledEmail
|
||||||
<>
|
t={t}
|
||||||
{props.calEvent.organizer.language.translate("request_reschedule_subtitle", {
|
title="request_reschedule_title_attendee"
|
||||||
organizer: props.calEvent.organizer.name,
|
subtitle={
|
||||||
})}
|
<>
|
||||||
</>
|
{t("request_reschedule_subtitle", {
|
||||||
}
|
organizer: props.calEvent.organizer.name,
|
||||||
headerType="calendarCircle"
|
})}
|
||||||
subject="rescheduled_event_type_subject"
|
</>
|
||||||
callToAction={
|
}
|
||||||
<CallToActionTable>
|
headerType="calendarCircle"
|
||||||
<CallToAction label="Book a new time" href={props.metadata.rescheduleLink} endIconName="linkIcon" />
|
subject="rescheduled_event_type_subject"
|
||||||
</CallToActionTable>
|
callToAction={
|
||||||
}
|
<CallToActionTable>
|
||||||
{...props}
|
<CallToAction label="Book a new time" href={props.metadata.rescheduleLink} endIconName="linkIcon" />
|
||||||
/>
|
</CallToActionTable>
|
||||||
);
|
}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import type { DateArray, Person } from "ics";
|
import type { DateArray } from "ics";
|
||||||
import { createEvent } from "ics";
|
import { createEvent } from "ics";
|
||||||
|
|
||||||
import dayjs from "@calcom/dayjs";
|
import dayjs from "@calcom/dayjs";
|
||||||
import { getManageLink } from "@calcom/lib/CalEventParser";
|
import { getManageLink } from "@calcom/lib/CalEventParser";
|
||||||
import { APP_NAME } from "@calcom/lib/constants";
|
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 { renderEmail } from "..";
|
||||||
import OrganizerScheduledEmail from "./organizer-scheduled-email";
|
import OrganizerScheduledEmail from "./organizer-scheduled-email";
|
||||||
|
@ -14,6 +14,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche
|
||||||
constructor(calEvent: CalendarEvent, metadata: { rescheduleLink: string }) {
|
constructor(calEvent: CalendarEvent, metadata: { rescheduleLink: string }) {
|
||||||
super({ calEvent });
|
super({ calEvent });
|
||||||
this.metadata = metadata;
|
this.metadata = metadata;
|
||||||
|
this.t = this.calEvent.attendees[0].language.translate;
|
||||||
}
|
}
|
||||||
protected getNodeMailerPayload(): Record<string, unknown> {
|
protected getNodeMailerPayload(): Record<string, unknown> {
|
||||||
const toAddresses = [this.calEvent.attendees[0].email];
|
const toAddresses = [this.calEvent.attendees[0].email];
|
||||||
|
@ -31,7 +32,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche
|
||||||
})}`,
|
})}`,
|
||||||
html: renderEmail("AttendeeWasRequestedToRescheduleEmail", {
|
html: renderEmail("AttendeeWasRequestedToRescheduleEmail", {
|
||||||
calEvent: this.calEvent,
|
calEvent: this.calEvent,
|
||||||
attendee: this.calEvent.organizer,
|
attendee: this.calEvent.attendees[0],
|
||||||
metadata: this.metadata,
|
metadata: this.metadata,
|
||||||
}),
|
}),
|
||||||
text: this.getTextBody(),
|
text: this.getTextBody(),
|
||||||
|
|
Loading…
Reference in New Issue