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

@ -144,6 +144,8 @@ class ServerConfigManager {
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
},
defaultLanguage: CONFIG.INSTANCE.DEFAULT_LANGUAGE,
avatars: serverActor.Avatars.map(a => a.toFormattedJSON()),
banners: serverActor.Banners.map(b => b.toFormattedJSON()),
@ -512,6 +514,24 @@ class ServerConfigManager {
return maxBy(this.getOpenGraphLogos(serverActor), 'width')
}
getLogoUrl (serverActor: MActorUploadImages, width: 192 | 512) {
const customLogo = this.getLogo(serverActor, width)
if (customLogo) {
return WEBSERVER.URL + customLogo.getStaticPath()
}
return `${WEBSERVER.URL}/client/assets/images/icons/icon-${width}x${width}.png`
}
getLogo (serverActor: MActorUploadImages, width: 192 | 512) {
if (serverActor.Avatars.length > 0) {
return findAppropriateImage(serverActor.Avatars, width)
}
return undefined
}
private getFaviconLogos (serverActor: MActorUploadImages) {
return this.getLogoWithFallbacks({
serverActor,