From 7659a016b412aabc7615b4f505619cd6cafaafc9 Mon Sep 17 00:00:00 2001 From: Maxim G Date: Sun, 18 Dec 2022 14:36:30 +0200 Subject: [PATCH] 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 --- packages/lib/CalEventParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.ts index fe867db412..05b6816403 100644 --- a/packages/lib/CalEventParser.ts +++ b/packages/lib/CalEventParser.ts @@ -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} `; };