mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
chore: add i18n lang to document deleted email
This commit is contained in:
@ -2,12 +2,15 @@
|
||||
|
||||
import { createElement } from 'react';
|
||||
|
||||
import { msg } from '@lingui/macro';
|
||||
|
||||
import { mailer } from '@documenso/email/mailer';
|
||||
import DocumentCancelTemplate from '@documenso/email/templates/document-cancel';
|
||||
import { prisma } from '@documenso/prisma';
|
||||
import type { Document, DocumentMeta, Recipient, User } from '@documenso/prisma/client';
|
||||
import { DocumentStatus, SendStatus } from '@documenso/prisma/client';
|
||||
|
||||
import { getI18nInstance } from '../../client-only/providers/i18n.server';
|
||||
import { NEXT_PUBLIC_WEBAPP_URL } from '../../constants/app';
|
||||
import { FROM_ADDRESS, FROM_NAME } from '../../constants/email';
|
||||
import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs';
|
||||
@ -192,10 +195,12 @@ const handleDocumentOwnerDelete = async ({
|
||||
});
|
||||
|
||||
const [html, text] = await Promise.all([
|
||||
renderEmailWithI18N(template),
|
||||
renderEmailWithI18N(template, { plainText: true }),
|
||||
renderEmailWithI18N(template, { lang: document.documentMeta?.language }),
|
||||
renderEmailWithI18N(template, { lang: document.documentMeta?.language, plainText: true }),
|
||||
]);
|
||||
|
||||
const i18n = await getI18nInstance(document.documentMeta?.language);
|
||||
|
||||
await mailer.sendMail({
|
||||
to: {
|
||||
address: recipient.email,
|
||||
@ -205,7 +210,7 @@ const handleDocumentOwnerDelete = async ({
|
||||
name: FROM_NAME,
|
||||
address: FROM_ADDRESS,
|
||||
},
|
||||
subject: 'Document Cancelled',
|
||||
subject: i18n._(msg`Document Cancelled`),
|
||||
html,
|
||||
text,
|
||||
});
|
||||
|
||||
@ -450,6 +450,7 @@ msgstr "Empfänger des direkten Links"
|
||||
msgid "Document access"
|
||||
msgstr "Dokumentenzugriff"
|
||||
|
||||
#: packages/lib/server-only/document/delete-document.ts:213
|
||||
#: packages/lib/server-only/document/super-delete-document.ts:75
|
||||
msgid "Document Cancelled"
|
||||
msgstr "Dokument storniert"
|
||||
@ -1309,4 +1310,3 @@ msgstr "Dein Passwort wurde aktualisiert."
|
||||
#: packages/email/templates/team-delete.tsx:30
|
||||
msgid "Your team has been deleted"
|
||||
msgstr "Dein Team wurde gelöscht"
|
||||
|
||||
|
||||
@ -602,4 +602,3 @@ msgstr "Sie können Documenso kostenlos selbst hosten oder unsere sofort einsatz
|
||||
#: apps/marketing/src/components/(marketing)/carousel.tsx:272
|
||||
msgid "Your browser does not support the video tag."
|
||||
msgstr "Ihr Browser unterstützt das Video-Tag nicht."
|
||||
|
||||
|
||||
@ -4628,4 +4628,3 @@ msgstr "Ihr Token wurde erfolgreich erstellt! Stellen Sie sicher, dass Sie es ko
|
||||
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:86
|
||||
msgid "Your tokens will be shown here once you create them."
|
||||
msgstr "Ihre Tokens werden hier angezeigt, sobald Sie sie erstellt haben."
|
||||
|
||||
|
||||
@ -445,6 +445,7 @@ msgstr "Direct link receiver"
|
||||
msgid "Document access"
|
||||
msgstr "Document access"
|
||||
|
||||
#: packages/lib/server-only/document/delete-document.ts:213
|
||||
#: packages/lib/server-only/document/super-delete-document.ts:75
|
||||
msgid "Document Cancelled"
|
||||
msgstr "Document Cancelled"
|
||||
|
||||
@ -450,6 +450,7 @@ msgstr "Receptor de enlace directo"
|
||||
msgid "Document access"
|
||||
msgstr "Acceso al documento"
|
||||
|
||||
#: packages/lib/server-only/document/delete-document.ts:213
|
||||
#: packages/lib/server-only/document/super-delete-document.ts:75
|
||||
msgid "Document Cancelled"
|
||||
msgstr "Documento cancelado"
|
||||
@ -1309,4 +1310,3 @@ msgstr "Tu contraseña ha sido actualizada."
|
||||
#: packages/email/templates/team-delete.tsx:30
|
||||
msgid "Your team has been deleted"
|
||||
msgstr "Tu equipo ha sido eliminado"
|
||||
|
||||
|
||||
@ -602,4 +602,3 @@ msgstr "Puedes autoalojar Documenso de forma gratuita o usar nuestra versión al
|
||||
#: apps/marketing/src/components/(marketing)/carousel.tsx:272
|
||||
msgid "Your browser does not support the video tag."
|
||||
msgstr "Tu navegador no soporta la etiqueta de video."
|
||||
|
||||
|
||||
@ -4628,4 +4628,3 @@ msgstr "¡Tu token se creó con éxito! ¡Asegúrate de copiarlo porque no podr
|
||||
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:86
|
||||
msgid "Your tokens will be shown here once you create them."
|
||||
msgstr "Tus tokens se mostrarán aquí una vez que los crees."
|
||||
|
||||
|
||||
@ -450,6 +450,7 @@ msgstr "Receveur de lien direct"
|
||||
msgid "Document access"
|
||||
msgstr "Accès au document"
|
||||
|
||||
#: packages/lib/server-only/document/delete-document.ts:213
|
||||
#: packages/lib/server-only/document/super-delete-document.ts:75
|
||||
msgid "Document Cancelled"
|
||||
msgstr "Document Annulé"
|
||||
@ -1309,4 +1310,3 @@ msgstr "Votre mot de passe a été mis à jour."
|
||||
#: packages/email/templates/team-delete.tsx:30
|
||||
msgid "Your team has been deleted"
|
||||
msgstr "Votre équipe a été supprimée"
|
||||
|
||||
|
||||
@ -602,4 +602,3 @@ msgstr "Vous pouvez auto-héberger Documenso gratuitement ou utiliser notre vers
|
||||
#: apps/marketing/src/components/(marketing)/carousel.tsx:272
|
||||
msgid "Your browser does not support the video tag."
|
||||
msgstr "Votre navigateur ne prend pas en charge la balise vidéo."
|
||||
|
||||
|
||||
@ -4628,4 +4628,3 @@ msgstr "Votre jeton a été créé avec succès ! Assurez-vous de le copier car
|
||||
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/tokens/page.tsx:86
|
||||
msgid "Your tokens will be shown here once you create them."
|
||||
msgstr "Vos jetons seront affichés ici une fois que vous les aurez créés."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user