Use the same locale for event description. (#5674)

* Use the same locale for event description.

Currently all headers  of the event description use organizer's language except description part. This is not suitable to see different languages withing the same text block.

Change description header to use the same locale as others.

* Translate app_status in organizer language too

Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
Maxim G 2022-12-18 14:36:30 +02:00 committed by GitHub
parent 34fe1c4a95
commit 7659a016b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ export const getAppsStatus = (calEvent: CalendarEvent) => {
if (!calEvent.appsStatus) {
return "";
}
return `\n${calEvent.attendees[0].language.translate("apps_status")}
return `\n${calEvent.organizer.language.translate("apps_status")}
${calEvent.appsStatus.map((app) => {
return `\n- ${app.appName} ${
app.success >= 1 ? `${app.success > 1 ? `(x${app.success})` : ""}` : ""
@ -94,7 +94,7 @@ export const getDescription = (calEvent: CalendarEvent) => {
if (!calEvent.description) {
return "";
}
return `\n${calEvent.attendees[0].language.translate("description")}
return `\n${calEvent.organizer.language.translate("description")}
${calEvent.description}
`;
};