Make new login email translatable

Fixes #798
This commit is contained in:
Johannes Zellner
2021-07-29 10:54:36 +02:00
parent ef56bf9888
commit eda3cd83ae
3 changed files with 9 additions and 9 deletions
@@ -2,15 +2,15 @@
<img src="<%= cloudronAvatarUrl %>" width="128px" height="128px"/>
<h3>We've noticed a new login on your Cloudron account.</h3>
<h3>{{ newLoginEmail.topic }}</h3>
<p>Hi <%= user %>,</p>
<p>{{ newLoginEmail.salutation }}</p>
<p>We noticed a login on your Cloudron account from a new device.</p>
<p>{{ newLoginEmail.notice }}</p>
<p>IP: <%= ip %> (<%= city %>, <%= country %>)</p>
<p>Browser: <%= userAgent %></p>
<p>If this was you, you can safely disregard this email. If this wasn't you, you should change your password immediately.</p>
<p>{{ newLoginEmail.action }}</p>
<br/>
<br/>
@@ -1,14 +1,14 @@
We've noticed a new login on your Cloudron account.
{{ newLoginEmail.topic }}
Hi <%= user %>,
{{ newLoginEmail.salutation }}
We noticed a login on your Cloudron account from a new device.
{{ newLoginEmail.notice }}
IP: <%= ip %> (<%= city %>, <%= country %>)
Browser: <%= userAgent %>
If this was you, you can safely disregard this email. If this wasn't you, you should change your password immediately.
{{ newLoginEmail.action }}
Powered by https://cloudron.io
+1 -1
View File
@@ -170,7 +170,7 @@ function sendNewLoginLocation(user, loginLocation) {
const mailOptions = {
from: mailConfig.notificationFrom,
to: user.fallbackEmail,
subject: `[${mailConfig.cloudronName}] New login on your account`,
subject: ejs.render(translation.translate('{{ newLoginEmail.subject }}', translationAssets.translations || {}, translationAssets.fallback || {}), { cloudron: mailConfig.cloudronName }),
text: render('new_login_location-text.ejs', templateData, translationAssets),
html: render('new_login_location-html.ejs', templateData, translationAssets)
};