1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add email translations

Convert emails from Pug template to Handlebars because i18next doesn't
support Pug
This commit is contained in:
Chocobozzz 2025-07-18 11:04:30 +02:00
parent b45fbf4337
commit d6e4dac032
No known key found for this signature in database
GPG key ID: 583A612D890159BE
223 changed files with 9859 additions and 1426 deletions

View file

@ -66,6 +66,7 @@ export function buildUser (options: {
videosHistoryEnabled: CONFIG.USER.HISTORY.VIDEOS.ENABLED,
autoPlayVideo: CONFIG.DEFAULTS.PLAYER.AUTO_PLAY,
language: null,
role,
emailVerified,
@ -188,6 +189,7 @@ export async function sendVerifyUserChangeEmail (user: MUser) {
Emailer.Instance.addUserVerifyChangeEmailJob({
username: user.username,
to: user.pendingEmail,
language: user.getLanguage(),
verifyEmailUrl: await buildUserVerifyEmail(user, true)
})
}
@ -196,6 +198,7 @@ export async function sendVerifyRegistrationRequestEmail (registration: MRegistr
Emailer.Instance.addRegistrationVerifyEmailJob({
username: registration.username,
to: registration.email,
language: CONFIG.INSTANCE.DEFAULT_LANGUAGE,
verifyEmailUrl: await buildRegistrationRequestVerifyEmail(registration),
isRegistrationRequest: true
})
@ -205,6 +208,7 @@ export async function sendVerifyRegistrationEmail (user: MUser) {
Emailer.Instance.addRegistrationVerifyEmailJob({
username: user.username,
to: user.email,
language: user.getLanguage(),
verifyEmailUrl: await buildUserVerifyEmail(user, false),
isRegistrationRequest: true
})