Translate notifications (#581)

Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain>
Co-authored-by: Eric Doughty-Papassideris <edoughtypapassideris@linagora.com>
This commit is contained in:
Montassar Ghanmy
2024-07-18 19:16:10 +01:00
committed by GitHub
parent 8a2651134b
commit 222a6d1059
8 changed files with 56 additions and 5 deletions
@@ -16,6 +16,7 @@ export class DocumentsEngine implements Initializable {
const company = await globalResolver.services.companies.getCompany({
id: e.context.company.id,
});
const language = receiver.preferences?.language || "en";
const emailTemplate =
event === DocumentEvents.DOCUMENT_SAHRED
? "notification-document-shared"
@@ -23,7 +24,7 @@ export class DocumentsEngine implements Initializable {
try {
const { html, text, subject } = await globalResolver.platformServices.emailPusher.build(
emailTemplate,
receiver.language || "en",
language,
{
sender,
receiver,