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>
pull/6095/head
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
1 changed files with 2 additions and 2 deletions

View File

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