Skip to content

Node.js based forum software built for the modern web

fix: translate test notif email bodyLong

Barış Soner Uşaklı2961473f1014
diff --git a/src/socket.io/admin/email.js b/src/socket.io/admin/email.js
index 9059520b2b..a22a865718 100644
--- a/src/socket.io/admin/email.js
+++ b/src/socket.io/admin/email.js
@@ -10,6 +10,7 @@ const notifications = require('../../notifications');
const emailer = require('../../emailer');
const utils = require('../../utils');
const user = require('../../user');
+const tx = require('../../translator');
const Email = module.exports;
@@ -58,7 +59,7 @@ Email.test = async function (socket, data) {
path: notification.path,
subject: utils.stripHTMLTags(notification.subject || '[[notifications:new-notification]]'),
intro: utils.stripHTMLTags(notification.bodyShort),
- body: notification.bodyLong || '',
+ body: tx.translate(notification.bodyLong || ''),
notification,
showUnsubscribe: true,
});
diff --git a/src/views/emails/notification.tpl b/src/views/emails/notification.tpl
index 0d6167e610..7468811b24 100644
--- a/src/views/emails/notification.tpl
+++ b/src/views/emails/notification.tpl
@@ -23,7 +23,7 @@
{{{ if (notification.type == "post-queue") }}}
<!-- IMPORT emails/partials/post-queue-body.tpl -->
{{{ else }}}
- {{txEscape(body)}}
+ {{body}}
{{{ end }}}
</p>
</td>