Skip to content

Node.js based forum software built for the modern web

refactor: #14376, migrate translations to use tx

Barış Soner Uşaklı64ed84e610de
diff --git a/.husky/commit-msg b/.husky/commit-msg
index e8511eaeaf..ee7716e431 100755
--- a/.husky/commit-msg
+++ b/.husky/commit-msg
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
-npx --no-install commitlint --edit $1
+npx.cmd --no-install commitlint --edit $1
diff --git a/.husky/pre-commit b/.husky/pre-commit
index c70c608e78..5d18e75522 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
-npx --no-install lint-staged
\ No newline at end of file
+npx.cmd --no-install lint-staged
\ No newline at end of file
diff --git a/public/src/modules/accounts/invite.js b/public/src/modules/accounts/invite.js
index 2221f3fca7..7a3c7cb10e 100644
--- a/public/src/modules/accounts/invite.js
+++ b/public/src/modules/accounts/invite.js
@@ -11,7 +11,7 @@ define('accounts/invite', ['api', 'benchpress', 'modals', 'alerts'], function (a
$('[component="user/invite"]').on('click', function (e) {
e.preventDefault();
api.get(`/api/v3/users/${app.user.uid}/invites/groups`, {}).then((groups) => {
- Benchpress.render('modals/invite', { groups }, function (html) {
+ Benchpress.render('modals/invite', { groups }).then(function (html) {
modals.dialog({
message: html,
title: `[[${isACP() ? 'admin/manage/users:invite' : 'users:invite'}]]`,
diff --git a/public/src/modules/intents.js b/public/src/modules/intents.js
index 878f3aa0c2..d185f2a086 100644
--- a/public/src/modules/intents.js
+++ b/public/src/modules/intents.js
@@ -1,6 +1,7 @@
'use strict';
-import { dialog } from 'bootbox';
+import { dialog } from 'modals';
+import * as Benchpress from 'benchpressjs';
import { get } from 'api';
import storage from 'storage';
import { translate, translateKeys } from 'translator';
@@ -99,11 +100,11 @@ export async function register() {
intents: (await mapIntentNames(intents)).join(', '),
})));
- app.parseAndTranslate('modals/intents/register', {
+ Benchpress.render('modals/intents/register', {
description: '[[intents:description]]',
handles,
- }, (html) => {
- const modal = dialog({
+ }).then(async (html) => {
+ const modal = await dialog({
title: '[[intents:title]]',
message: html,
});
@@ -133,7 +134,7 @@ export async function register() {
handle,
intents: (await mapIntentNames(intents)).join(', '),
})));
- const html = await app.parseAndTranslate('modals/intents/register', 'handles', { handles });
+ const html = await Benchpress.render('modals/intents/register', { handles });
modal.find('#intents-registered-list').html(html);
} catch (e) {
alerts.error(e.message);
@@ -204,12 +205,12 @@ export async function trigger(intent, parameters) {
intents: (await mapIntentNames(intents)).join(', '),
})));
- app.parseAndTranslate('modals/intents/trigger', {
+ Benchpress.render('modals/intents/trigger', {
displayIntent,
matchingHandles,
hasAnyHandles: map.size > 0,
- }, (html) => {
- const modal = dialog({
+ }).then(async (html) => {
+ const modal = await dialog({
title: `[[intents:trigger-title, ${displayIntent}]]`,
message: html,
});
diff --git a/src/views/400.tpl b/src/views/400.tpl
index 7601ccf7c5..a72067c3fe 100644
--- a/src/views/400.tpl
+++ b/src/views/400.tpl
@@ -1,12 +1,12 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[global:400.title]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("global:400.title")}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
<div class="mx-auto p-4 bg-light border rounded">
<i class="text-secondary fa fa-fw fa-4x fa-triangle-exclamation"></i>
</div>
- {{{ if error }}}{tx(error)}{{{ else }}}[[global:400.message, {config.relative_path}]]{{{ end }}}
+ {{{ if error }}}{{tx(error)}}{{{ else }}}{{tx("global:400.message", config.relative_path)}}{{{ end }}}
</div>
</div>
</div>
diff --git a/src/views/403.tpl b/src/views/403.tpl
index 761f7507e7..053a50cb47 100644
--- a/src/views/403.tpl
+++ b/src/views/403.tpl
@@ -1,14 +1,14 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[global:403.title]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("global:403.title")}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
<div class="mx-auto p-4 bg-light border rounded">
<i class="text-secondary fa fa-fw fa-4x fa-key"></i>
</div>
- {{{ if error }}}{tx(error)}{{{ else }}}[[global:403.message]]{{{ end }}}
+ {{{ if error }}}{{tx(error)}}{{{ else }}}{{tx("global:403.message")}}{{{ end }}}
{{{ if !loggedIn }}}
- [[global:403.login, {config.relative_path}]]
+ {{tx("global:403.login", config.relative_path)}}
{{{ end }}}
</div>
</div>
diff --git a/src/views/404.tpl b/src/views/404.tpl
index ddc2f47e7a..2d50fad552 100644
--- a/src/views/404.tpl
+++ b/src/views/404.tpl
@@ -1,12 +1,12 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[global:404.title]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("global:404.title")}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
<div class="mx-auto p-4">
<i class="text-secondary fa fa-fw fa-4x {{{ if icon }}}{icon}{{{ else }}}fa-otter{{{ end }}}"></i>
</div>
- {{{ if error }}}{tx(error)}{{{ else }}}[[global:404.message, {config.relative_path}]]{{{ end }}}
+ {{{ if error }}}{{tx(error)}}{{{ else }}}{{tx("global:404.message", config.relative_path)}}{{{ end }}}
</div>
</div>
</div>
diff --git a/src/views/500.tpl b/src/views/500.tpl
index 3d125e2dd1..6e208ecda6 100644
--- a/src/views/500.tpl
+++ b/src/views/500.tpl
@@ -1,12 +1,12 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[global:500.title]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("global:500.title")}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
<div class="mx-auto p-4 bg-light border rounded">
<i class="text-secondary fa fa-fw fa-4x fa-triangle-exclamation"></i>
</div>
- [[global:500.message]]
+ {{tx("global:500.message")}}
{{{ if error }}}<div class="text-sm text-muted">{{tx(error)}}</div>{{{ end }}}
</div>
</div>
diff --git a/src/views/503.tpl b/src/views/503.tpl
index 800de34b7d..e380f8a509 100644
--- a/src/views/503.tpl
+++ b/src/views/503.tpl
@@ -1,5 +1,5 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[pages:maintenance.text, {site_title}]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("pages:maintenance.text", site_title)}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
@@ -7,7 +7,7 @@
<i class="text-secondary fa fa-fw fa-4x fa-wrench"></i>
</div>
{{{ if message }}}
- [[pages:maintenance.messageIntro]]
+ {{tx("pages:maintenance.messageIntro")}}
<div class="text-sm text-muted">{message}</div>
{{{ end }}}
</div>
diff --git a/src/views/chat.tpl b/src/views/chat.tpl
index 8c7d9aed3d..a4b83bda49 100644
--- a/src/views/chat.tpl
+++ b/src/views/chat.tpl
@@ -4,7 +4,7 @@
<div class="modal-header d-flex gap-4 justify-content-between">
<div id="chat-room-title-{roomId}" class="fs-6 flex-grow-1 fw-semibold tracking-tight text-truncate text-nowrap" component="chat/room/name" data-icon="{icon}">{{{ if ./roomName }}}<i class="fa {icon} text-muted"></i> {roomName}{{{ else }}}{{tx(./chatWithMessage)}}{{{ end}}}</div>
<div class="d-flex gap-1 align-items-center">
- <button type="button" class="btn btn-ghost btn-sm d-none d-md-flex align-self-stretch align-items-center" data-action="maximize" title="[[modules:chat.maximize]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
+ <button type="button" class="btn btn-ghost btn-sm d-none d-md-flex align-self-stretch align-items-center" data-action="maximize" title="{{tx("modules:chat.maximize")}}" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="fa fa-fw fa-expand text-muted"></i>
</button>
@@ -24,14 +24,14 @@
<ul component="chat/message/search/results" class="chat-content p-0 m-0 list-unstyled overflow-auto flex-grow-1 hidden">
<div component="chat/message/search/no-results" class="text-center p-4 d-flex flex-column">
<div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
- <div class="text-xs fw-semibold text-muted">[[search:no-matches]]</div>
+ <div class="text-xs fw-semibold text-muted">{{tx("search:no-matches")}}</div>
</div>
</ul>
<!-- IMPORT partials/chats/composer.tpl -->
</div>
</div>
</div>
- <div class="imagedrop"><div>[[topic:composer.drag-and-drop-images]]</div></div>
+ <div class="imagedrop"><div>{{tx("topic:composer.drag-and-drop-images")}}</div></div>
</div>
</div>
</div>
diff --git a/src/views/chats.tpl b/src/views/chats.tpl
index a3b408e29d..78bc942a0f 100644
--- a/src/views/chats.tpl
+++ b/src/views/chats.tpl
@@ -4,8 +4,8 @@
<div component="chat/nav-wrapper" class="flex-shrink-0 d-flex flex-column h-100 gap-1" data-loaded="{{{ if roomId }}}1{{{ else }}}0{{{ end }}}">
<div class="d-flex flex-column gap-2">
- <button component="chat/create" class="btn btn-primary btn-sm w-100">[[modules:chat.create-room]]</button>
- <input id="search-chats" class="form-control form-control-sm" type="text" placeholder="[[modules:chat.search-chats-placeholder]]" />
+ <button component="chat/create" class="btn btn-primary btn-sm w-100">{{tx("modules:chat.create-room")}}</button>
+ <input id="search-chats" class="form-control form-control-sm" type="text" placeholder="{{tx("modules:chat.search-chats-placeholder")}}" />
</div>
{{{ if publicRooms.length }}}
@@ -15,7 +15,7 @@
<div class="d-flex gap-1 align-items-center justify-content-between justify-content-lg-start">
<button class="btn btn-ghost btn-sm p-1 order-1 order-lg-0" data-bs-toggle="collapse" data-bs-target="#public-rooms"
onclick="$(this).find('i').toggleClass('fa-rotate-180');"><i class="fa fa-fw fa-chevron-up" style="transition: 0.25s ease;"></i></button>
- <label class="text-sm text-muted lh-1">[[modules:chat.public-rooms, {publicRooms.length}]]</label>
+ <label class="text-sm text-muted lh-1">{{tx("modules:chat.public-rooms", publicRooms.length)}}</label>
</div>
<div id="public-rooms" component="chat/public" class="collapse show">
<div class="d-flex gap-1 flex-column">
@@ -42,7 +42,7 @@
<div class="d-flex gap-1 align-items-center justify-content-between justify-content-lg-start">
<button class="btn btn-ghost btn-sm p-1 order-1 order-lg-0" data-bs-toggle="collapse" data-bs-target="#private-rooms"
onclick="$(this).find('i').toggleClass('fa-rotate-180')"><i class="fa fa-fw fa-chevron-up" style="transition: 0.25s ease;"></i></button>
- <label class="text-sm text-muted lh-1">[[modules:chat.private-rooms, {privateRoomCount}]]</label>
+ <label class="text-sm text-muted lh-1">{{tx("modules:chat.private-rooms", privateRoomCount)}}</label>
</div>
{{{ end }}}
@@ -56,7 +56,7 @@
<div component="chat/main-wrapper" class="flex-grow-1 ms-lg-2 ps-lg-2 border-1 border-start-lg h-100" style="min-width: 0;" data-roomid="{roomId}">
<!-- IMPORT partials/chats/message-window.tpl -->
</div>
- <div class="imagedrop"><div>[[topic:composer.drag-and-drop-images]]</div></div>
+ <div class="imagedrop"><div>{{tx("topic:composer.drag-and-drop-images")}}</div></div>
</div>
</div>
<div data-widget-area="sidebar" class="h-100 col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
diff --git a/src/views/confirm.tpl b/src/views/confirm.tpl
index 00396818b8..38bffc87f9 100644
--- a/src/views/confirm.tpl
+++ b/src/views/confirm.tpl
@@ -1,14 +1,14 @@
{{{ if error }}}
<div class="alert alert-warning">
- <p>[[notifications:email-confirm-error-message]]</p>
+ <p>{{tx("notifications:email-confirm-error-message")}}</p>
{{{ end }}}
{{{ if !error }}}
<div class="alert alert-success">
- <strong>[[notifications:email-confirmed]]</strong>
- <p>[[notifications:email-confirmed-message]]</p>
+ <strong>{{tx("notifications:email-confirmed")}}</strong>
+ <p>{{tx("notifications:email-confirmed-message")}}</p>
{{{ end }}}
<p class="mb-0">
- <a href="{config.relative_path}/">[[notifications:back-to-home, {config.siteTitle}]]</a>
+ <a href="{config.relative_path}/">{{tx("notifications:back-to-home", config.siteTitle)}}</a>
</p>
</div>
\ No newline at end of file
diff --git a/src/views/emails/banned.tpl b/src/views/emails/banned.tpl
index 03f6e7c1ca..23fbcfafda 100644
--- a/src/views/emails/banned.tpl
+++ b/src/views/emails/banned.tpl
@@ -8,19 +8,19 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-with-name, {username}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-with-name", txEscape(username))}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:banned.text1, {username}, {site_title}]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:banned.text1", txEscape(username), site_title)}}</h1>
</td>
</tr>
{{{ if reason }}}
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:banned.text3]]
+ {{tx("email:banned.text3")}}
</p>
<div style="margin: 0; padding: 6px 0px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 26px; color: #666666;">
{reason}
@@ -32,7 +32,7 @@
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:banned.text2, {until}]]
+ {{tx("email:banned.text2", until)}}
</p>
</td>
</tr>
diff --git a/src/views/emails/digest.tpl b/src/views/emails/digest.tpl
index 55003220d2..da987713f1 100644
--- a/src/views/emails/digest.tpl
+++ b/src/views/emails/digest.tpl
@@ -9,12 +9,12 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-with-name, {displayname}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-with-name", txEscape(displayname))}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:digest.title.{interval}]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx(concat("email:digest.title.", interval))}}</h1>
</td>
</tr>
{{{ if notifications.length }}}
@@ -46,14 +46,14 @@
{{{ if publicRooms.length }}}
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:digest.unread-rooms]]</h1>
+ <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:digest.unread-rooms")}}</h1>
<ul style="margin: 0; padding: 0;">
{{{ each publicRooms }}}
<li style="text-decoration: none; list-style-type: none; padding-bottom: 0.5em;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 16px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height: 16px; color: #333333;">
- <p style="margin: 0;"><a style="text-decoration:none !important; text-decoration:none; color: #333333;" href="{url}/chats/{./roomId}"># [[email:digest.room-name-unreadcount, {./roomName}, {./unreadCountText}]]</a></p>
+ <p style="margin: 0;"><a style="text-decoration:none !important; text-decoration:none; color: #333333;" href="{url}/chats/{./roomId}"># {{tx("email:digest.room-name-unreadcount", ./roomName, ./unreadCountText)}}</a></p>
</td>
</tr>
</table>
@@ -66,7 +66,7 @@
{{{ if topTopics.length }}}
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:digest.top-topics, {site_title}]]</h1>
+ <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:digest.top-topics", site_title)}}</h1>
<ul style="margin: 0; padding: 0;">
{{{ each topTopics }}}
<!-- IMPORT emails/partials/digest-topic.tpl -->
@@ -78,7 +78,7 @@
{{{ if popularTopics.length }}}
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:digest.popular-topics, {site_title}]]</h1>
+ <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:digest.popular-topics", site_title)}}</h1>
<ul style="margin: 0; padding: 0;">
{{{ each popularTopics }}}
<!-- IMPORT emails/partials/digest-topic.tpl -->
@@ -90,7 +90,7 @@
{{{ if recent.length }}}
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:digest.latest-topics, {site_title}]]</h1>
+ <h1 style="margin: 16px 0 24px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:digest.latest-topics", site_title)}}</h1>
<ul style="margin: 0; padding: 0;">
{{{ each recent }}}
<!-- IMPORT emails/partials/digest-topic.tpl -->
@@ -106,7 +106,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{url}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:digest.cta, {site_title}]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:digest.cta", site_title)}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/invitation.tpl b/src/views/emails/invitation.tpl
index bd14f80acd..81d24892c8 100644
--- a/src/views/emails/invitation.tpl
+++ b/src/views/emails/invitation.tpl
@@ -8,17 +8,17 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-no-name]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-no-name")}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:invitation.text1, {username}, {site_title}]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:invitation.text1", txEscape(username), site_title)}}</h1>
</td>
</tr>
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <p style="margin: 0; padding: 6px 0px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 26px; color: #666666;">[[email:invitation.text2, {expireDays}]]</p>
+ <p style="margin: 0; padding: 6px 0px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 26px; color: #666666;">{{tx("email:invitation.text2", expireDays)}}</p>
</td>
</tr>
<tr>
@@ -28,7 +28,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{registerLink}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:invitation.cta]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:invitation.cta")}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/notification.tpl b/src/views/emails/notification.tpl
index 37439dcd50..2a0250133f 100644
--- a/src/views/emails/notification.tpl
+++ b/src/views/emails/notification.tpl
@@ -9,7 +9,7 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-with-name, {username}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-with-name", txEscape(username))}}</h1>
</td>
</tr>
<tr>
@@ -35,7 +35,14 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{notification_url}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:notif.cta{{{ if notification.cta-type }}}-{notification.cta-type}{{{ end }}}]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">
+ {{{ if notification.cta-type }}}
+ {{tx(concat("email:notif.cta-", notification.cta-type))}}
+ {{ else }}
+ {{tx("email:notif.cta")}}
+ {{{ end }}}
+ &rarr;
+ </span>
</a>
</td>
</tr>
diff --git a/src/views/emails/partials/digest-topic.tpl b/src/views/emails/partials/digest-topic.tpl
index 61e334ad80..f5b5ca93b0 100644
--- a/src/views/emails/partials/digest-topic.tpl
+++ b/src/views/emails/partials/digest-topic.tpl
@@ -12,7 +12,7 @@
<p style="margin: 0; padding: 6px 0px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 26px; color: #666666;">{./teaser.content}</p>
<p style="margin: 0; padding: 6px 0px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height: 16px;">
<a style="text-decoration:none !important; text-decoration:none; text-transform: capitalize; color: #666666; line-height: 16px;" href="{url}/topic/{./slug}">
- <small><strong><span style="color: #aaaaaa;">&rsaquo;</span> [[global:read-more]]</strong></small>
+ <small><strong><span style="color: #aaaaaa;">&rsaquo;</span> {{tx("global:read-more")}}</strong></small>
</a>
</p>
</td>
diff --git a/src/views/emails/partials/footer.tpl b/src/views/emails/partials/footer.tpl
index aa9dc7938f..46830c42e3 100644
--- a/src/views/emails/partials/footer.tpl
+++ b/src/views/emails/partials/footer.tpl
@@ -4,8 +4,8 @@
<td style="padding: 40px 10px;width: 100%;font-size: 12px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; line-height:18px; text-align: center; color: #888888;">
<br><br>
{{{ if showUnsubscribe }}}
- [[email:notif.post.unsub.info]] <a href="{url}/uid/{uid}/settings">[[email:unsub.cta]]</a>.
- <br />[[email:notif.post.unsub.one-click]] <a href="{unsubUrl}">[[email:unsubscribe]]</a>.
+ {{tx("email:notif.post.unsub.info")}} <a href="{url}/uid/{uid}/settings">{{tx("email:unsub.cta")}}</a>.
+ <br />{{tx("email:notif.post.unsub.one-click")}} <a href="{unsubUrl}">{{tx("email:unsubscribe")}}</a>.
{{{ end }}}
<br><br>
</td>
diff --git a/src/views/emails/partials/post-queue-body.tpl b/src/views/emails/partials/post-queue-body.tpl
index f65e6746cf..b40bdcd1c0 100644
--- a/src/views/emails/partials/post-queue-body.tpl
+++ b/src/views/emails/partials/post-queue-body.tpl
@@ -6,4 +6,4 @@
<p><strong>{{tx("post-queue:user")}}</strong></p>
<p>{{{ if notification.user.url }}}<a href="{notification.user.url}">{notification.user.username}</a>{{{ else }}}{notification.user.username}{{{ end }}}</p>
-<p>{{txEscape(notification.content)}}</p>
+<p>{{notification.content}}</p>
diff --git a/src/views/emails/registration_accepted.tpl b/src/views/emails/registration_accepted.tpl
index 35c1d50b53..b7b77d3769 100644
--- a/src/views/emails/registration_accepted.tpl
+++ b/src/views/emails/registration_accepted.tpl
@@ -9,12 +9,12 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:welcome.text1, {site_title}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:welcome.text1", site_title)}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:welcome.text3]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:welcome.text3")}}</h1>
</td>
</tr>
<tr>
@@ -24,7 +24,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{url}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:digest.cta, {site_title}]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:digest.cta", site_title)}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/reset.tpl b/src/views/emails/reset.tpl
index 9a85c6fb3b..ae87e6c28f 100644
--- a/src/views/emails/reset.tpl
+++ b/src/views/emails/reset.tpl
@@ -9,18 +9,18 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-no-name]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-no-name")}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:reset.text1]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:reset.text1")}}</h1>
</td>
</tr>
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:reset.text2]]
+ {{tx("email:reset.text2")}}
</p>
</td>
</tr>
@@ -31,7 +31,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{reset_link}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:reset.cta]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:reset.cta")}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/reset_notify.tpl b/src/views/emails/reset_notify.tpl
index 64f997640a..413d701da2 100644
--- a/src/views/emails/reset_notify.tpl
+++ b/src/views/emails/reset_notify.tpl
@@ -9,18 +9,18 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-with-name, {username}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-with-name", txEscape(username))}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:reset.notify.text1, {date}]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:reset.notify.text1", date)}}</h1>
</td>
</tr>
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:reset.notify.text2]]
+ {{tx("email:reset.notify.text2")}}
</p>
</td>
</tr>
@@ -31,7 +31,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{url}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:digest.cta, {site_title}]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:digest.cta", site_title)}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/test.tpl b/src/views/emails/test.tpl
index 3513f6e70c..47ad2c26a1 100644
--- a/src/views/emails/test.tpl
+++ b/src/views/emails/test.tpl
@@ -9,12 +9,12 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-no-name]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-no-name")}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:test.text1]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:test.text1")}}</h1>
</td>
</tr>
<tr>
@@ -24,7 +24,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{url}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:digest.cta, {site_title}]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:digest.cta", site_title)}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/verify-email.tpl b/src/views/emails/verify-email.tpl
index e19e1734b9..a8524e9ff3 100644
--- a/src/views/emails/verify-email.tpl
+++ b/src/views/emails/verify-email.tpl
@@ -9,25 +9,25 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px 40px 6px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting-with-name, {username}]]</h1>
+ <h1 style="margin: 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:greeting-with-name", txEscape(username))}}</h1>
</td>
</tr>
<tr>
<td style="padding: 0px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">[[email:email.verify.text1]]</h1>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 18px; line-height: 21px; color: #aaaaaa; font-weight: normal;">{{tx("email:email.verify.text1")}}</h1>
</td>
</tr>
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:email.verify.text2]]
+ {{tx("email:email.verify.text2")}}
</p>
</td>
</tr>
<tr>
<td style="padding: 20px 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
<p style="margin: 0;">
- [[email:email.verify.text3, {email}]]
+ {{tx("email:email.verify.text3", email)}}
</p>
</td>
</tr>
@@ -38,7 +38,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{confirm_link}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:welcome.cta]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:welcome.cta")}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/emails/welcome.tpl b/src/views/emails/welcome.tpl
index dfc5e9ed22..146cfe05ba 100644
--- a/src/views/emails/welcome.tpl
+++ b/src/views/emails/welcome.tpl
@@ -9,8 +9,8 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="padding: 40px; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 15px; line-height: 20px; color: #555555;">
- <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:welcome.text1, {site_title}]]</h1>
- <p style="margin: 0;">[[email:welcome.text2]]</p>
+ <h1 style="margin: 0 0 10px 0; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">{{tx("email:welcome.text1", site_title)}}</h1>
+ <p style="margin: 0;">{{tx("email:welcome.text2")}}</p>
</td>
</tr>
<tr>
@@ -20,7 +20,7 @@
<tr>
<td style="border-radius: 3px; background: #222222; text-align: center;" class="button-td">
<a href="{confirm_link}" style="background: #222222; border: 15px solid #222222; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 13px; line-height: 1.1; text-align: center; text-decoration: none; display: block; border-radius: 3px; font-weight: bold;" class="button-a">
- <span style="color:#ffffff;" class="button-link">[[email:welcome.cta]] &rarr;</span>
+ <span style="color:#ffffff;" class="button-link">{{tx("email:welcome.cta")}} &rarr;</span>
</a>
</td>
</tr>
diff --git a/src/views/flags/detail.tpl b/src/views/flags/detail.tpl
index 82418b0b31..4353e3fc85 100644
--- a/src/views/flags/detail.tpl
+++ b/src/views/flags/detail.tpl
@@ -5,34 +5,34 @@
<div class="d-grid gap-1">
<a class="btn btn-ghost btn-sm ff-secondary border d-flex gap-2 align-items-center" href="{config.relative_path}/{type_path}/{targetId}">
<i class="fa fa-fw fa-external-link text-primary"></i>
- [[flags:go-to-target]]
+ {{tx("flags:go-to-target")}}
</a>
{{{ if target.uid }}}
<div class="dropdown dropend" data-uid="{target.uid}">
<button type="button" class="btn btn-ghost btn-sm ff-secondary border d-flex gap-2 align-items-center dropdown-toggle w-100" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-street-view text-primary"></i>
- [[flags:flagged-user]]
+ {{tx("flags:flagged-user")}}
<i class="fa fa-chevron-right ms-auto text-secondary"></i>
</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
- <li><a class="dropdown-item rounded-1" href="{config.relative_path}/uid/{target.uid}" role="menuitem">[[flags:view-profile]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="{config.relative_path}/uid/{target.uid}" role="menuitem">{{tx("flags:view-profile")}}</a></li>
{{{ if !config.disableChat }}}
- <li><a class="dropdown-item rounded-1" href="#" data-action="chat" role="menuitem">[[flags:start-new-chat]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="chat" role="menuitem">{{tx("flags:start-new-chat")}}</a></li>
{{{ end }}}
<li class="dropdown-divider"></li>
{{{ if privileges.ban }}}
- <li class="{{{ if target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="ban" role="menuitem">[[user:ban-account]]</a></li>
- <li class="{{{ if !target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unban" role="menuitem">[[user:unban-account]]</a></li>
+ <li class="{{{ if target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="ban" role="menuitem">{{tx("user:ban-account")}}</a></li>
+ <li class="{{{ if !target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unban" role="menuitem">{{tx("user:unban-account")}}</a></li>
{{{ end }}}
{{{ if privileges.mute}}}
- <li class="{{{ if target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="mute" role="menuitem">[[user:mute-account]]</a></li>
- <li class="{{{ if !target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unmute" role="menuitem">[[user:unmute-account]]</a></li>
+ <li class="{{{ if target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="mute" role="menuitem">{{tx("user:mute-account")}}</a></li>
+ <li class="{{{ if !target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unmute" role="menuitem">{{tx("user:unmute-account")}}</a></li>
{{{ end }}}
{{{ if privileges.admin:users }}}
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-account" role="menuitem">[[user:delete-account-as-admin]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-content" role="menuitem">[[user:delete-content]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-all" role="menuitem">[[user:delete-all]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-account" role="menuitem">{{tx("user:delete-account-as-admin")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-content" role="menuitem">{{tx("user:delete-content")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-all" role="menuitem">{{tx("user:delete-all")}}</a></li>
{{{ end }}}
</ul>
</div>
@@ -40,47 +40,47 @@
<a class="btn btn-ghost btn-sm ff-secondary border d-flex gap-2 align-items-center" href="#" data-action="assign">
<i class="fa fa-fw fa-id-card-o text-primary"></i>
- [[flags:assign-to-me]]
+ {{tx("flags:assign-to-me")}}
</a>
{{{ if type_bool.post }}}
{{{ if !target.deleted}}}
- <a class="d-flex gap-2 align-items-center btn btn-sm btn-outline-danger border border-secondary-subtle text-start" href="#" data-action="delete-post"><i class="fa fa-fw fa-trash"></i> [[flags:delete-post]]</a>
+ <a class="d-flex gap-2 align-items-center btn btn-sm btn-outline-danger border border-secondary-subtle text-start" href="#" data-action="delete-post"><i class="fa fa-fw fa-trash"></i> {{tx("flags:delete-post")}}</a>
{{{ else }}}
- <a class="d-flex gap-2 align-items-center btn btn-sm btn-danger border border-secondary-subtle text-start" href="#" data-action="purge-post"><i class="fa fa-fw fa-trash"></i> [[flags:purge-post]]</a>
- <a class="d-flex gap-2 align-items-center btn btn-sm btn-outline-success border border-secondary-subtle text-start" href="#" data-action="restore-post"><i class="fa fa-fw fa-reply"></i><i class="fa fa-trash"></i> [[flags:restore-post]]</a>
+ <a class="d-flex gap-2 align-items-center btn btn-sm btn-danger border border-secondary-subtle text-start" href="#" data-action="purge-post"><i class="fa fa-fw fa-trash"></i> {{tx("flags:purge-post")}}</a>
+ <a class="d-flex gap-2 align-items-center btn btn-sm btn-outline-success border border-secondary-subtle text-start" href="#" data-action="restore-post"><i class="fa fa-fw fa-reply"></i><i class="fa fa-fw fa-trash"></i> {{tx("flags:restore-post")}}</a>
{{{ end }}}
{{{ end }}}
</div>
<form class="d-flex flex-column gap-3" id="attributes">
<div>
- <label class="text-muted fw-semibold" for="state">[[flags:state]]</label>
+ <label class="text-muted fw-semibold" for="state">{{tx("flags:state")}}</label>
<select class="form-select form-select-sm" id="state" name="state" disabled>
- <option value="open">[[flags:state-open]]</option>
- <option value="wip">[[flags:state-wip]]</option>
- <option value="resolved">[[flags:state-resolved]]</option>
- <option value="rejected">[[flags:state-rejected]]</option>
+ <option value="open">{{tx("flags:state-open")}}</option>
+ <option value="wip">{{tx("flags:state-wip")}}</option>
+ <option value="resolved">{{tx("flags:state-resolved")}}</option>
+ <option value="rejected">{{tx("flags:state-rejected")}}</option>
</select>
</div>
<div>
- <label class="text-muted fw-semibold" for="assignee">[[flags:assignee]]</label>
+ <label class="text-muted fw-semibold" for="assignee">{{tx("flags:assignee")}}</label>
<select class="form-control form-control-sm" id="assignee" name="assignee" disabled>
- <option value="">[[flags:no-assignee]]</option>
+ <option value="">{{tx("flags:no-assignee")}}</option>
{{{each assignees}}}
<option value="{../uid}">{../username}</option>
{{{end}}}
</select>
</div>
<div class="d-grid">
- <button type="button" class="btn btn-primary" data-action="update">[[flags:update]]</button>
+ <button type="button" class="btn btn-primary" data-action="update">{{tx("flags:update")}}</button>
</div>
</form>
<div class="overflow-auto" component="flag/history" style="max-height: 30rem;">
- <h2 class="h6 fw-bold">[[flags:history]]</h2>
+ <h2 class="h6 fw-bold">{{tx("flags:history")}}</h2>
{{{ if !history.length }}}
- <div class="alert alert-success text-center">[[flags:no-history]]</div>
+ <div class="alert alert-success text-center">{{tx("flags:no-history")}}</div>
{{{ end }}}
{{{ each history }}}
<div class="d-flex flex-column gap-1">
@@ -93,12 +93,12 @@
<ul class="list-unstyled">
{{{ each ./fields }}}
<li>
- [[flags:{@key}]]{{{ if @value }}} &rarr; <span class="fw-semibold">{{tx(@value)}}</span>{{{ end }}}
+ {{tx(concat("flags:", @key))}}{{{ if @value }}} &rarr; <span class="fw-semibold">{{tx(@value)}}</span>{{{ end }}}
</li>
{{{ end }}}
{{{ each ./meta }}}
<li>
- {{./key}}{{{ if ./value }}} &rarr; <span class="fw-semibold">{./value}</span>{{{ end }}}
+ {{tx(./key)}}{{{ if ./value }}} &rarr; <span class="fw-semibold">{./value}</span>{{{ end }}}
</li>
{{{ end }}}
</ul>
@@ -127,15 +127,15 @@
<a href="{config.relative_path}/user/{./target.userslug}">{{buildAvatar(target, "16px", true)}}</a>
<a href="{config.relative_path}/user/{./target.userslug}">{target.username}</a>
</div>
- <blockquote>{{{ if target.aboutme }}}{target.aboutme}{{{ else }}}<em>[[flags:target-aboutme-empty]]</em>{{{ end }}}</blockquote>
+ <blockquote>{{{ if target.aboutme }}}{target.aboutme}{{{ else }}}<em>{{tx("flags:target-aboutme-empty")}}</em>{{{ end }}}</blockquote>
{{{ end }}}
{{{ if type_bool.empty }}}
- <div class="alert alert-warning" role="alert">[[flags:target-purged]]</div>
+ <div class="alert alert-warning" role="alert">{{tx("flags:target-purged")}}</div>
{{{ end }}}
</div>
<div class="flag/reports" class="pb-4 border-bottom">
- <h2 class="h6 fw-bold">[[flags:reports]]</h2>
+ <h2 class="h6 fw-bold">{{tx("flags:reports")}}</h2>
<ul class="list-unstyled mt-4">
{{{ each reports }}}
<li class="d-flex flex-column gap-1" component="flag/report" data-timestamp="{./timestamp}">
@@ -151,12 +151,12 @@
</div>
<div class="pb-4 border-bottom">
<div class="d-flex align-items-center">
- <h2 class="h6 fw-bold me-auto mb-0">[[flags:notes]]</h2>
- <button class="btn btn-ghost ff-secondary border" data-action="addEditNote">[[flags:add-note]]</button>
+ <h2 class="h6 fw-bold me-auto mb-0">{{tx("flags:notes")}}</h2>
+ <button class="btn btn-ghost ff-secondary border" data-action="addEditNote">{{tx("flags:add-note")}}</button>
</div>
<ul component="flag/notes" class="list-unstyled mt-4">
{{{ if !notes.length }}}
- <em>[[flags:no-notes]]</em>
+ <em>{{tx("flags:no-notes")}}</em>
{{{ end }}}
{{{ each notes }}}
<li class="d-flex flex-column gap-1" component="flag/note" data-datetime="{./datetime}" data-index="{@index}">
diff --git a/src/views/groups/details.tpl b/src/views/groups/details.tpl
index cb9f2bb6fa..6774ee0791 100644
--- a/src/views/groups/details.tpl
+++ b/src/views/groups/details.tpl
@@ -7,8 +7,8 @@
<span class="resize p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-arrows"></i></span>
<span class="remove p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-times"></i></span>
</div>
- <a href="#" class="save btn btn-primary">[[groups:cover-save]] <i class="fa fa-fw fa-floppy-o"></i></a>
- <div class="indicator text-bg-primary">[[groups:cover-saving]] <i class="fa fa-fw fa-refresh fa-spin"></i></div>
+ <a href="#" class="save btn btn-primary">{{tx("groups:cover-save")}} <i class="fa fa-fw fa-floppy-o"></i></a>
+ <div class="indicator text-bg-primary">{{tx("groups:cover-saving")}} <i class="fa fa-fw fa-refresh fa-spin"></i></div>
{{{ end }}}
</div>
</div>
@@ -18,8 +18,8 @@
<div class="d-flex flex-column flex-md-row align-items-md-center gap-2">
<h3 class="mb-0 text-capitalize">{generateGroupDisplayName(group)}</h3>
<div>
- {{{ if group.private }}}<span class="badge text-bg-light border border-1">[[groups:details.private]]</span>{{{ end }}}
- {{{ if group.hidden }}}<span class="badge text-bg-light border border-1">[[groups:details.hidden]]</span>{{{ end }}}
+ {{{ if group.private }}}<span class="badge text-bg-light border border-1">{{tx("groups:details.private")}}</span>{{{ end }}}
+ {{{ if group.hidden }}}<span class="badge text-bg-light border border-1">{{tx("groups:details.hidden")}}</span>{{{ end }}}
</div>
</div>
<div>
@@ -31,7 +31,7 @@
{{membershipBtn(group)}}
{{{ end }}}
{{{ if isAdmin }}}
- <a href="{config.relative_path}/admin/manage/groups/{group.slug}" target="_blank" class="btn btn-light text-nowrap"><i class="fa fa-gear"></i> [[user:edit]]</a>
+ <a href="{config.relative_path}/admin/manage/groups/{group.slug}" target="_blank" class="btn btn-light text-nowrap"><i class="fa fa-gear"></i> {{tx("user:edit")}}</a>
{{{ end }}}
</div>
</div>
@@ -47,34 +47,34 @@
<div class="flex-grow-1 ps-md-2 ps-lg-5" style="min-width:0;">
<div class="tab-content">
<div class="tab-pane fade show active" id="groups-posts" role="tabpanel">
- <h3 class="fw-semibold fs-5 mb-0">[[global:posts]]</h3>
+ <h3 class="fw-semibold fs-5 mb-0">{{tx("global:posts")}}</h3>
{{{ if !posts.length }}}
- <div class="alert alert-info my-2">[[groups:details.has-no-posts]]</div>
+ <div class="alert alert-info my-2">{{tx("groups:details.has-no-posts")}}</div>
{{{ end }}}
<!-- IMPORT partials/posts_list.tpl -->
</div>
<div class="tab-pane fade" id="groups-members" role="tabpanel">
- <h3 class="fw-semibold fs-5 mb-3">[[groups:details.members]]</h3>
+ <h3 class="fw-semibold fs-5 mb-3">{{tx("groups:details.members")}}</h3>
<!-- IMPORT partials/groups/memberlist.tpl -->
</div>
{{{ if group.isOwner }}}
<div class="tab-pane fade" id="groups-pending" role="tabpanel">
- <h3 class="fw-semibold fs-5 mb-3">[[groups:details.pending]]</h3>
+ <h3 class="fw-semibold fs-5 mb-3">{{tx("groups:details.pending")}}</h3>
<!-- IMPORT partials/groups/pending.tpl -->
</div>
<div class="tab-pane fade" id="groups-invited" role="tabpanel">
- <h3 class="fw-semibold fs-5 mb-3">[[groups:details.invited]]</h3>
+ <h3 class="fw-semibold fs-5 mb-3">{{tx("groups:details.invited")}}</h3>
<!-- IMPORT partials/groups/invited.tpl -->
</div>
<div class="tab-pane fade" id="groups-admin" role="tabpanel">
<div class="d-flex align-items-center gap-1 justify-content-between mb-3 flex-wrap">
- <h3 class="fw-semibold fs-5">[[groups:details.owner-options]]</h3>
+ <h3 class="fw-semibold fs-5">{{tx("groups:details.owner-options")}}</h3>
<div class="d-flex justify-content-end gap-2">
- <button class="btn btn-link btn-sm text-danger border-danger" type="button" data-action="delete">[[groups:details.delete-group]]</button>
- <button class="btn btn-primary btn-sm" type="button" data-action="update">[[global:save-changes]]</button>
+ <button class="btn btn-link btn-sm text-danger border-danger" type="button" data-action="delete">{{tx("groups:details.delete-group")}}</button>
+ <button class="btn btn-primary btn-sm" type="button" data-action="update">{{tx("global:save-changes")}}</button>
</div>
</div>
<!-- IMPORT partials/groups/admin.tpl -->
diff --git a/src/views/ip-blacklist.tpl b/src/views/ip-blacklist.tpl
index 71d5a19f93..d4a9d28412 100644
--- a/src/views/ip-blacklist.tpl
+++ b/src/views/ip-blacklist.tpl
@@ -1,36 +1,36 @@
<div class="row ip-blacklist">
<div class="col-lg-12">
<p class="lead">
- [[ip-blacklist:lead]]
+ {{tx("ip-blacklist:lead")}}
</p>
<p>
- [[ip-blacklist:description]]
+ {{tx("ip-blacklist:description")}}
</p>
<div class="row">
<div class="col-sm-6 d-flex flex-column">
<div class="card mb-3 flex-grow-1">
- <div class="card-header">[[ip-blacklist:active-rules]]</div>
+ <div class="card-header">{{tx("ip-blacklist:active-rules")}}</div>
<div class="card-body d-flex flex-column">
<textarea id="blacklist-rules" class="flex-grow-1 mb-3 w-100 d-block border px-2 py-1">{rules}</textarea>
<div>
<button type="button" class="btn btn-warning" data-action="test">
- <i class="fa fa-bomb"></i> [[ip-blacklist:validate]]
+ <i class="fa fa-bomb"></i> {{tx("ip-blacklist:validate")}}
</button>
<button type="button" class="btn btn-primary" data-action="apply">
- <i class="fa fa-save"></i> [[ip-blacklist:apply]]
+ <i class="fa fa-save"></i> {{tx("ip-blacklist:apply")}}
</button>
</div>
</div>
</div>
<div class="card flex-shrink-1">
- <div class="card-header">[[ip-blacklist:hints]]</div>
+ <div class="card-header">{{tx("ip-blacklist:hints")}}</div>
<div class="card-body">
<p>
- [[ip-blacklist:hint-1]]
+ {{tx("ip-blacklist:hint-1")}}
</p>
<p>
- [[ip-blacklist:hint-2]]
+ {{tx("ip-blacklist:hint-2")}}
</p>
</div>
</div>
@@ -42,7 +42,7 @@
<canvas id="blacklist:hourly" style="max-height: initial;"></canvas>
</div>
</div>
- <div class="card-footer"><small>[[ip-blacklist:analytics.blacklist-hourly]]</small></div>
+ <div class="card-footer"><small>{{tx("ip-blacklist:analytics.blacklist-hourly")}}</small></div>
</div>
<div class="card">
@@ -51,10 +51,9 @@
<canvas id="blacklist:daily" style="max-height: initial;"></canvas>
</div>
</div>
- <div class="card-footer"><small>[[ip-blacklist:analytics.blacklist-daily]]</small></div>
+ <div class="card-footer"><small>{{tx("ip-blacklist:analytics.blacklist-daily")}}</small></div>
</div>
</div>
</div>
</div>
-
</div>
\ No newline at end of file
diff --git a/src/views/login.tpl b/src/views/login.tpl
index 497edbf0ab..9060c4b8b4 100644
--- a/src/views/login.tpl
+++ b/src/views/login.tpl
@@ -5,7 +5,7 @@
</div>
<div class="row login flex-fill">
<div class="d-flex flex-column gap-2 {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
- <h2 class="tracking-tight fw-semibold text-center">[[global:login]]</h2>
+ <h2 class="tracking-tight fw-semibold text-center">{{tx("global:login")}}</h2>
<div class="row justify-content-center gap-5">
{{{ if allowLocalLogin }}}
<div class="col-12 col-md-5 col-lg-3 px-md-0">
@@ -17,16 +17,16 @@
</div>
<div class="mb-2 d-flex flex-column gap-2">
- <label for="password">[[user:password]]</label>
+ <label for="password">{{tx("user:password")}}</label>
<div>
- <input class="form-control" type="password" placeholder="[[user:password]]" name="password" id="password" autocomplete="current-password" autocapitalize="off" aria-required="true"/>
+ <input class="form-control" type="password" placeholder="{{tx("user:password")}}" name="password" id="password" autocomplete="current-password" autocapitalize="off" aria-required="true"/>
<p id="caps-lock-warning" class="text-danger hidden text-sm mb-0 form-text" aria-live="polite" role="alert" aria-atomic="true">
- <i class="fa fa-exclamation-triangle"></i> [[login:caps-lock-enabled]]
+ <i class="fa fa-exclamation-triangle"></i> {{tx("login:caps-lock-enabled")}}
</p>
</div>
{{{ if allowPasswordReset }}}
<div>
- <a id="reset-link" class="text-sm text-reset text-decoration-underline" href="{config.relative_path}/reset">[[login:forgot-password]]</a>
+ <a id="reset-link" class="text-sm text-reset text-decoration-underline" href="{config.relative_path}/reset">{{tx("login:forgot-password")}}</a>
</div>
{{{ end }}}
</div>
@@ -41,28 +41,28 @@
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
<input type="hidden" name="noscript" id="noscript" value="true" />
- <button class="btn btn-primary" id="login" type="submit">[[global:login]]</button>
+ <button class="btn btn-primary" id="login" type="submit">{{tx("global:login")}}</button>
<div class="form-check mb-2">
<input class="form-check-input" type="checkbox" name="remember" id="remember" checked />
- <label class="form-check-label" for="remember">[[login:remember-me]]</label>
+ <label class="form-check-label" for="remember">{{tx("login:remember-me")}}</label>
</div>
<div class="alert alert-danger {{{ if !error }}} hidden{{{ end }}}" id="login-error-notify" role="alert" aria-atomic="true">
- <strong>[[login:failed-login-attempt]]</strong>
+ <strong>{{tx("login:failed-login-attempt")}}</strong>
<p class="mb-0">{error}</p>
</div>
<hr/>
- {{{ if (allowRegistration || osw_logins) }}}<span class="text-sm">[[login:dont-have-account]]</span>{{{ end }}}
+ {{{ if (allowRegistration || osw_logins) }}}<span class="text-sm">{{tx("login:dont-have-account")}}</span>{{{ end }}}
{{{ if allowRegistration }}}
- <a class="btn btn-outline-light text-body" href="{config.relative_path}/register">[[register:register]]</a>
+ <a class="btn btn-outline-light text-body" href="{config.relative_path}/register">{{tx("register:register")}}</a>
{{{ end }}}
{{{ if osw_logins }}}
<button class="btn btn-outline-light text-body" id="ap-register-handle-btn" type="button">
- <i class="fa fa-share-alt"></i> [[login:manage-social-web-handles]]
+ <i class="fa fa-share-alt"></i> {{tx("login:manage-social-web-handles")}}
</button>
{{{ end }}}
</form>
@@ -73,7 +73,7 @@
{{{ if alternate_logins }}}
<div class="col-12 col-md-5 col-lg-3 px-md-0">
<div class="alt-login-block d-flex flex-column gap-2">
- <label>[[login:alternative-logins]]</label>
+ <label>{{tx("login:alternative-logins")}}</label>
<ul class="alt-logins list-unstyled">
{{{ each authentication }}}
<li class="{./name} mb-2">
diff --git a/src/views/modals/change-owner.tpl b/src/views/modals/change-owner.tpl
index 40e0ffa5e5..a0f5348859 100644
--- a/src/views/modals/change-owner.tpl
+++ b/src/views/modals/change-owner.tpl
@@ -1,11 +1,11 @@
<div class="card tool-modal shadow">
- <h5 class="card-header">[[topic:thread-tools.change-owner]]</h5>
+ <h5 class="card-header">{{tx("topic:thread-tools.change-owner")}}</h5>
<div class="card-body">
<p>
- [[topic:change-owner-instruction]]
+ {{tx("topic:change-owner-instruction")}}
</p>
<div class="mb-3">
- <label class="form-label" for="username"><strong>[[user:username]]</strong></label>
+ <label class="form-label" for="username"><strong>{{tx("user:username")}}</strong></label>
<div class="input-group">
<input id="username" type="text" class="form-control">
<span class="input-group-text" type="button">
@@ -18,7 +18,7 @@
</p>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="change_owner_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="change_owner_commit" disabled>[[topic:change-owner]]</button>
+ <button class="btn btn-link btn-sm" id="change_owner_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="change_owner_commit" disabled>{{tx("topic:change-owner")}}</button>
</div>
</div>
diff --git a/src/views/modals/change-picture.tpl b/src/views/modals/change-picture.tpl
index b24e23863c..2be534a923 100644
--- a/src/views/modals/change-picture.tpl
+++ b/src/views/modals/change-picture.tpl
@@ -18,7 +18,7 @@
</div>
<div class="col-12 col-sm-4 col-md-6">
<div class="d-flex flex-column gap-2">
- <h5>[[user:avatar-background-colour]]</h5>
+ <h5>{{tx("user:avatar-background-colour")}}</h5>
<div class="d-flex gap-2 flex-wrap">
<a href="#" class="lh-1 p-1" data-bg-color="transparent"><i class="fa-solid fa-2x fa-ban text-secondary fa-width-auto"></i></a>
{{{ each iconBackgrounds }}}
@@ -28,11 +28,11 @@
<hr/>
{{{ if allowProfileImageUploads }}}
<button type="button" class="btn btn-ghost border" data-action="upload">
- [[user:upload-new-picture]]
+ {{tx("user:upload-new-picture")}}
</button>
{{{ end }}}
<button type="button" class="btn btn-ghost border" data-action="upload-url">
- [[user:upload-new-picture-from-url]]
+ {{tx("user:upload-new-picture-from-url")}}
</button>
</div>
</div>
diff --git a/src/views/modals/create-room.tpl b/src/views/modals/create-room.tpl
index 81bb695a76..446036f5ae 100644
--- a/src/views/modals/create-room.tpl
+++ b/src/views/modals/create-room.tpl
@@ -1,16 +1,16 @@
<div class="mb-3">
<div class="mb-3">
- <label class="form-label text-nowrap">[[modules:chat.room-name-optional]]</label>
+ <label class="form-label text-nowrap">{{tx("modules:chat.room-name-optional")}}</label>
<input component="chat/room/name" class="form-control" />
</div>
<div class="mb-3">
<div class="dropdown">
- <label class="form-label">[[modules:chat.add-user]]</label>
- <input component="chat/search" class="form-control" type="text" placeholder="[[global:user-search-prompt]]" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"/>
+ <label class="form-label">{{tx("modules:chat.add-user")}}</label>
+ <input component="chat/search" class="form-control" type="text" placeholder="{{tx("global:user-search-prompt")}}" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"/>
<ul component="chat/search/list" class="dropdown-menu p-1 overflow-auto" style="max-height: 400px;" role="menu">
- <li component="chat/search/start-typing"><a href="#" class="dropdown-item rounded-1" role="menuitem">[[admin/menu:search.start-typing]]</a></li>
- <li component="chat/search/no-users" class="hidden"><a href="#" class="dropdown-item rounded-1" role="menuitem">[[users:no-users-found]]</a></li>
+ <li component="chat/search/start-typing"><a href="#" class="dropdown-item rounded-1" role="menuitem">{{tx("admin/menu:search.start-typing")}}</a></li>
+ <li component="chat/search/no-users" class="hidden"><a href="#" class="dropdown-item rounded-1" role="menuitem">{{tx("users:no-users-found")}}</a></li>
{{{ each searchUsers }}}
<li component="chat/search/user" data-uid="{./uid}"><a href="#" class="dropdown-item rounded-1" role="menuitem">{{buildAvatar(@value, "24px", true)}} {./username}</a></li>
{{{ end }}}
@@ -28,8 +28,8 @@
{{{ if user.isAdmin }}}
<select component="chat/room/type" class="form-select mb-3">
- <option value="private">[[modules:chat.private.option]]</option>
- <option value="public">[[modules:chat.public.option]]</option>
+ <option value="private">{{tx("modules:chat.private.option")}}</option>
+ <option value="public">{{tx("modules:chat.public.option")}}</option>
</select>
<div component="chat/room/public/options" class="hidden">
@@ -39,7 +39,7 @@
{{{ end }}}
</select>
<p class="form-text">
- [[modules:chat.public.groups-help]]
+ {{tx("modules:chat.public.groups-help")}}
</p>
</div>
{{{ end }}}
diff --git a/src/views/modals/crop_picture.tpl b/src/views/modals/crop_picture.tpl
index 169791aab9..5c46068964 100644
--- a/src/views/modals/crop_picture.tpl
+++ b/src/views/modals/crop_picture.tpl
@@ -2,8 +2,8 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
- <h3 id="crop-picture">[[user:crop-picture]]</h3>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="[[global:buttons.close]]"></button>
+ <h3 id="crop-picture">{{tx("user:crop-picture")}}</h3>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{tx("global:buttons.close")}}"></button>
</div>
<div class="modal-body">
<div id="upload-progress-box" class="progress hide">
@@ -30,9 +30,9 @@
</div>
</div>
<div class="modal-footer">
- <button class="btn btn-outline-secondary" data-bs-dismiss="modal">[[global:close]]</button>
- <button class="btn btn-primary upload-btn {{{ if !allowSkippingCrop }}}hidden{{{ end }}}">[[user:upload-picture]]</button>
- <button class="btn btn-primary crop-btn">[[user:upload-cropped-picture]]</button>
+ <button class="btn btn-outline-secondary" data-bs-dismiss="modal">{{tx("global:close")}}</button>
+ <button class="btn btn-primary upload-btn {{{ if !allowSkippingCrop }}}hidden{{{ end }}}">{{tx("user:upload-picture")}}</button>
+ <button class="btn btn-primary crop-btn">{{tx("user:upload-cropped-picture")}}</button>
</div>
</div>
</div>
diff --git a/src/views/modals/crosspost-topic.tpl b/src/views/modals/crosspost-topic.tpl
index 8574a85795..93772ddcf2 100644
--- a/src/views/modals/crosspost-topic.tpl
+++ b/src/views/modals/crosspost-topic.tpl
@@ -1,16 +1,16 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:crosspost-topic]]
+ {{tx("topic:crosspost-topic")}}
</h5>
<div class="card-body">
<p>
- [[topic:crossposts.instructions]]
+ {{tx("topic:crossposts.instructions")}}
</p>
<!-- IMPORT partials/category/filter-dropdown-right.tpl -->
</div>
<div class="card-footer text-end">
<i class="fa me-2" id="crosspost_topic_spinner"></i>
- <button type="button" class="btn btn-sm btn-outline-secondary" id="crosspost_topic_cancel">[[global:buttons.close]]</button>
- <button type="button" class="btn btn-sm btn-primary" id="crosspost_thread_commit" disabled>[[topic:confirm-crosspost]]</button>
+ <button type="button" class="btn btn-sm btn-outline-secondary" id="crosspost_topic_cancel">{{tx("global:buttons.close")}}</button>
+ <button type="button" class="btn btn-sm btn-primary" id="crosspost_thread_commit" disabled>{{tx("topic:confirm-crosspost")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/crossposts.tpl b/src/views/modals/crossposts.tpl
index ab796e96bd..940645e4c1 100644
--- a/src/views/modals/crossposts.tpl
+++ b/src/views/modals/crossposts.tpl
@@ -1,10 +1,10 @@
<div class="mb-3">
{{{ if crossposts.length }}}
- <p>[[topic:crossposts.listing]]</p>
+ <p>{{tx("topic:crossposts.listing")}}</p>
{{{ each crossposts }}}
{{buildCategoryLabel(./category, "a", "border")}}
{{{ end }}}
{{{ else }}}
- <p>[[topic:crossposts.none]]</p>
+ <p>{{tx("topic:crossposts.none")}}</p>
{{{ end }}}
</div>
diff --git a/src/views/modals/delete-posts.tpl b/src/views/modals/delete-posts.tpl
index 8650e98257..807da76925 100644
--- a/src/views/modals/delete-posts.tpl
+++ b/src/views/modals/delete-posts.tpl
@@ -1,16 +1,16 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:thread-tools.delete-posts]]
+ {{tx("topic:thread-tools.delete-posts")}}
</h5>
<div class="card-body">
<p>
- [[topic:delete-posts-instruction]]
+ {{tx("topic:delete-posts-instruction")}}
</p>
<p><strong><span id="pids"></span></strong></p>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="delete_posts_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="delete_posts_confirm" disabled>[[topic:delete]]</button>
- <button class="btn btn-danger btn-sm" id="purge_posts_confirm" disabled>[[topic:purge]]</button>
+ <button class="btn btn-link btn-sm" id="delete_posts_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="delete_posts_confirm" disabled>{{tx("topic:delete")}}</button>
+ <button class="btn btn-danger btn-sm" id="purge_posts_confirm" disabled>{{tx("topic:purge")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/first-run.tpl b/src/views/modals/first-run.tpl
index a26940b214..de797de523 100644
--- a/src/views/modals/first-run.tpl
+++ b/src/views/modals/first-run.tpl
@@ -1,4 +1,4 @@
<div class="text-center">
- <p>[[category:first-run.description]]</p>
- <p>[[category:first-run.admin-panel]] <i class="fa-solid fa-gears"></i> [[category:first-run.admin-panel-desc]]</p>
+ <p>{{tx("category:first-run.description")}}</p>
+ <p>{{tx("category:first-run.admin-panel")}} <i class="fa-solid fa-gears"></i> {{tx("category:first-run.admin-panel-desc")}}</p>
</div>
diff --git a/src/views/modals/flag.tpl b/src/views/modals/flag.tpl
index 973e09f6f4..a10c0ed0a0 100644
--- a/src/views/modals/flag.tpl
+++ b/src/views/modals/flag.tpl
@@ -1,49 +1,49 @@
-<div class="modal" tabindex="-1" role="dialog" aria-label="[[flags:modal-title]]">
+<div class="modal" tabindex="-1" role="dialog" aria-label="{{tx("flags:modal-title")}}">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title">[[flags:modal-title]]</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="[[global:buttons.close]]"></button>
+ <h5 class="modal-title">{{tx("flags:modal-title")}}</h5>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{tx("global:buttons.close")}}"></button>
</div>
<div class="modal-body">
<p class="lead">
- [[flags:modal-body, {type}, {id}]]
+ {{tx("flags:modal-body", type, id)}}
</p>
<div>
<div class="radio mb-2">
<label for="flag-reason-spam">
- <input type="radio" name="flag-reason" id="flag-reason-spam" value="[[flags:modal-reason-spam]]">
- [[flags:modal-reason-spam]]
+ <input type="radio" name="flag-reason" id="flag-reason-spam" value="{{tx("flags:modal-reason-spam")}}">
+ {{tx("flags:modal-reason-spam")}}
</label>
</div>
<div class="radio mb-2">
<label for="flag-reason-offensive">
- <input type="radio" name="flag-reason" id="flag-reason-offensive" value="[[flags:modal-reason-offensive]]">
- [[flags:modal-reason-offensive]]
+ <input type="radio" name="flag-reason" id="flag-reason-offensive" value="{{tx("flags:modal-reason-offensive")}}">
+ {{tx("flags:modal-reason-offensive")}}
</label>
</div>
<div class="radio mb-2">
<label for="flag-reason-other">
- <input type="radio" name="flag-reason" id="flag-reason-other" value="[[flags:modal-reason-other]]">
- [[flags:modal-reason-other]]
+ <input type="radio" name="flag-reason" id="flag-reason-other" value="{{tx("flags:modal-reason-other")}}">
+ {{tx("flags:modal-reason-other")}}
</label>
</div>
</div>
<div class="mb-2">
- <textarea class="form-control" id="flag-reason-custom" placeholder="[[flags:modal-reason-custom]]" disabled="disabled"></textarea>
+ <textarea class="form-control" id="flag-reason-custom" placeholder="{{tx("flags:modal-reason-custom")}}" disabled="disabled"></textarea>
</div>
{{{ if remote }}}
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" name="flag-notify-remote" checked="checked">
<label class="form-check-label text-sm" for="flag-notify-remote">
- [[flags:modal-notify-remote, {remote}]]
+ {{tx("flags:modal-notify-remote", remote)}}
</label>
</div>
{{{ end }}}
- <button type="button" class="btn btn-primary" id="flag-post-commit" disabled>[[flags:modal-submit]]</button>
+ <button type="button" class="btn btn-primary" id="flag-post-commit" disabled>{{tx("flags:modal-submit")}}</button>
</div>
</div>
</div>
diff --git a/src/views/modals/fork-topic.tpl b/src/views/modals/fork-topic.tpl
index 88e4bff9c1..15748c1275 100644
--- a/src/views/modals/fork-topic.tpl
+++ b/src/views/modals/fork-topic.tpl
@@ -1,17 +1,17 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:fork-topic]]
+ {{tx("topic:fork-topic")}}
</h5>
<div class="card-body">
<p>
- [[topic:fork-topic-instruction]]
+ {{tx("topic:fork-topic-instruction")}}
</p>
<div class="mb-3">
- <label class="form-label" for="fork-title"><strong>[[topic:title]]</strong></label>
- <input id="fork-title" type="text" class="form-control" placeholder="[[topic:enter-new-topic-title]]">
+ <label class="form-label" for="fork-title"><strong>{{tx("topic:title")}}</strong></label>
+ <input id="fork-title" type="text" class="form-control" placeholder="{{tx("topic:enter-new-topic-title")}}">
</div>
<div class="mb-3">
- <label class="form-label"><strong>[[category:category]]</strong></label>
+ <label class="form-label"><strong>{{tx("category:category")}}</strong></label>
<div>
<!-- IMPORT partials/category/selector-dropdown-right.tpl -->
</div>
@@ -19,7 +19,7 @@
<strong id="fork-pids"></strong>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="fork_thread_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="fork_thread_commit" disabled>[[topic:fork-topic]]</button>
+ <button class="btn btn-link btn-sm" id="fork_thread_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="fork_thread_commit" disabled>{{tx("topic:fork-topic")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/intents/register.tpl b/src/views/modals/intents/register.tpl
index 1c8b6742c5..61380a0b11 100644
--- a/src/views/modals/intents/register.tpl
+++ b/src/views/modals/intents/register.tpl
@@ -3,24 +3,24 @@
<form id="intents-register-form" class="mt-3">
<div class="mb-3">
- <label class="form-label" for="intents-handle-input">[[intents:handle-label]]</label>
+ <label class="form-label" for="intents-handle-input">{{tx("intents:handle-label")}}</label>
<input
id="intents-handle-input"
type="text"
class="form-control"
- placeholder="[[intents:handle-placeholder]]"
+ placeholder="{{tx("intents:handle-placeholder")}}"
autocomplete="off"
/>
</div>
<button type="submit" class="btn btn-primary" id="intents-register-btn" disabled>
- [[intents:register-button]]
+ {{tx("intents:register-button")}}
</button>
</form>
<hr />
- <h6 class="mt-3">[[intents:registered-handles]]</h6>
+ <h6 class="mt-3">{{tx("intents:registered-handles")}}</h6>
<ul class="list-group list-group-flush" id="intents-registered-list">
{{{ each handles }}}
<li class="list-group-item d-flex justify-content-between align-items-center">
@@ -36,6 +36,6 @@
</ul>
{{{ if (!handles || !handles.length) }}}
- <p class="text-muted mt-3">[[intents:no-handles]]</p>
+ <p class="text-muted mt-3">{{tx("intents:no-handles")}}</p>
{{{ end }}}
</div>
diff --git a/src/views/modals/intents/trigger.tpl b/src/views/modals/intents/trigger.tpl
index de88f009f2..53410c336e 100644
--- a/src/views/modals/intents/trigger.tpl
+++ b/src/views/modals/intents/trigger.tpl
@@ -1,15 +1,15 @@
<div class="modal-intents-trigger">
<button type="button" class="btn btn-primary text-capitalize w-100" data-action="go-login">
- <i class="fa fa-sign-in-alt"></i> [[globals:login]]
+ <i class="fa fa-sign-in-alt"></i> {{tx("global:login")}}
</button>
<hr />
- <p>[[intents:trigger-description]]</p>
+ <p>{{tx("intents:trigger-description")}}</p>
{{{ if (matchingHandles && matchingHandles.length) }}}
<hr />
- <h6 class="mt-3">[[intents:trigger-your-handles]]</h6>
+ <h6 class="mt-3">{{tx("intents:trigger-your-handles")}}</h6>
<ul class="list-group list-group-flush" id="intents-trigger-list">
{{{ each matchingHandles }}}
<li class="list-group-item d-flex justify-content-between align-items-center">
@@ -18,7 +18,7 @@
{{{ if ./intents }}}<small class="text-muted ms-2">({./intents})</small>{{{ end }}}
</div>
<button type="button" class="btn btn-sm btn-outline-primary" data-action="execute-intent" data-handle="{./handle}">
- <i class="fa fa-check"></i> [[intents:trigger-yes]]
+ <i class="fa fa-check"></i> {{tx("intents:trigger-yes")}}
</button>
</li>
{{{ end }}}
@@ -27,13 +27,13 @@
{{{ if (hasAnyHandles && (!matchingHandles || !matchingHandles.length)) }}}
<hr />
- <p class="text-muted mt-3 text-sm">[[intents:trigger-no-matching]]</p>
+ <p class="text-muted mt-3 text-sm">{{tx("intents:trigger-no-matching")}}</p>
{{{ end }}}
<hr />
<div class="d-flex gap-2 mt-3">
<button type="button" class="btn btn-link" data-action="open-register">
- <i class="fa fa-share-alt"></i> [[login:manage-social-web-handles]]
+ <i class="fa fa-share-alt"></i> {{tx("login:manage-social-web-handles")}}
</button>
</div>
</div>
diff --git a/src/views/modals/invite.tpl b/src/views/modals/invite.tpl
index 5b35cba696..b60fd73c9b 100644
--- a/src/views/modals/invite.tpl
+++ b/src/views/modals/invite.tpl
@@ -1,9 +1,9 @@
<div class="mb-3">
- <label class="form-label" for="invite-modal-emails">[[users:prompt-email]]</label>
+ <label class="form-label" for="invite-modal-emails">{{tx("users:prompt-email")}}</label>
<input id="invite-modal-emails" type="text" class="form-control" placeholder="[email protected],[email protected]" />
</div>
<div class="">
- <label class="form-label" for="invite-modal-groups">[[users:groups-to-join]]</label>
+ <label class="form-label" for="invite-modal-groups">{{tx("users:groups-to-join")}}</label>
<select id="invite-modal-groups" class="form-control" multiple size="5">
{{{ each groups }}}
<option value="{@value}">{@value}</option>
diff --git a/src/views/modals/manage-editors.tpl b/src/views/modals/manage-editors.tpl
index 476bfd595e..66af94fca9 100644
--- a/src/views/modals/manage-editors.tpl
+++ b/src/views/modals/manage-editors.tpl
@@ -1,11 +1,11 @@
<div class="card tool-modal shadow">
- <h5 class="card-header">[[topic:thread-tools.manage-editors]]</h5>
+ <h5 class="card-header">{{tx("topic:thread-tools.manage-editors")}}</h5>
<div class="card-body">
<p>
- [[topic:manage-editors-instruction]]
+ {{tx("topic:manage-editors-instruction")}}
</p>
<div class="mb-3">
- <label class="form-label" for="username"><strong>[[user:username]]</strong></label>
+ <label class="form-label" for="username"><strong>{{tx("user:username")}}</strong></label>
<div class="input-group">
<input id="username" type="text" class="form-control" name="username">
<span class="input-group-text" type="button">
@@ -26,7 +26,7 @@
</div>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="manage_editors_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="manage_editors_commit">[[global:save]]</button>
+ <button class="btn btn-link btn-sm" id="manage_editors_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="manage_editors_commit">{{tx("global:save")}}</button>
</div>
</div>
diff --git a/src/views/modals/manage-room.tpl b/src/views/modals/manage-room.tpl
index 55f9390de7..eec3539ce4 100644
--- a/src/views/modals/manage-room.tpl
+++ b/src/views/modals/manage-room.tpl
@@ -1,15 +1,15 @@
<div class="">
{{{ if user.isAdmin }}}
<div class="d-flex gap-2 mb-3 align-items-center gap-2">
- <label class="form-label text-nowrap mb-0">[[modules:chat.default-notification-setting]]</label>
+ <label class="form-label text-nowrap mb-0">{{tx("modules:chat.default-notification-setting")}}</label>
<select component="chat/room/notification/setting" class="form-select" style="width: 200px;">
- <option value="1" {{{ if (room.notificationSetting == "1") }}}selected{{{ end }}}>[[modules:chat.notification-setting-none]]</option>
- <option value="2" {{{ if (room.notificationSetting == "2") }}}selected{{{ end }}}>[[modules:chat.notification-setting-at-mention-only]]</option>
- <option value="3" {{{ if (room.notificationSetting == "3") }}}selected{{{ end }}}>[[modules:chat.notification-setting-all-messages]]</option>
+ <option value="1" {{{ if (room.notificationSetting == "1") }}}selected{{{ end }}}>{{tx("modules:chat.notification-setting-none")}}</option>
+ <option value="2" {{{ if (room.notificationSetting == "2") }}}selected{{{ end }}}>{{tx("modules:chat.notification-setting-at-mention-only")}}</option>
+ <option value="3" {{{ if (room.notificationSetting == "3") }}}selected{{{ end }}}>{{tx("modules:chat.notification-setting-all-messages")}}</option>
</select>
</div>
<div class="mb-3 d-flex gap-2 align-items-center">
- <label class="form-label">[[modules:chat.join-leave-messages]]</label>
+ <label class="form-label">{{tx("modules:chat.join-leave-messages")}}</label>
<div class="form-check form-switch">
<input component="chat/room/join-leave-messages" class="form-check-input" type="checkbox" {{{ if room.joinLeaveMessages }}}checked{{{ end }}} />
</div>
@@ -17,24 +17,24 @@
<hr/>
{{{ end }}}
- <label class="form-label">[[modules:chat.add-user]]</label>
- <input component="chat/manage/user/add/search" class="form-control" type="text" placeholder="[[global:user-search-prompt]]" />
+ <label class="form-label">{{tx("modules:chat.add-user")}}</label>
+ <input component="chat/manage/user/add/search" class="form-control" type="text" placeholder="{{tx("global:user-search-prompt")}}" />
<p class="text-danger"></p>
- <p class="form-text">[[modules:chat.add-user-help]]</p>
+ <p class="form-text">{{tx("modules:chat.add-user-help")}}</p>
<hr />
<div class="row">
<div class="col-12 {{{ if (user.isAdmin && room.public) }}}col-md-6{{{ end }}}">
- <label class="form-label">[[global:users]]</label>
- <input component="chat/manage/user/list/search" class="form-control mb-1" type="text" placeholder="[[global:user-search-prompt]]" />
+ <label class="form-label">{{tx("global:users")}}</label>
+ <input component="chat/manage/user/list/search" class="form-control mb-1" type="text" placeholder="{{tx("global:user-search-prompt")}}" />
<ul component="chat/manage/user/list" class="list-group overflow-auto" style="max-height: 300px;">
- <li class="list-group-item"><i class="fa fa-spinner fa-spin"></i> [[modules:chat.retrieving-users]]</li>
+ <li class="list-group-item"><i class="fa fa-spinner fa-spin"></i> {{tx("modules:chat.retrieving-users")}}</li>
</ul>
</div>
{{{ if (user.isAdmin && room.public) }}}
<div class="col-12 col-md-6 d-flex flex-column">
- <label class="form-label">[[modules:chat.select-groups]]</label>
+ <label class="form-label">{{tx("modules:chat.select-groups")}}</label>
<select component="chat/room/groups" class="form-select flex-fill" multiple>
{{{ each groups }}}
<option value="{./displayName}" {{{ if ./selected }}}selected{{{ end }}}>{./displayName}</option>
@@ -46,7 +46,7 @@
{{{ if user.isAdmin }}}
<hr/>
<div class="d-flex justify-content-end">
- <button component="chat/manage/save" class="btn btn-sm btn-primary">[[global:save]]</button>
+ <button component="chat/manage/save" class="btn btn-sm btn-primary">{{tx("global:save")}}</button>
</div>
{{{ end }}}
</div>
\ No newline at end of file
diff --git a/src/views/modals/merge-topic.tpl b/src/views/modals/merge-topic.tpl
index d95cd89464..b5699567b9 100644
--- a/src/views/modals/merge-topic.tpl
+++ b/src/views/modals/merge-topic.tpl
@@ -1,9 +1,9 @@
<div class="tool-modal d-flex">
<div class="card shadow">
- <h5 class="card-header">[[topic:thread-tools.merge-topics]]</h5>
+ <h5 class="card-header">{{tx("topic:thread-tools.merge-topics")}}</h5>
<div class="card-body">
<p>
- [[topic:merge-topics-instruction]]
+ {{tx("topic:merge-topics-instruction")}}
</p>
<p>
<div class="input-group">
@@ -17,7 +17,7 @@
</div>
</p>
- <p><strong>[[topic:merge-topic-list-title]]</strong></p>
+ <p><strong>{{tx("topic:merge-topic-list-title")}}</strong></p>
<ul class="topics-section">
{{{ each topics }}}
<li class="mb-1">
@@ -29,21 +29,21 @@
{{{ end }}}
</ul>
<p>
- <strong>[[topic:merge-options]]</strong>
+ <strong>{{tx("topic:merge-options")}}</strong>
</p>
<form>
<p>
- <input class="merge-main-topic-radio" type="radio" name="merge-topic-option" checked="true"> [[topic:merge-select-main-topic]]
+ <input class="merge-main-topic-radio" type="radio" name="merge-topic-option" checked="true"> {{tx("topic:merge-select-main-topic")}}
</p>
<p>
<select class="form-select merge-main-topic-select">
{{{ each topics }}}
- <option value="{topics.tid}">{topics.title}</option>
+ <option value="{./tid}">{./title}</option>
{{{ end }}}
</select>
</p>
<p>
- <input class="merge-new-title-radio" type="radio" name="merge-topic-option"> [[topic:merge-new-title-for-topic]]
+ <input class="merge-new-title-radio" type="radio" name="merge-topic-option"> {{tx("topic:merge-new-title-for-topic")}}
</p>
<p>
<input class="merge-new-title-input form-control" type="text">
@@ -51,8 +51,8 @@
</form>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="merge_topics_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="merge_topics_confirm" disabled>[[topic:thread-tools.merge]]</button>
+ <button class="btn btn-link btn-sm" id="merge_topics_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="merge_topics_confirm" disabled>{{tx("topic:thread-tools.merge")}}</button>
</div>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/move-post.tpl b/src/views/modals/move-post.tpl
index 5cb684335e..8c16ae32d1 100644
--- a/src/views/modals/move-post.tpl
+++ b/src/views/modals/move-post.tpl
@@ -1,13 +1,13 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:thread-tools.move-posts]]
+ {{tx("topic:thread-tools.move-posts")}}
</h5>
<div class="card-body">
<p>
- [[topic:move-posts-instruction]]
+ {{tx("topic:move-posts-instruction")}}
</p>
<div>
- <label class="form-label" for="topicId"><strong>[[topic:topic-id]]</strong></label>
+ <label class="form-label" for="topicId"><strong>{{tx("topic:topic-id")}}</strong></label>
<input id="topicId" type="text" class="form-control"><br/>
</div>
<p>
@@ -15,7 +15,7 @@
</p>
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="move_posts_cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="move_posts_confirm" disabled>[[topic:move]]</button>
+ <button class="btn btn-link btn-sm" id="move_posts_cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="move_posts_confirm" disabled>{{tx("topic:move")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/move-topic.tpl b/src/views/modals/move-topic.tpl
index 29a41416d7..02585f809f 100644
--- a/src/views/modals/move-topic.tpl
+++ b/src/views/modals/move-topic.tpl
@@ -1,15 +1,15 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:move-topic]]
+ {{tx("topic:move-topic")}}
</h5>
<div class="card-body">
<p>
- [[topic:move-topic-instruction]]
+ {{tx("topic:move-topic-instruction")}}
</p>
<!-- IMPORT partials/category/selector-dropdown-right.tpl -->
</div>
<div class="card-footer text-end">
- <button type="button" class="btn btn-sm btn-outline-secondary" id="move_topic_cancel">[[global:buttons.close]]</button>
- <button type="button" class="btn btn-sm btn-primary" id="move_thread_commit" disabled>[[topic:confirm-move]]</button>
+ <button type="button" class="btn btn-sm btn-outline-secondary" id="move_topic_cancel">{{tx("global:buttons.close")}}</button>
+ <button type="button" class="btn btn-sm btn-primary" id="move_thread_commit" disabled>{{tx("topic:confirm-move")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/post-history.tpl b/src/views/modals/post-history.tpl
index 433d015e41..352273efa9 100644
--- a/src/views/modals/post-history.tpl
+++ b/src/views/modals/post-history.tpl
@@ -1,8 +1,8 @@
<p class="number-of-diffs">
{{{ if numDiffs }}}
- [[topic:diffs.description, {numDiffs}]]
+ {{tx("topic:diffs.description", numDiffs)}}
{{{ else }}}
- [[topic:diffs.no-revisions-description, {numDiffs}]]
+ {{tx("topic:diffs.no-revisions-description", numDiffs)}}
{{{ end }}}
</p>
{{{ if numDiffs }}}
@@ -12,8 +12,8 @@
<option value="{../timestamp}">
{./pretty}
{{{ if ./username }}}[{./username}]{{{ end }}}
- {{{ if @first }}}([[topic:diffs.current-revision]]){{{ end }}}
- {{{ if @last }}}([[topic:diffs.original-revision]]){{{ end }}}
+ {{{ if @first }}}{{tx("topic:diffs.current-revision")}}{{{ end }}}
+ {{{ if @last }}}{{tx("topic:diffs.original-revision")}}{{{ end }}}
</option>
{{{ end }}}
</select>
@@ -23,14 +23,13 @@
<ul class="posts-list diffs list-unstyled"></ul>
{{{ if editable }}}
- <button class="btn btn-primary" data-action="restore">[[topic:diffs.restore]]</button>
+ <button class="btn btn-primary" data-action="restore">{{tx("topic:diffs.restore")}}</button>
{{{ end }}}
{{{ if deletable }}}
- <button class="btn btn-danger" data-action="delete">[[topic:diffs.delete]]</button>
+ <button class="btn btn-danger" data-action="delete">{{tx("topic:diffs.delete")}}</button>
{{{ end }}}
{{{ if editable }}}
- <p class="form-text">[[topic:diffs.restore-description]]</p>
+ <p class="form-text">{{tx("topic:diffs.restore-description")}}</p>
{{{ end }}}
-
</div>
{{{ end }}}
diff --git a/src/views/modals/rename-room.tpl b/src/views/modals/rename-room.tpl
index acafb24443..530f66189a 100644
--- a/src/views/modals/rename-room.tpl
+++ b/src/views/modals/rename-room.tpl
@@ -1,4 +1,4 @@
-<input type="text" class="form-control" id="roomName" placeholder="[[modules:chat.rename-placeholder]]" value="{roomName}" />
+<input type="text" class="form-control" id="roomName" placeholder="{{tx("modules:chat.rename-placeholder")}}" value="{roomName}" />
<p class="form-text">
- [[modules:chat.rename-help]]
+ {{tx("modules:chat.rename-help")}}
</p>
\ No newline at end of file
diff --git a/src/views/modals/set-pin-expiry.tpl b/src/views/modals/set-pin-expiry.tpl
index 75fb877cd2..4efe7a4bd9 100644
--- a/src/views/modals/set-pin-expiry.tpl
+++ b/src/views/modals/set-pin-expiry.tpl
@@ -1,8 +1,8 @@
<div class="form-group">
- <label class="form-label" for="expiry">[[topic:pin-modal-expiry]]</label>
+ <label class="form-label" for="expiry">{{tx("topic:pin-modal-expiry")}}</label>
<div class="d-flex gap-1">
<input id="expiry-date" type="date" class="form-control" />
<input id="expiry-time" type="time" class="form-control" />
</div>
- <p class="form-text">[[topic:pin-modal-help]]</p>
+ <p class="form-text">{{tx("topic:pin-modal-help")}}</p>
</div>
\ No newline at end of file
diff --git a/src/views/modals/tag-topic.tpl b/src/views/modals/tag-topic.tpl
index c632c7596b..d3efa8d4b8 100644
--- a/src/views/modals/tag-topic.tpl
+++ b/src/views/modals/tag-topic.tpl
@@ -1,11 +1,11 @@
<div class="card tool-modal shadow">
<h5 class="card-header">
- [[topic:thread-tools.tag]]
+ {{tx("topic:thread-tools.tag")}}
</h5>
<div class="card-body d-flex flex-column gap-2">
{{{ if tagWhitelist }}}
<div class="d-flex flex-column gap-1">
- <span>[[tags:tag-whitelist]]</span>
+ <span>{{tx("tags:tag-whitelist")}}</span>
<div>
{{{ each tagWhitelist }}}
<span class="badge bg-info">{@value}</span>
@@ -16,12 +16,12 @@
{{{ each topics }}}
<div class="mb-3">
<label class="form-label" for="fork-title"><strong>{./title}</strong></label>
- <input class="tags" type="text" placeholder="[[tags:enter-tags-here, {config.minimumTagLength}, {config.maximumTagLength}]]" />
+ <input class="tags" type="text" placeholder="{{tx("tags:enter-tags-here", config.minimumTagLength, config.maximumTagLength)}}" />
</div>
{{{ end }}}
</div>
<div class="card-footer text-end">
- <button class="btn btn-link btn-sm" id="tag-topic-cancel">[[global:buttons.close]]</button>
- <button class="btn btn-primary btn-sm" id="tag-topic-commit">[[global:save]]</button>
+ <button class="btn btn-link btn-sm" id="tag-topic-cancel">{{tx("global:buttons.close")}}</button>
+ <button class="btn btn-primary btn-sm" id="tag-topic-commit">{{tx("global:save")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/modals/temporary-ban.tpl b/src/views/modals/temporary-ban.tpl
index 68d4ab2250..d50dc8d52c 100644
--- a/src/views/modals/temporary-ban.tpl
+++ b/src/views/modals/temporary-ban.tpl
@@ -3,7 +3,7 @@
<div class="col-12">
<div class="mb-3">
<p class="form-text">
- [[admin/manage/users:temp-ban.explanation]]
+ {{tx("admin/manage/users:temp-ban.explanation")}}
</p>
</div>
</div>
@@ -11,12 +11,12 @@
<div class="row">
<div class="col-12">
<div class="mb-3">
- <label class="form-label" for="length">[[admin/manage/users:temp-ban.length]]</label>
+ <label class="form-label" for="length">{{tx("admin/manage/users:temp-ban.length")}}</label>
<div class="d-flex gap-1">
<input class="form-control" id="length" name="length" type="number" min="0" value="0" />
<select class="form-select" id="unit" name="unit">
- <option value="0">[[admin/manage/users:temp-ban.hours]]</option>
- <option value="1">[[admin/manage/users:temp-ban.days]]</option>
+ <option value="0">{{tx("admin/manage/users:temp-ban.hours")}}</option>
+ <option value="1">{{tx("admin/manage/users:temp-ban.days")}}</option>
</select>
</div>
</div>
diff --git a/src/views/modals/temporary-mute.tpl b/src/views/modals/temporary-mute.tpl
index 08b9127329..37aaf700c2 100644
--- a/src/views/modals/temporary-mute.tpl
+++ b/src/views/modals/temporary-mute.tpl
@@ -3,7 +3,7 @@
<div class="col-12">
<div class="mb-3">
<p class="form-text">
- [[admin/manage/users:temp-mute.explanation]]
+ {{tx("admin/manage/users:temp-mute.explanation")}}
</p>
</div>
</div>
@@ -11,12 +11,12 @@
<div class="row">
<div class="col-12">
<div class="mb-3">
- <label class="form-label" for="length">[[admin/manage/users:temp-ban.length]]</label>
+ <label class="form-label" for="length">{{tx("admin/manage/users:temp-ban.length")}}</label>
<div class="d-flex gap-1">
<input class="form-control" id="length" name="length" type="number" min="0" value="0" />
<select class="form-select" id="unit" name="unit">
- <option value="0">[[admin/manage/users:temp-ban.hours]]</option>
- <option value="1">[[admin/manage/users:temp-ban.days]]</option>
+ <option value="0">{{tx("admin/manage/users:temp-ban.hours")}}</option>
+ <option value="1">{{tx("admin/manage/users:temp-ban.days")}}</option>
</select>
</div>
</div>
diff --git a/src/views/modals/topic-thumbs.tpl b/src/views/modals/topic-thumbs.tpl
index d59f189be1..1fd8187072 100644
--- a/src/views/modals/topic-thumbs.tpl
+++ b/src/views/modals/topic-thumbs.tpl
@@ -1,6 +1,6 @@
<div class="topic-thumbs-modal">
{{{ if !thumbs.length }}}
- <div class="alert alert-info">[[modules:thumbs.modal.no-thumbs]]</div>
+ <div class="alert alert-info">{{tx("modules:thumbs.modal.no-thumbs")}}</div>
{{{ end }}}
{{{ each thumbs }}}
<div class="d-flex align-items-center mb-3" data-path="{@value}">
@@ -11,10 +11,10 @@
<p>
<code style="word-break: break-all;">{uploadBasename(@value)}</code>
</p>
- <button class="btn btn-danger btn-sm text-nowrap" data-action="remove"><i class="fa fa-times"></i> [[modules:thumbs.modal.remove]]</button>
+ <button class="btn btn-danger btn-sm text-nowrap" data-action="remove"><i class="fa fa-times"></i> {{tx("modules:thumbs.modal.remove")}}</button>
</div>
</div>
{{{ end }}}
<hr />
- <p class="form-text">[[modules:thumbs.modal.resize-note, {config.thumbs.size}]]</p>
+ <p class="form-text">{{tx("modules:thumbs.modal.resize-note", config.thumbs.size)}}</p>
</div>
\ No newline at end of file
diff --git a/src/views/modals/unban.tpl b/src/views/modals/unban.tpl
index 4a3ab69896..8ba57cd586 100644
--- a/src/views/modals/unban.tpl
+++ b/src/views/modals/unban.tpl
@@ -2,7 +2,7 @@
<div class="row">
<div class="col-12">
<div class="mb-3">
- <label class="form-label" for="reason">[[admin/manage/users:temp-ban.reason]]</label>
+ <label class="form-label" for="reason">{{tx("admin/manage/users:temp-ban.reason")}}</label>
<input type="text" class="form-control" id="reason" name="reason" />
</div>
</div>
diff --git a/src/views/modals/unmute.tpl b/src/views/modals/unmute.tpl
index 4a3ab69896..8ba57cd586 100644
--- a/src/views/modals/unmute.tpl
+++ b/src/views/modals/unmute.tpl
@@ -2,7 +2,7 @@
<div class="row">
<div class="col-12">
<div class="mb-3">
- <label class="form-label" for="reason">[[admin/manage/users:temp-ban.reason]]</label>
+ <label class="form-label" for="reason">{{tx("admin/manage/users:temp-ban.reason")}}</label>
<input type="text" class="form-control" id="reason" name="reason" />
</div>
</div>
diff --git a/src/views/modals/upload-file.tpl b/src/views/modals/upload-file.tpl
index ae7daa0f8b..e398d5caa5 100644
--- a/src/views/modals/upload-file.tpl
+++ b/src/views/modals/upload-file.tpl
@@ -3,7 +3,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{tx(title)}}</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="[[global:buttons.close]]"></button>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{tx("global:buttons.close")}}"></button>
</div>
<div class="modal-body">
<form class="mb-3" id="uploadForm" action="" method="post" enctype="multipart/form-data">
@@ -15,10 +15,10 @@
{{{ if showHelp }}}
<p class="form-text">
{{{ if accept }}}
- [[global:allowed-file-types, {accept}]]
+ {{tx("global:allowed-file-types", accept)}}
{{{ end }}}
- {{{ if fileSize }}}<span id="file-size-block">([[uploads:maximum-file-size, {fileSize}]])</span>{{{ end }}}
+ {{{ if fileSize }}}<span id="file-size-block">({{tx("uploads:maximum-file-size", fileSize)}})</span>{{{ end }}}
</p>
{{{ end }}}
</div>
@@ -27,7 +27,7 @@
<div id="upload-progress-box" class="progress progress-striped hide mb-3">
<div id="upload-progress-bar" class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0">
- <span class="visually-hidden"> [[success:success]]</span>
+ <span class="visually-hidden"> {{tx("success:success")}}</span>
</div>
</div>
@@ -36,7 +36,7 @@
<div id="alert-error" class="alert alert-danger hide"></div>
</div>
<div class="modal-footer">
- <button class="btn btn-outline-secondary" data-bs-dismiss="modal">[[global:close]]</button>
+ <button class="btn btn-outline-secondary" data-bs-dismiss="modal">{{tx("global:close")}}</button>
<button id="fileUploadSubmitBtn" class="btn btn-primary">{{tx(button)}}</button>
</div>
</div>
diff --git a/src/views/modals/upload-picture-from-url.tpl b/src/views/modals/upload-picture-from-url.tpl
index 5a7cd1c1b0..cbed47bff8 100644
--- a/src/views/modals/upload-picture-from-url.tpl
+++ b/src/views/modals/upload-picture-from-url.tpl
@@ -1,16 +1,16 @@
-<div id="upload-picture-from-url-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="upload-picture-url" aria-label="[[user:upload-picture]]">
+<div id="upload-picture-from-url-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="upload-picture-url" aria-label="{{tx("user:upload-picture")}}">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title" id="upload-picture-url">[[user:upload-picture]]</h5>
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="[[global:buttons.close]]"></button>
+ <h5 class="modal-title" id="upload-picture-url">{{tx("user:upload-picture")}}</h5>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{tx("global:buttons.close")}}"></button>
</div>
<div class="modal-body">
<input id="uploadFromUrl" class="form-control" type="text"/>
</div>
<div class="modal-footer">
- <button class="btn btn-outline-secondary" data-bs-dismiss="modal">[[global:close]]</button>
- <button class="btn btn-primary upload-btn">[[user:upload-picture]]</button>
+ <button class="btn btn-outline-secondary" data-bs-dismiss="modal">{{tx("global:close")}}</button>
+ <button class="btn btn-primary upload-btn">{{tx("user:upload-picture")}}</button>
</div>
</div>
</div>
diff --git a/src/views/modals/votes.tpl b/src/views/modals/votes.tpl
index 3ba516e42a..cb039c56a8 100644
--- a/src/views/modals/votes.tpl
+++ b/src/views/modals/votes.tpl
@@ -1,6 +1,6 @@
{{{ if showUpvotes }}}
<div class="mb-3">
- <h4>[[global:upvoters]] <small>({upvoteCount})</small></h4>
+ <h4>{{tx("global:upvoters")}} <small>({upvoteCount})</small></h4>
{{{ each upvoters }}}
<a class="text-decoration-none" href="{config.relative_path}/user/{./userslug}">{{buildAvatar(@value, "24px", true)}}</a>
{{{ end }}}
@@ -8,7 +8,7 @@
{{{ end }}}
{{{ if showDownvotes }}}
<div>
- <h4>[[global:downvoters]] <small>({downvoteCount})</small></h4>
+ <h4>{{tx("global:downvoters")}} <small>({downvoteCount})</small></h4>
{{{ each downvoters }}}
<a class="text-decoration-none" href="{config.relative_path}/user/{./userslug}">{{buildAvatar(@value, "24px", true)}}</a>
{{{ end }}}
diff --git a/src/views/outgoing.tpl b/src/views/outgoing.tpl
index 936c922c7c..40427cd15d 100644
--- a/src/views/outgoing.tpl
+++ b/src/views/outgoing.tpl
@@ -1,5 +1,5 @@
<div class="flex-fill">
- <h2 class="fw-semibold tracking-tight text-center">[[notifications:outgoing-link-message, {title}]]</h2>
+ <h2 class="fw-semibold tracking-tight text-center">{{tx("notifications:outgoing-link-message", title)}}</h2>
<div class="mx-auto">
<div class="d-flex flex-column gap-3 justify-content-center text-center">
@@ -11,7 +11,7 @@
<a href="{outgoing}" rel="nofollow noopener noreferrer" class="btn btn-primary text-break">
{{tx("notifications:continue-to", txEscape(outgoing))}}
</a>
- <a href="#" class="btn btn-link" onclick="history.back(); return false;">[[notifications:return-to, {title}]]</a>
+ <a href="#" class="btn btn-link" onclick="history.back(); return false;">{{tx("notifications:return-to", title)}}</a>
</div>
</div>
</div>
diff --git a/src/views/partials/acceptTos.tpl b/src/views/partials/acceptTos.tpl
index e2afd3ff3f..8ac0244d51 100644
--- a/src/views/partials/acceptTos.tpl
+++ b/src/views/partials/acceptTos.tpl
@@ -1,8 +1,8 @@
<div>
- <label class="form-label">[[register:terms-of-use]]</label>
+ <label class="form-label">{{tx("register:terms-of-use")}}</label>
<div class="tos">{{termsOfUse}}</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="agree-terms" id="agree-terms">
- <label class="form-check-label" for="agree-terms">[[register:agree-to-terms-of-use]]</label>
+ <label class="form-check-label" for="agree-terms">{{tx("register:agree-to-terms-of-use")}}</label>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/partials/category/selector-dropdown-content.tpl b/src/views/partials/category/selector-dropdown-content.tpl
index c5d1d709e6..8fc7cf7f3f 100644
--- a/src/views/partials/category/selector-dropdown-content.tpl
+++ b/src/views/partials/category/selector-dropdown-content.tpl
@@ -14,12 +14,12 @@
<div class="dropdown-menu p-1">
<div component="category-selector-search" class="p-1 hidden">
- <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">
+ <input type="text" class="form-control form-control-sm" placeholder="{{tx("search:type-to-search")}}" autocomplete="off">
<hr class="mt-2 mb-0"/>
</div>
<ul component="category/list" class="list-unstyled mb-0 text-sm category-dropdown-menu ghost-scrollbar" role="menu">
<li component="category/no-matches" role="presentation" class="category hidden">
- <a class="dropdown-item rounded-1" role="menuitem">[[search:no-matches]]</a>
+ <a class="dropdown-item rounded-1" role="menuitem">{{tx("search:no-matches")}}</a>
</li>
{{{ each categoryItems }}}
<li role="presentation" class="category {{{ if ./disabledClass }}}disabled {{{ end }}}" data-cid="{./cid}" data-name="{./name}" data-parent-cid="{./parentCid}">
diff --git a/src/views/partials/category/sort.tpl b/src/views/partials/category/sort.tpl
index b50e73b7f0..ce287407f3 100644
--- a/src/views/partials/category/sort.tpl
+++ b/src/views/partials/category/sort.tpl
@@ -1,5 +1,5 @@
<div class="dropdown bottom-sheet" component="thread/sort">
- <button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle h-100" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-label="[[aria:topic-sort-option, {sortOptionLabel}]]">
+ <button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle h-100" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false" aria-label="{{tx("aria:topic-sort-option", sortOptionLabel)}}">
<i class="fa fa-fw fa-arrow-down-wide-short text-primary"></i>
<span class="d-none d-md-inline fw-semibold">{{tx(sortOptionLabel)}}</span>
</button>
@@ -7,31 +7,31 @@
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="recently_replied" role="menuitem">
- <span class="flex-grow-1">[[topic:recently-replied]]</span>
+ <span class="flex-grow-1">{{tx("topic:recently-replied")}}</span>
<i class="flex-shrink-0 fa fa-fw text-secondary"></i>
</a>
</li>
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="recently_created" role="menuitem">
- <span class="flex-grow-1">[[topic:recently-created]]</span>
+ <span class="flex-grow-1">{{tx("topic:recently-created")}}</span>
<i class="flex-shrink-0 fa fa-fw text-secondary"></i>
</a>
</li>
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_posts" role="menuitem">
- <span class="flex-grow-1">[[topic:most-posts]]</span>
+ <span class="flex-grow-1">{{tx("topic:most-posts")}}</span>
<i class="flex-shrink-0 fa fa-fw text-secondary"></i>
</a>
</li>
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_votes" role="menuitem">
- <span class="flex-grow-1">[[topic:most-votes]]</span>
+ <span class="flex-grow-1">{{tx("topic:most-votes")}}</span>
<i class="flex-shrink-0 fa fa-fw text-secondary"></i>
</a>
</li>
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-sort="most_views" role="menuitem">
- <span class="flex-grow-1">[[topic:most-views]]</span>
+ <span class="flex-grow-1">{{tx("topic:most-views")}}</span>
<i class="flex-shrink-0 fa fa-fw text-secondary"></i>
</a>
</li>
diff --git a/src/views/partials/category/tools-dropdown-content.tpl b/src/views/partials/category/tools-dropdown-content.tpl
index 3dfa6bdabc..722e67f88b 100644
--- a/src/views/partials/category/tools-dropdown-content.tpl
+++ b/src/views/partials/category/tools-dropdown-content.tpl
@@ -1,33 +1,33 @@
<button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle h-100" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-gear text-primary"></i>
- <span class="visible-md-inline visible-lg-inline fw-semibold">[[topic:thread-tools.title]]</span>
+ <span class="visible-md-inline visible-lg-inline fw-semibold">{{tx("topic:thread-tools.title")}}</span>
<span component="topic/selected/badge" class="badge rounded-pill bg-secondary"></span>
</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li>
<a component="topic/mark-unread-for-all" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-inbox text-secondary"></i> [[topic:thread-tools.markAsUnreadForAll]]
+ <i class="fa fa-fw fa-inbox text-secondary"></i> {{tx("topic:thread-tools.markAsUnreadForAll")}}
</a>
</li>
<li>
<a component="topic/pin" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-thumb-tack text-secondary"></i> [[topic:thread-tools.pin]]
+ <i class="fa fa-fw fa-thumb-tack text-secondary"></i> {{tx("topic:thread-tools.pin")}}
</a>
</li>
<li>
<a component="topic/unpin" href="#" class="hidden dropdown-item rounded-1" role="menuitem">
- <i class="fa fa-fw fa-thumb-tack fa-rotate-90 text-secondary"></i> [[topic:thread-tools.unpin]]
+ <i class="fa fa-fw fa-thumb-tack fa-rotate-90 text-secondary"></i> {{tx("topic:thread-tools.unpin")}}
</a>
</li>
<li>
<a component="topic/lock" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-lock text-secondary"></i> [[topic:thread-tools.lock]]
+ <i class="fa fa-fw fa-lock text-secondary"></i> {{tx("topic:thread-tools.lock")}}
</a>
</li>
<li>
<a component="topic/unlock" href="#" class="hidden dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-unlock text-secondary"></i> [[topic:thread-tools.unlock]]
+ <i class="fa fa-fw fa-unlock text-secondary"></i> {{tx("topic:thread-tools.unlock")}}
</a>
</li>
@@ -35,25 +35,25 @@
<li>
<a component="topic/move" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-arrows text-secondary"></i> [[topic:thread-tools.move]]
+ <i class="fa fa-fw fa-arrows text-secondary"></i> {{tx("topic:thread-tools.move")}}
</a>
</li>
{{{if template.category}}}
<li>
<a component="topic/move-all" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-arrows text-secondary"></i> [[topic:thread-tools.move-all]]
+ <i class="fa fa-fw fa-arrows text-secondary"></i> {{tx("topic:thread-tools.move-all")}}
</a>
</li>
{{{end}}}
<li>
<a component="topic/merge" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-code-fork text-secondary"></i> [[topic:thread-tools.merge]]
+ <i class="fa fa-fw fa-code-fork text-secondary"></i> {{tx("topic:thread-tools.merge")}}
</a>
</li>
<li>
<a component="topic/tag" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-tag text-secondary"></i> [[topic:thread-tools.tag]]
+ <i class="fa fa-fw fa-tag text-secondary"></i> {{tx("topic:thread-tools.tag")}}
</a>
</li>
@@ -61,24 +61,24 @@
<li>
<a component="topic/delete" href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem">
- <i class="fa fa-fw fa-trash-o text-secondary"></i> [[topic:thread-tools.delete]]
+ <i class="fa fa-fw fa-trash-o text-secondary"></i> {{tx("topic:thread-tools.delete")}}
</a>
</li>
<li>
<a component="topic/restore" href="#" class="hidden dropdown-item rounded-1" role="menuitem">
- <i class="fa fa-fw fa-history text-secondary"></i> [[topic:thread-tools.restore]]
+ <i class="fa fa-fw fa-history text-secondary"></i> {{tx("topic:thread-tools.restore")}}
</a>
</li>
<li>
<a component="topic/purge" href="#" class="hidden dropdown-item rounded-1" role="menuitem">
- <i class="fa fa-fw fa-eraser text-secondary"></i> [[topic:thread-tools.purge]]
+ <i class="fa fa-fw fa-eraser text-secondary"></i> {{tx("topic:thread-tools.purge")}}
</a>
</li>
{{{ each thread_tools }}}
<li>
<a href="#" class="dropdown-item rounded-1 d-flex align-items-center gap-2 {./class}" role="menuitem">
- <i class="fa fa-fw {./icon} text-secondary"></i> {./title}
+ <i class="fa fa-fw {./icon} text-secondary"></i> {{tx("{./title}")}}
</a>
</li>
{{{ end }}}
diff --git a/src/views/partials/chats/composer.tpl b/src/views/partials/chats/composer.tpl
index 2cbba022a7..aed26ef950 100644
--- a/src/views/partials/chats/composer.tpl
+++ b/src/views/partials/chats/composer.tpl
@@ -4,16 +4,16 @@
</div>
<div class="w-100 flex-grow-1 flex-nowrap position-relative d-flex rounded-2 border border-secondary p-1 align-items-end">
{{{ if canUpload }}}
- <button component="chat/upload/button" class="btn btn-ghost btn-sm d-flex p-2" type="button" title="[[global:upload]]" data-bs-toggle="tooltip"><i class="fa fa-fw fa-upload"></i></button>
+ <button component="chat/upload/button" class="btn btn-ghost btn-sm d-flex p-2" type="button" title="{{tx("global:upload")}}" data-bs-toggle="tooltip"><i class="fa fa-fw fa-upload"></i></button>
{{{ end }}}
<div class="flex-grow-1 align-self-center">
- <textarea component="chat/input" placeholder="{{{ if roomName }}}{{tx("modules:chat.placeholder.message-room", txEscape(roomName))}}{{{ else }}}[[modules:chat.placeholder.mobile]]{{{ end }}}" class="bg-transparent text-body form-control chat-input mousetrap rounded-0 border-0 shadow-none px-1 py-0" style="min-height: 1.5rem;height:0;max-height:30vh;resize:none;"></textarea>
+ <textarea component="chat/input" placeholder="{{{ if roomName }}}{{tx("modules:chat.placeholder.message-room", txEscape(roomName))}}{{{ else }}}{{tx("modules:chat.placeholder.mobile")}}{{{ end }}}" class="bg-transparent text-body form-control chat-input mousetrap rounded-0 border-0 shadow-none px-1 py-0" style="min-height: 1.5rem;height:0;max-height:30vh;resize:none;"></textarea>
</div>
<div class="d-flex gap-1">
{{{ each composerActions }}}
- <button data-action="{./action}" class="btn btn-ghost btn-sm d-flex p-2 {./class}" type="button" title="{tx(./title)}" data-bs-toggle="tooltip"><i class="fa {./icon}"></i></button>
+ <button data-action="{./action}" class="btn btn-ghost btn-sm d-flex p-2 {./class}" type="button" title="{{tx(./title)}}" data-bs-toggle="tooltip"><i class="fa {./icon}"></i></button>
{{{ end }}}
- <button class="btn btn-ghost btn-sm d-flex p-2" type="button" data-action="send" title="[[modules:chat.send]]" data-bs-toggle="tooltip"><i class="fa fa-fw fa-paper-plane text-primary"></i></button>
+ <button class="btn btn-ghost btn-sm d-flex p-2" type="button" data-action="send" title="{{tx("modules:chat.send")}}" data-bs-toggle="tooltip"><i class="fa fa-fw fa-paper-plane text-primary"></i></button>
</div>
</div>
<div class="d-flex justify-content-between align-items-center text-xs w-100 px-2 mt-1">
diff --git a/src/views/partials/chats/dropdown.tpl b/src/views/partials/chats/dropdown.tpl
index 6524ee5dcb..6073b4f44a 100644
--- a/src/views/partials/chats/dropdown.tpl
+++ b/src/views/partials/chats/dropdown.tpl
@@ -1,7 +1,7 @@
{{{ if !rooms.length }}}
<li class="text-center p-4 d-flex flex-column">
<div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
- <div class="text-xs fw-semibold text-muted">[[modules:chat.no-active]]</div>
+ <div class="text-xs fw-semibold text-muted">{{tx("modules:chat.no-active")}}</div>
</li>
{{{ end }}}
diff --git a/src/views/partials/chats/edit-message.tpl b/src/views/partials/chats/edit-message.tpl
index d687eccf5a..b4210862bb 100644
--- a/src/views/partials/chats/edit-message.tpl
+++ b/src/views/partials/chats/edit-message.tpl
@@ -1,7 +1,7 @@
<div class="d-flex flex-column gap-1 mb-1">
<textarea class="form-control w-100" style="height:0; max-height: 30vh; resize: none;">{rawContent}</textarea>
<div class="align-self-end d-flex gap-2">
- <button class="btn btn-sm btn-outline-secondary" data-action="cancel">[[global:cancel]]</button>
- <button class="btn btn-sm btn-success" data-action="save">[[global:save]]</button>
+ <button class="btn btn-sm btn-outline-secondary" data-action="cancel">{{tx("global:cancel")}}</button>
+ <button class="btn btn-sm btn-success" data-action="save">{{tx("global:save")}}</button>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/partials/chats/manage-room-users.tpl b/src/views/partials/chats/manage-room-users.tpl
index 0841166d07..739d171b11 100644
--- a/src/views/partials/chats/manage-room-users.tpl
+++ b/src/views/partials/chats/manage-room-users.tpl
@@ -2,15 +2,15 @@
<li class="list-group-item d-flex align-items-center justify-content-between" data-uid="{./uid}" data-index="{./index}">
<div class="d-flex gap-1 align-items-center">
{{buildAvatar(users, "24px", true)}}
- <span>{./username} <i component="chat/manage/user/owner/icon" class="fa fa-star text-warning {{{ if !./isOwner }}}hidden{{{ end }}}" title="[[modules:chat.owner]]" data-bs-toggle="tooltip"></i></span>
+ <span>{./username} <i component="chat/manage/user/owner/icon" class="fa fa-star text-warning {{{ if !./isOwner }}}hidden{{{ end }}}" title="{{tx("modules:chat.owner")}}" data-bs-toggle="tooltip"></i></span>
</div>
<div class="d-flex gap-1">
{{{ if ./canToggleOwner }}}
- <button class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-action="toggleOwner" data-uid="{./uid}" title="[[modules:chat.grant-rescind-ownership]]"><i class="fa fa-star text-warning"></i></button>
+ <button class="btn btn-sm btn-light" data-bs-toggle="tooltip" data-action="toggleOwner" data-uid="{./uid}" title="{{tx("modules:chat.grant-rescind-ownership")}}"><i class="fa fa-star text-warning"></i></button>
{{{ end }}}
{{{ if ./canKick }}}
- <button class="btn btn-sm btn-light" data-action="kick" data-uid="{./uid}" data-bs-toggle="tooltip" title="[[modules:chat.kick]]"><i class="fa fa-ban text-danger"></i></button>
+ <button class="btn btn-sm btn-light" data-action="kick" data-uid="{./uid}" data-bs-toggle="tooltip" title="{{tx("modules:chat.kick")}}"><i class="fa fa-ban text-danger"></i></button>
{{{ end }}}
</div>
</li>
diff --git a/src/views/partials/chats/message-window.tpl b/src/views/partials/chats/message-window.tpl
index 493de163ea..efde8c32d8 100644
--- a/src/views/partials/chats/message-window.tpl
+++ b/src/views/partials/chats/message-window.tpl
@@ -9,7 +9,7 @@
{{{ if !roomId }}}
<div class="d-flex flex-column align-items-center gap-3 my-auto">
<i class="fa-solid fa-wind fs-2 text-muted"></i>
- <span class="text-muted text-sm">[[modules:chat.no-active]]</span>
+ <span class="text-muted text-sm">{{tx("modules:chat.no-active")}}</span>
</div>
{{{ else }}}
<div component="chat/header" class="d-flex align-items-center px-lg-3 gap-3">
@@ -41,7 +41,7 @@
<ul component="chat/message/search/results" class="chat-content p-0 m-0 list-unstyled overflow-auto flex-grow-1 hidden">
<div component="chat/message/search/no-results" class="text-center p-4 d-flex flex-column">
<div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
- <div class="text-xs fw-semibold text-muted">[[search:no-matches]]</div>
+ <div class="text-xs fw-semibold text-muted">{{tx("search:no-matches")}}</div>
</div>
</ul>
<!-- IMPORT partials/chats/composer.tpl -->
diff --git a/src/views/partials/chats/message.tpl b/src/views/partials/chats/message.tpl
index ab8175ec4a..88dd06d1f9 100644
--- a/src/views/partials/chats/message.tpl
+++ b/src/views/partials/chats/message.tpl
@@ -8,46 +8,46 @@
<a href="{config.relative_path}/user/{messages.fromUser.userslug}" class="text-decoration-none">{{buildAvatar(messages.fromUser, "18px", true, "not-responsive")}}</a>
<span class="chat-user fw-semibold"><a href="{config.relative_path}/user/{messages.fromUser.userslug}">{messages.fromUser.displayname}</a></span>
{{{ if messages.fromUser.banned }}}
- <span class="badge bg-danger">[[user:banned]]</span>
+ <span class="badge bg-danger">{{tx("user:banned")}}</span>
{{{ end }}}
{{{ if messages.fromUser.deleted }}}
- <span class="badge bg-danger">[[user:deleted]]</span>
+ <span class="badge bg-danger">{{tx("user:deleted")}}</span>
{{{ end }}}
<span class="chat-timestamp text-muted timeago" title="{messages.timestampISO}"></span>
- <div component="chat/message/edited" class="text-muted ms-auto {{{ if !messages.edited }}}hidden{{{ end }}}" title="[[global:edited-timestamp, {isoTimeToLocaleString(messages.editedISO, config.userLang)}]]"><i class="fa fa-edit"></i></span></div>
+ <div component="chat/message/edited" class="text-muted ms-auto {{{ if !messages.edited }}}hidden{{{ end }}}" title="{{tx("global:edited-timestamp", isoTimeToLocaleString(messages.editedISO, config.userLang))}}"><i class="fa fa-edit"></i></span></div>
</div>
<div class="message-body-wrapper">
<div component="chat/message/body" class="message-body ps-0 py-0 text-break mb-last-0 mb-3">
- {{{ if messages.txContent }}}{{tx(messages.content)}}{{{ else }}}{{txEscape(messages.content)}}{{{ end }}}
+ {{{ if messages.txContent }}}{{tx(messages.content)}}{{{ else }}}{{messages.content}}{{{ end }}}
</div>
<!-- IMPORT partials/chats/reactions.tpl -->
<div component="chat/message/controls" class="position-relative">
<div class="btn-group border shadow-sm controls position-absolute bg-body end-0" style="bottom:1rem;">
<!-- IMPORT partials/chats/add-reaction.tpl -->
- <button class="btn btn-sm btn-link" data-action="reply" title="[[topic:reply]]"><i class="fa fa-reply"></i></button>
+ <button class="btn btn-sm btn-link" data-action="reply" title="{{tx("topic:reply")}}"><i class="fa fa-reply"></i></button>
<div class="btn-group d-inline-block">
<button class="btn btn-sm btn-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-ellipsis" type="button"></i></button>
<ul class="dropdown-menu dropdown-menu-end p-1 text-sm list-unstyled" role="menu">
{{{ if (isAdminOrGlobalMod || (!config.disableChatMessageEditing && messages.self)) }}}
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="edit" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-pencil text-muted"></i> [[topic:edit]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="edit" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-pencil text-muted"></i> {{tx("topic:edit")}}</span></a>
</li>
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="delete" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-trash text-muted"></i> [[topic:delete]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="delete" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-trash text-muted"></i> {{tx("topic:delete")}}</span></a>
</li>
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="restore" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-repeat text-muted"></i> [[topic:restore]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="restore" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-repeat text-muted"></i> {{tx("topic:restore")}}</span></a>
</li>
{{{ end }}}
{{{ if (isAdminOrGlobalMod || isOwner )}}}
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="pin" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-thumbtack text-muted"></i> [[modules:chat.pin-message]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="pin" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-thumbtack text-muted"></i> {{tx("modules:chat.pin-message")}}</span></a>
</li>
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="unpin" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-thumbtack fa-rotate-90 text-muted"></i> [[modules:chat.unpin-message]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="unpin" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-thumbtack fa-rotate-90 text-muted"></i> {{tx("modules:chat.unpin-message")}}</span></a>
</li>
<li class="dropdown-divider"></li>
{{{ end }}}
@@ -55,18 +55,18 @@
{{{ if isAdminOrGlobalMod }}}
<li>
<a href="#" class="dropdown-item rounded-1 chat-ip-button" role="menuitem">
- <span class="d-inline-flex align-items-center gap-2 show"><i class="fa fa-fw fa-info-circle text-muted"></i> [[modules:chat.show-ip]]</span>
+ <span class="d-inline-flex align-items-center gap-2 show"><i class="fa fa-fw fa-info-circle text-muted"></i> {{tx("modules:chat.show-ip")}}</span>
<span class="d-inline-flex align-items-center gap-2 copy hidden"><i class="fa fa-fw fa-copy text-muted"></i> <span class="copy-ip-text"></span></span>
</a>
</li>
{{{ end }}}
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="copy-text" data-mid="{messages.mid}" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-copy text-muted"></i> [[modules:chat.copy-text]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="copy-text" data-mid="{messages.mid}" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-copy text-muted"></i> {{tx("modules:chat.copy-text")}}</span></a>
</li>
<li>
- <a href="#" class="dropdown-item rounded-1" data-action="copy-link" data-mid="{messages.mid}" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-link text-muted"></i> [[modules:chat.copy-link]]</span></a>
+ <a href="#" class="dropdown-item rounded-1" data-action="copy-link" data-mid="{messages.mid}" role="menuitem"><span class="d-inline-flex align-items-center gap-2"><i class="fa fa-fw fa-link text-muted"></i> {{tx("modules:chat.copy-link")}}</span></a>
</li>
</ul>
</div>
diff --git a/src/views/partials/chats/options.tpl b/src/views/partials/chats/options.tpl
index 8c0c8705be..64046918b5 100644
--- a/src/views/partials/chats/options.tpl
+++ b/src/views/partials/chats/options.tpl
@@ -1,10 +1,10 @@
<div class="d-flex gap-1 align-items-stretch">
<!-- search -->
- <button class="btn btn-ghost btn-sm" component="chat/room/search/toggle" data-manual-tooltip="1" title="[[global:header.search]]">
+ <button class="btn btn-ghost btn-sm" component="chat/room/search/toggle" data-manual-tooltip="1" title="{{tx("global:header.search")}}">
<i class="fa fa-search text-muted"></i>
</button>
<div component="chat/room/search/container" class="position-relative hidden align-self-center">
- <input component="chat/room/search" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" style="width: 150px;">
+ <input component="chat/room/search" class="form-control form-control-sm" placeholder="{{tx("search:type-to-search")}}" style="width: 150px;">
<a component="chat/room/search/clear" href="#" class="hidden px-2 py-1 position-absolute top-50 end-0 translate-middle-y">
<i class="fa fa-times text-muted opacity-75"></i>
</a>
@@ -12,7 +12,7 @@
<!-- notification dropdown -->
- <div class="dropdown d-flex" data-manual-tooltip="1" title="[[modules:chat.notification-settings]]" component="chat/notification/setting">
+ <div class="dropdown d-flex" data-manual-tooltip="1" title="{{tx("modules:chat.notification-settings")}}" component="chat/notification/setting">
<button class="btn btn-ghost btn-sm position-relative" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-bell text-muted"></i>
<span class="position-absolute top-0 end-0 text-xs text-muted opacity-50" style="font-size: 10px!important; padding: 1px; line-height: 10px;">
@@ -43,37 +43,37 @@
</div>
<!-- pinned messages -->
- <button component="chat/pinned/messages/btn" class="btn btn-ghost btn-sm d-none d-lg-block flex-nowrap" title="[[modules:chat.pinned-messages]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
+ <button component="chat/pinned/messages/btn" class="btn btn-ghost btn-sm d-none d-lg-block flex-nowrap" title="{{tx("modules:chat.pinned-messages")}}" data-bs-toggle="tooltip" data-bs-placement="bottom">
<i class="fa fa-thumb-tack text-muted"></i>
</button>
<!-- manage/options dropdown -->
- <div class="dropdown d-flex" data-manual-tooltip="1" title="[[modules:chat.options]]">
+ <div class="dropdown d-flex" data-manual-tooltip="1" title="{{tx("modules:chat.options")}}">
<button component="chat/controlsToggle" class="btn btn-ghost btn-sm" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-gear text-muted"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end p-1 text-sm" component="chat/controls" role="menu">
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-action="manage" role="menuitem">
- <i class="fa fa-fw text-muted fa-cog"></i> [[modules:chat.manage-room]]
+ <i class="fa fa-fw text-muted fa-cog"></i> {{tx("modules:chat.manage-room")}}
</a>
</li>
{{{ if isOwner }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-action="rename" role="menuitem">
- <i class="fa fa-fw text-muted fa-edit"></i> [[modules:chat.rename-room]]
+ <i class="fa fa-fw text-muted fa-edit"></i> {{tx("modules:chat.rename-room")}}
</a>
</li>
{{{ end }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-action="leave" role="menuitem">
- <i class="fa fa-fw text-muted fa-sign-out"></i> [[modules:chat.leave-room]]
+ <i class="fa fa-fw text-muted fa-sign-out"></i> {{tx("modules:chat.leave-room")}}
</a>
</li>
{{{ if (public && isAdmin) }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" href="#" data-action="delete" role="menuitem">
- <i class="fa fa-fw text-danger fa-trash"></i> [[modules:chat.delete-room]]
+ <i class="fa fa-fw text-danger fa-trash"></i> {{tx("modules:chat.delete-room")}}
</a>
</li>
{{{ end }}}
@@ -82,7 +82,7 @@
<!-- users toggle -->
{{{ if users.length }}}
- <div component="chat/user/list/btn" class="btn btn-ghost btn-sm d-none d-lg-flex flex-nowrap align-items-center gap-2" title="[[modules:chat.view-users-list]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
+ <div component="chat/user/list/btn" class="btn btn-ghost btn-sm d-none d-lg-flex flex-nowrap align-items-center gap-2" title="{{tx("modules:chat.view-users-list")}}" data-bs-toggle="tooltip" data-bs-placement="bottom">
<div class="d-flex text-nowrap">
{{{ if ./users.0 }}}
<span style="width: 18px; z-index: 3;" class="text-decoration-none" href="{config.relative_path}/user/{./users.0.userslug}">{{buildAvatar(./users.0, "24px", true)}}</span>
diff --git a/src/views/partials/chats/pinned-messages-list.tpl b/src/views/partials/chats/pinned-messages-list.tpl
index 9286a29a5b..3f9972e48d 100644
--- a/src/views/partials/chats/pinned-messages-list.tpl
+++ b/src/views/partials/chats/pinned-messages-list.tpl
@@ -10,7 +10,7 @@
<span class="chat-user fw-semibold"><a href="{config.relative_path}/user/{messages.fromUser.userslug}">{messages.fromUser.displayname}</a></span>
<span class="chat-timestamp text-muted timeago" title="{messages.timestampISO}"></span>
- <div component="chat/message/edited" class="text-muted ms-auto {{{ if !messages.edited }}}hidden{{{ end }}}" title="[[global:edited-timestamp, {isoTimeToLocaleString(messages.editedISO, config.userLang)}]]"><i class="fa fa-edit"></i></span></div>
+ <div component="chat/message/edited" class="text-muted ms-auto {{{ if !messages.edited }}}hidden{{{ end }}}" title="{{tx("global:edited-timestamp", isoTimeToLocaleString(messages.editedISO, config.userLang))}}"><i class="fa fa-edit"></i></span></div>
</div>
<div class="message-body-wrapper">
<div component="chat/message/body" class="message-body ps-0 py-0 overflow-auto text-break">
@@ -19,11 +19,11 @@
<div component="chat/message/controls" class="position-relative">
<div class="btn-group border shadow-sm controls position-absolute bg-body end-0" style="bottom:1rem;">
{{{ if (isAdminOrGlobalMod || (!config.disableChatMessageEditing && messages.self)) }}}
- <button class="btn btn-sm btn-link" data-action="edit" title="[[topic:edit]]"><i class="fa fa-pencil"></i></button>
+ <button class="btn btn-sm btn-link" data-action="edit" title="{{tx("topic:edit")}}"><i class="fa fa-pencil"></i></button>
{{{ end }}}
{{{ if (isAdminOrGlobalMod || isOwner )}}}
- <button class="btn btn-sm btn-link" data-action="pin" title="[[modules:chat.pin-message]]"><i class="fa fa-thumbtack"></i></button>
- <button class="btn btn-sm btn-link" data-action="unpin" title="[[modules:chat.unpin-message]]"><i class="fa fa-thumbtack fa-rotate-90"></i></button>
+ <button class="btn btn-sm btn-link" data-action="pin" title="{{tx("modules:chat.pin-message")}}"><i class="fa fa-thumbtack"></i></button>
+ <button class="btn btn-sm btn-link" data-action="unpin" title="{{tx("modules:chat.unpin-message")}}"><i class="fa fa-thumbtack fa-rotate-90"></i></button>
{{{ end }}}
</div>
</div>
diff --git a/src/views/partials/chats/pinned-messages.tpl b/src/views/partials/chats/pinned-messages.tpl
index 20d33f9c1d..9118957104 100644
--- a/src/views/partials/chats/pinned-messages.tpl
+++ b/src/views/partials/chats/pinned-messages.tpl
@@ -1,9 +1,9 @@
<div component="chat/messages/pinned/container" class="d-flex flex-column expanded-chat border-start hidden" style="min-width:340px; width: 340px;">
- <h3 class="fs-6 p-1 mb-0 text-center text-secondary">[[modules:chat.pinned-messages]]</h3>
+ <h3 class="fs-6 p-1 mb-0 text-center text-secondary">{{tx("modules:chat.pinned-messages")}}</h3>
<div component="chat/messages/pinned/empty" class="text-center p-4 d-flex flex-column">
<div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
- <div class="text-xs fw-semibold text-muted">[[modules:chat.no-pinned-messages]]</div>
+ <div class="text-xs fw-semibold text-muted">{{tx("modules:chat.no-pinned-messages")}}</div>
</div>
<ul component="chat/messages/pinned" class="chat-content list-unstyled d-flex flex-column gap-1 p-1 overflow-auto">
diff --git a/src/views/partials/chats/recent_room.tpl b/src/views/partials/chats/recent_room.tpl
index 82192f2581..dd64e0ac0f 100644
--- a/src/views/partials/chats/recent_room.tpl
+++ b/src/views/partials/chats/recent_room.tpl
@@ -25,7 +25,7 @@
{./roomName}
{{{ else }}}
{{{ if !./lastUser.uid }}}
- [[modules:chat.no-users-in-room]]
+ {{tx("modules:chat.no-users-in-room")}}
{{{ else }}}
{{{ if greaterthan(./users.length, "3") }}}
{{tx(./usernames)}}
@@ -40,8 +40,8 @@
</a>
<div>
<button class="mark-read btn btn-ghost btn-sm d-flex align-items-center justify-content-center flex-grow-0 flex-shrink-0 p-1" style="width: 1.5rem; height: 1.5rem;">
- <i class="unread fa fa-2xs fa-circle text-primary {{{ if !./unread }}}hidden{{{ end }}}" aria-label="[[unread:mark-as-read]]"></i>
- <i class="read fa fa-2xs fa-circle-o text-secondary {{{ if ./unread }}}hidden{{{ end }}}" aria-label="[[unread:mark-as-unread]]"></i>
+ <i class="unread fa fa-2xs fa-circle text-primary {{{ if !./unread }}}hidden{{{ end }}}" aria-label="{{tx("unread:mark-as-read")}}"></i>
+ <i class="read fa fa-2xs fa-circle-o text-secondary {{{ if ./unread }}}hidden{{{ end }}}" aria-label="{{tx("unread:mark-as-unread")}}"></i>
</button>
</div>
</div>
diff --git a/src/views/partials/chats/scroll-up-alert.tpl b/src/views/partials/chats/scroll-up-alert.tpl
index 52601bfa47..14801e1f97 100644
--- a/src/views/partials/chats/scroll-up-alert.tpl
+++ b/src/views/partials/chats/scroll-up-alert.tpl
@@ -1,3 +1,3 @@
<div class="position-relative">
- <div component="chat/messages/scroll-up-alert" class="py-1 mt-1 position-absolute start-50 top-50 translate-middle text-sm scroll-up-alert alert alert-info d-none d-md-block text-nowrap hidden" role="button" style="z-index: 500;"><i class="fa fa-fw fa-arrow-down"></i> [[modules:chat.scroll-up-alert]]</div>
+ <div component="chat/messages/scroll-up-alert" class="py-1 mt-1 position-absolute start-50 top-50 translate-middle text-sm scroll-up-alert alert alert-info d-none d-md-block text-nowrap hidden" role="button" style="z-index: 500;"><i class="fa fa-fw fa-arrow-down"></i> {{tx("modules:chat.scroll-up-alert")}}</div>
</div>
\ No newline at end of file
diff --git a/src/views/partials/chats/user-list.tpl b/src/views/partials/chats/user-list.tpl
index c37bf8bc27..819c60169b 100644
--- a/src/views/partials/chats/user-list.tpl
+++ b/src/views/partials/chats/user-list.tpl
@@ -4,7 +4,7 @@
<div>{{buildAvatar(users, "24px", true)}}</div>
<div class="d-flex gap-1 flex-grow-1 text-nowrap text-truncate">
<span component="chat/user/list/username" class="text-truncate">{./displayname}</span>
- {{{ if ./isOwner }}}<span><i class="fa fa-star text-warning" data-bs-toggle="tooltip" title="[[modules:chat.owner]]"></i></span>{{{ end }}}
+ {{{ if ./isOwner }}}<span><i class="fa fa-star text-warning" data-bs-toggle="tooltip" title="{{tx("modules:chat.owner")}}"></i></span>{{{ end }}}
</div>
</a>
{{{ end }}}
diff --git a/src/views/partials/custom-reason.tpl b/src/views/partials/custom-reason.tpl
index 50af17294b..d8a1e57d1a 100644
--- a/src/views/partials/custom-reason.tpl
+++ b/src/views/partials/custom-reason.tpl
@@ -1,10 +1,10 @@
<div>
<div class="d-flex align-items-center justify-content-between mb-2">
- <label class="form-label mb-0" for="reason">[[admin/manage/users:temp-ban.reason]]</label>
+ <label class="form-label mb-0" for="reason">{{tx("admin/manage/users:temp-ban.reason")}}</label>
{{{ if reasons.length }}}
<div class="dropdown">
<button class="btn btn-light btn-sm dropdown-toggle" type="button" id="reasonDropdown" data-bs-toggle="dropdown" aria-expanded="false">
- [[admin/manage/users:temp-ban.select-reason]]
+ {{tx("admin/manage/users:temp-ban.select-reason")}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="reasonDropdown">
diff --git a/src/views/partials/email_update.tpl b/src/views/partials/email_update.tpl
index 788c49942f..14d6d0f901 100644
--- a/src/views/partials/email_update.tpl
+++ b/src/views/partials/email_update.tpl
@@ -1,26 +1,26 @@
<div>
{{{ if hasPending }}}
<div class="alert alert-info">
- <p>[[user:emailUpdate.pending]]</p>
+ <p>{{tx("user:emailUpdate.pending")}}</p>
</div>
{{{ end }}}
- <p>[[user:emailUpdate.intro]]</p>
+ <p>{{tx("user:emailUpdate.intro")}}</p>
{{{ if requireEmailAddress }}}
- <p>[[user:emailUpdate.required]]</p>
+ <p>{{tx("user:emailUpdate.required")}}</p>
{{{ else }}}
- <p>[[user:emailUpdate.optional]]</p>
+ <p>{{tx("user:emailUpdate.optional")}}</p>
{{{ end }}}
<div class="mb-3">
- <label class="form-label" for="email">[[global:email]]</label>
+ <label class="form-label" for="email">{{tx("global:email")}}</label>
<input class="form-control" type="text" id="email" name="email" placeholder="{email}" value="{email}" />
- <p class="form-text">[[user:emailUpdate.change-instructions]]</p>
+ <p class="form-text">{{tx("user:emailUpdate.change-instructions")}}</p>
</div>
{{{ if issuePasswordChallenge }}}
<div class="mb-3">
- <label class="form-label" for="password">[[register:password]]</label>
+ <label class="form-label" for="password">{{tx("register:password")}}</label>
<input class="form-control" type="password" id="password" name="password" />
- <p class="form-text">[[user:emailUpdate.password-challenge]]</p>
+ <p class="form-text">{{tx("user:emailUpdate.password-challenge")}}</p>
</div>
{{{ end }}}
</div>
\ No newline at end of file
diff --git a/src/views/partials/feed/item.tpl b/src/views/partials/feed/item.tpl
index 888b3d13f0..9cc0ec59f8 100644
--- a/src/views/partials/feed/item.tpl
+++ b/src/views/partials/feed/item.tpl
@@ -58,7 +58,7 @@
<a href="{config.relative_path}/post/{encodeURIComponent(./pid)}" class="stretched-link"></a>
{{./content}}
</div>
- <button component="show/more" class="btn btn-link btn-sm fw-semibold hidden ff-secondary text-secondary ms-auto me-auto">[[world:see-more]]</button>
+ <button component="show/more" class="btn btn-link btn-sm fw-semibold hidden ff-secondary text-secondary ms-auto me-auto">{{tx("world:see-more")}}</button>
<hr class="my-2"/>
<div class="d-flex justify-content-between">
<a href="{config.relative_path}/post/{{{ if ./topic.teaserPid }}}{encodeURIComponent(./topic.teaserPid)}{{{ else }}}{encodeURIComponent(./pid)}{{{ end }}}" class="btn btn-link btn-sm text-body {{{ if !./isMainPost }}}invisible{{{ end }}}"><i class="fa-fw fa-regular fa-message text-muted"></i> {humanReadableNumber(./topic.postcount)}</a>
@@ -67,20 +67,20 @@
<a href="#" data-pid="{./pid}" data-action="upvote" data-upvoted="{./upvoted}" data-upvotes="{./upvotes}" class="btn btn-link btn-sm text-body{{{ if ./upvoted }}} upvoted{{{ end }}}"><i class="fa-fw fa-heart {{{ if ./upvoted }}}fa text-danger{{{ else }}}fa-regular text-muted{{{ end }}}"></i> <span component="upvote-count">{humanReadableNumber(./upvotes)}</span></a>
- <a href="#" data-pid="{./pid}" data-is-main="{./isMainPost}" data-tid="{./tid}" data-action="reply" class="btn btn-link btn-sm text-body"><i class="fa-fw fa fa-reply text-muted"></i> [[topic:reply]]</a>
+ <a href="#" data-pid="{./pid}" data-is-main="{./isMainPost}" data-tid="{./tid}" data-action="reply" class="btn btn-link btn-sm text-body"><i class="fa-fw fa fa-reply text-muted"></i> {{tx("topic:reply")}}</a>
</div>
{{{ if ./topic.teaser }}}
<div class="d-flex flex-column gap-2 mt-1 text-xs border-start ps-3">
{{{ if (./replies && (./replies != "1")) }}}
- <a href="{config.relative_path}/post/{./pid}" class="text-capitalize fw-semibold text-secondary">[[global:read-more]] &rarr;</a>
+ <a href="{config.relative_path}/post/{./pid}" class="text-capitalize fw-semibold text-secondary">{{tx("global:read-more")}} &rarr;</a>
{{{ end }}}
<div class="d-inline-flex flex-column px-3 py-2 rounded gap-2 bg-body-tertiary align-self-start">
<div class="d-flex align-items-top gap-2">
<a class="text-decoration-none avatar-tooltip" title="{./topic.teaser.user.displayname}" href="{config.relative_path}/user/{./topic.teaser.user.userslug}">{{buildAvatar(./topic.teaser.user, "18px", true)}} {./topic.teaser.user.displayname}</a>
- <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./index }}}/{./index}{{{ end }}}" title="{./topic.teaser.timestampISO}" aria-label="[[global:lastpost]]"></a>
+ <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./index }}}/{./index}{{{ end }}}" title="{./topic.teaser.timestampISO}" aria-label="{{tx("global:lastpost")}}"></a>
</div>
<div class="post-content text-xs text-break line-clamp-sm-2 lh-sm position-relative flex-fill">
- <a class="stretched-link" tabindex="-1" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./topic.teaser.index }}}/{./topic.teaser.index}{{{ end }}}" aria-label="[[global:lastpost]]"></a>
+ <a class="stretched-link" tabindex="-1" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./topic.teaser.index }}}/{./topic.teaser.index}{{{ end }}}" aria-label="{{tx("global:lastpost")}}"></a>
{{./topic.teaser.content}}
</div>
</div>
diff --git a/src/views/partials/flags/bulk-actions.tpl b/src/views/partials/flags/bulk-actions.tpl
index 31a6242a9e..da72f25854 100644
--- a/src/views/partials/flags/bulk-actions.tpl
+++ b/src/views/partials/flags/bulk-actions.tpl
@@ -1,9 +1,9 @@
<div class="dropdown" component="flags/bulk-actions">
<button class="filter-btn btn btn-light btn-sm border" data-bs-toggle="dropdown" autocomplete="off" aria-haspopup="true" aria-expanded="false" disabled="disabled">
- <span class="filter-label">[[flags:bulk-actions]]</span>
+ <span class="filter-label">{{tx("flags:bulk-actions")}}</span>
</button>
<ul class="dropdown-menu dropdown-menu-end p-1 text-sm" role="menu">
- <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-assign" role="menuitem">[[flags:assign-to-me]]</a></li>
- <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-mark-resolved" role="menuitem">[[flags:bulk-resolve]]</a></li>
+ <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-assign" role="menuitem">{{tx("flags:assign-to-me")}}</a></li>
+ <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-mark-resolved" role="menuitem">{{tx("flags:bulk-resolve")}}</a></li>
</ul>
</div>
\ No newline at end of file
diff --git a/src/views/partials/flags/filters.tpl b/src/views/partials/flags/filters.tpl
index 02ec5f0701..20462ee394 100644
--- a/src/views/partials/flags/filters.tpl
+++ b/src/views/partials/flags/filters.tpl
@@ -1,12 +1,18 @@
<div component="flags/filters" class="d-flex flex-wrap gap-2 pb-3 border-bottom">
<div class="dropdown bottom-sheet">
<a class="filter-btn btn btn-light btn-sm border {{{ if filters.quick }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.quick }}}[[flags:filter-quick-{./filters.quick}]]{{{ else }}}[[flags:quick-filters]]{{{ end }}}</span>
+ <span class="filter-label">
+ {{{ if filters.quick }}}
+ {{tx(concat("flags:filter-quick-", ./filters.quick))}}
+ {{{ else }}}
+ {{tx("flags:quick-filters")}}
+ {{{ end }}}
+ </span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li>
- <a class="dropdown-item rounded-1" href="{config.relative_path}/flags?quick=mine" role="menuitem">[[flags:filter-quick-mine]]</a>
+ <a class="dropdown-item rounded-1" href="{config.relative_path}/flags?quick=mine" role="menuitem">{{tx("flags:filter-quick-mine")}}</a>
</li>
</ul>
</div>
@@ -19,14 +25,14 @@
<span class="visible-md-inline visible-lg-inline">{{stripTags(tx(selectedCategory.name))}}</span>
</span>
{{{ else }}}
- <span class="visible-md-inline visible-lg-inline">[[unread:all-categories]]</span>
+ <span class="visible-md-inline visible-lg-inline">{{tx("unread:all-categories")}}</span>
{{{ end }}}
<span class="caret text-primary opacity-75"></span>
</button>
<div class="dropdown-menu p-1">
<div component="category-selector-search" class="p-1 hidden">
- <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">
+ <input type="text" class="form-control form-control-sm" placeholder="{{tx("search:type-to-search")}}" autocomplete="off">
<hr class="mt-2 mb-0"/>
</div>
<ul component="category/list" class="list-unstyled mb-0 text-sm category-dropdown-menu ghost-scrollbar" role="menu">
@@ -37,55 +43,55 @@
<div class="dropdown bottom-sheet">
<a class="filter-btn btn btn-light btn-sm border {{{ if (sort != "newest") }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if (sort != "newest") }}}[[flags:sort-{./sort}]]{{{ else }}}[[flags:sort]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if (sort != "newest") }}}{{tx(concat("flags:sort-", ./sort))}}{{{ else }}}{{tx("flags:sort")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" role="menu">
- <li><h6 class="dropdown-header">[[flags:sort-all]]</h6></li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="newest" role="menuitem">[[flags:sort-newest]]</li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="oldest" role="menuitem">[[flags:sort-oldest]]</li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="reports" role="menuitem">[[flags:sort-reports]]</li>
- <li><h6 class="dropdown-header">[[flags:sort-posts-only]]</h6></li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="downvotes" role="menuitem">[[flags:sort-downvotes]]</li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="upvotes" role="menuitem">[[flags:sort-upvotes]]</li>
- <li class="dropdown-item rounded-1" data-name="sort" data-value="replies" role="menuitem">[[flags:sort-replies]]</li>
+ <li><h6 class="dropdown-header">{{tx("flags:sort-all")}}</h6></li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="newest" role="menuitem">{{tx("flags:sort-newest")}}</li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="oldest" role="menuitem">{{tx("flags:sort-oldest")}}</li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="reports" role="menuitem">{{tx("flags:sort-reports")}}</li>
+ <li><h6 class="dropdown-header">{{tx("flags:sort-posts-only")}}</h6></li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="downvotes" role="menuitem">{{tx("flags:sort-downvotes")}}</li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="upvotes" role="menuitem">{{tx("flags:sort-upvotes")}}</li>
+ <li class="dropdown-item rounded-1" data-name="sort" data-value="replies" role="menuitem">{{tx("flags:sort-replies")}}</li>
</ul>
</div>
<div class="dropdown bottom-sheet">
<a class="filter-btn btn btn-light btn-sm border {{{ if filters.state }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.state }}}[[flags:state-{./filters.state}]]{{{ else }}}[[flags:filter-state]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.state }}}{{tx(concat("flags:state-", ./filters.state))}}{{{ else }}}{{tx("flags:filter-state")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" role="menu">
- <li class="dropdown-item rounded-1" data-name="state" data-value="open" role="menuitem">[[flags:state-open]]</li>
- <li class="dropdown-item rounded-1" data-name="state" data-value="wip" role="menuitem">[[flags:state-wip]]</li>
- <li class="dropdown-item rounded-1" data-name="state" data-value="resolved" role="menuitem">[[flags:state-resolved]]</li>
- <li class="dropdown-item rounded-1" data-name="state" data-value="rejected" role="menuitem">[[flags:state-rejected]]</li>
+ <li class="dropdown-item rounded-1" data-name="state" data-value="open" role="menuitem">{{tx("flags:state-open")}}</li>
+ <li class="dropdown-item rounded-1" data-name="state" data-value="wip" role="menuitem">{{tx("flags:state-wip")}}</li>
+ <li class="dropdown-item rounded-1" data-name="state" data-value="resolved" role="menuitem">{{tx("flags:state-resolved")}}</li>
+ <li class="dropdown-item rounded-1" data-name="state" data-value="rejected" role="menuitem">{{tx("flags:state-rejected")}}</li>
</ul>
</div>
<div class="dropdown bottom-sheet">
<a class="filter-btn btn btn-light btn-sm border {{{ if filters.type }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.type }}}[[flags:filter-type-{./filters.type}]]{{{ else }}}[[flags:filter-type]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.type }}}{{tx(concat("flags:filter-type-", ./filters.type))}}{{{ else }}}{{tx("flags:filter-type")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" role="menu">
- <li class="dropdown-item rounded-1" data-name="type" data-value="all" role="menuitem">[[flags:filter-type-all]]</li>
- <li class="dropdown-item rounded-1" data-name="type" data-value="post" role="menuitem">[[flags:filter-type-post]]</li>
- <li class="dropdown-item rounded-1" data-name="type" data-value="user" role="menuitem">[[flags:filter-type-user]]</li>
+ <li class="dropdown-item rounded-1" data-name="type" data-value="all" role="menuitem">{{tx("flags:filter-type-all")}}</li>
+ <li class="dropdown-item rounded-1" data-name="type" data-value="post" role="menuitem">{{tx("flags:filter-type-post")}}</li>
+ <li class="dropdown-item rounded-1" data-name="type" data-value="user" role="menuitem">{{tx("flags:filter-type-user")}}</li>
</ul>
</div>
<div component="flags/filter/assignee" class="dropdown bottom-sheet" data-filter-name="assignee">
<a component="user/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.assignee }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">[[flags:filter-assignee]]</span>
+ <span class="filter-label">{{tx("flags:filter-assignee")}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="min-width: 350px;" role="menu">
<li class="px-3 py-1 d-flex flex-column gap-2">
- <input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
+ <input type="text" class="form-control" component="user/filter/search" placeholder="{{tx("search:type-a-username")}}">
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
{{{ each selected.assignee }}}
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
@@ -106,13 +112,13 @@
<div component="flags/filter/reporterId" class="dropdown bottom-sheet" data-filter-name="reporterId">
<a component="user/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.reporterId }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">[[flags:filter-reporterId]]</span>
+ <span class="filter-label">{{tx("flags:filter-reporterId")}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="min-width: 350px;" role="menu">
<li class="px-3 py-1 d-flex flex-column gap-2">
- <input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
+ <input type="text" class="form-control" component="user/filter/search" placeholder="{{tx("search:type-a-username")}}">
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
{{{ each selected.reporterId }}}
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
@@ -133,13 +139,13 @@
<div component="flags/filter/targetUid" class="dropdown bottom-sheet" data-filter-name="targetUid">
<a component="user/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.targetUid }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">[[flags:filter-targetUid]]</span>
+ <span class="filter-label">{{tx("flags:filter-targetUid")}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="min-width: 350px;" role="menu">
<li class="px-3 py-1 d-flex flex-column">
- <input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
+ <input type="text" class="form-control" component="user/filter/search" placeholder="{{tx("search:type-a-username")}}">
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
{{{ each selected.targetUid }}}
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
@@ -160,7 +166,7 @@
<div component="flags/filters/reset" class="ms-auto">
<a class="filter-btn btn btn-warning btn-sm border {{{ if !hasFilter }}}btn-light disabled{{{ end }}}" href="{config.relative_path}/flags" role="button">
- <span class="filter-label">[[flags:filter-reset]]</span>
+ <span class="filter-label">{{tx("flags:filter-reset")}}</span>
</a>
</div>
diff --git a/src/views/partials/flags/results.tpl b/src/views/partials/flags/results.tpl
index f8c319eacf..7be943a6cb 100644
--- a/src/views/partials/flags/results.tpl
+++ b/src/views/partials/flags/results.tpl
@@ -1,14 +1,14 @@
<div class="card card-header text-xs px-2 py-1 fw-semibold border-0 align-self-start">
- [[flags:x-flags-found, {count}]]
+ {{tx("flags:x-flags-found", count)}}
</div>
<table class="table table-hover" component="flags/list">
<thead>
<tr>
<th></th>
- <th class="text-xs text-muted">[[flags:reports]]</th>
- <th class="text-xs text-muted">[[flags:first-reported]]</th>
- <th class="text-xs text-muted">[[flags:state]]</th>
+ <th class="text-xs text-muted">{{tx("flags:reports")}}</th>
+ <th class="text-xs text-muted">{{tx("flags:first-reported")}}</th>
+ <th class="text-xs text-muted">{{tx("flags:state")}}</th>
<th>
<input type="checkbox" data-action="toggle-all" autocomplete="off" />
</th>
@@ -26,7 +26,7 @@
{./heat}
</td>
<td><span class="timeago" title="{./datetimeISO}"></span></td>
- <td><span class="badge bg-{./labelClass}">[[flags:state-{./state}]]</span></td>
+ <td><span class="badge bg-{./labelClass}">{{tx(concat("flags:state-", ./state))}}</span></td>
<td>
<input type="checkbox" autocomplete="off" />
</td>
diff --git a/src/views/partials/gdpr_consent.tpl b/src/views/partials/gdpr_consent.tpl
index 1759d39589..512915d84e 100644
--- a/src/views/partials/gdpr_consent.tpl
+++ b/src/views/partials/gdpr_consent.tpl
@@ -1,22 +1,22 @@
<div class="mb-3">
- <p class="lead">[[user:consent.lead]]</p>
- <p>[[user:consent.intro]]</p>
+ <p class="lead">{{tx("user:consent.lead")}}</p>
+ <p>{{tx("user:consent.intro")}}</p>
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" name="gdpr_agree_data" id="gdpr_agree_data" role="switch">
- <label class="form-check-label" for="gdpr_agree_data">[[register:gdpr-agree-data]]</label>
+ <label class="form-check-label" for="gdpr_agree_data">{{tx("register:gdpr-agree-data")}}</label>
</div>
<p>
- [[user:consent.email-intro]]
+ {{tx("user:consent.email-intro")}}
{{{ if digestEnabled }}}
- [[user:consent.digest-frequency, {digestFrequency}]]
+ {{tx("user:consent.digest-frequency", digestFrequency)}}
{{{ else }}}
- [[user:consent.digest-off]]
+ {{tx("user:consent.digest-off")}}
{{{ end }}}
</p>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="gdpr_agree_email" id="gdpr_agree_email" role="switch">
- <label class="form-check-label" for="gdpr_agree_email">[[register:gdpr-agree-email]]</label>
+ <label class="form-check-label" for="gdpr_agree_email">{{tx("register:gdpr-agree-email")}}</label>
</div>
</div>
\ No newline at end of file
diff --git a/src/views/partials/groups/admin.tpl b/src/views/partials/groups/admin.tpl
index 1d0cb4fab7..eb7589681c 100644
--- a/src/views/partials/groups/admin.tpl
+++ b/src/views/partials/groups/admin.tpl
@@ -3,45 +3,45 @@
<div class="row">
<div class="col-12 col-lg-6">
<div class="mb-3">
- <label class="form-label" for="name">[[groups:details.group-name]]</label>
+ <label class="form-label" for="name">{{tx("groups:details.group-name")}}</label>
<input {{{ if group.system }}}readonly{{{ end }}} class="form-control" name="name" id="name" type="text" value="{group.displayName}" />
</div>
<div class="mb-3">
- <label class="form-label" for="description">[[groups:details.description]]</label>
+ <label class="form-label" for="description">{{tx("groups:details.description")}}</label>
<textarea class="form-control" name="description" id="description" type="text" maxlength="255" rows="5">{group.description}</textarea>
</div>
<div class="form-check mb-3">
- <label class="form-check-label" for="private">[[groups:details.private]]</label>
+ <label class="form-check-label" for="private">{{tx("groups:details.private")}}</label>
<input class="form-check-input" name="private" id="private" type="checkbox"{{{ if group.private }}} checked{{{ end }}}>
{{{ if !allowPrivateGroups }}}
<p class="form-text">
- [[groups:details.private-system-help]]
+ {{tx("groups:details.private-system-help")}}
</p>
{{{ end }}}
<p class="form-text text-xs m-0">
- [[groups:details.private-help]]
+ {{tx("groups:details.private-help")}}
</p>
</div>
<div class="form-check mb-3">
- <label class="form-check-label" for="hidden">[[groups:details.hidden]]</label>
+ <label class="form-check-label" for="hidden">{{tx("groups:details.hidden")}}</label>
<input class="form-check-input" name="hidden" id="hidden" type="checkbox"{{{ if group.hidden }}} checked{{{ end }}}>
<p class="form-text text-xs m-0">
- [[groups:details.hidden-help]]
+ {{tx("groups:details.hidden-help")}}
</p>
</div>
<div class="form-check mb-3">
- <label class="form-check-label" for="disableJoinRequests">[[groups:details.disableJoinRequests]]</label>
+ <label class="form-check-label" for="disableJoinRequests">{{tx("groups:details.disableJoinRequests")}}</label>
<input class="form-check-input" name="disableJoinRequests" id="disableJoinRequests" type="checkbox"{{{ if group.disableJoinRequests }}} checked{{{ end }}}>
</div>
<div class="form-check mb-3">
- <label class="form-check-label" for="disableLeave">[[groups:details.disableLeave]]</label>
+ <label class="form-check-label" for="disableLeave">{{tx("groups:details.disableLeave")}}</label>
<input class="form-check-input" name="disableLeave" id="disableLeave" type="checkbox"{{{if group.disableLeave}}} checked{{{end}}}>
</div>
<div class="mb-3">
- <label class="form-label" for="memberPostCids">[[groups:details.member-post-cids]]</label>
+ <label class="form-label" for="memberPostCids">{{tx("groups:details.member-post-cids")}}</label>
<div class="d-flex gap-1">
<div class="member-post-cids-selector">
<!-- IMPORT partials/category/selector-dropdown-left.tpl -->
@@ -53,7 +53,7 @@
<div class="col-12 col-lg-6">
<div class="d-flex gap-2 align-items-center mb-3">
<div class="form-check">
- <label class="form-check-label" for="userTitleEnabled">[[groups:details.userTitleEnabled]]</label>
+ <label class="form-check-label" for="userTitleEnabled">{{tx("groups:details.userTitleEnabled")}}</label>
<input class="form-check-input" name="userTitleEnabled" id="userTitleEnabled" type="checkbox"{{{ if group.userTitleEnabled }}} checked{{{ end }}}>
</div>
<span class="badge rounded-1 text-uppercase text-truncate rounded-1 d-flex align-items-center gap-1 {{{ if !group.userTitleEnabled }}} hide{{{ end }}}" style="max-width:150px; color: {group.textColor}; background-color: {group.labelColor}"><i class="fa {{{ if (group.icon && (group.icon != "fa-nbb-none")) }}}{group.icon}{{{ else }}}hidden{{{ end }}}"></i><span class="badge-text">{{{ if group.userTitle }}}{group.userTitle}{{{ end }}}</span></span>
@@ -61,10 +61,10 @@
<div class="mb-3">
- <label class="form-label" for="userTitle">[[groups:details.badge-text]]</label>
+ <label class="form-label" for="userTitle">{{tx("groups:details.badge-text")}}</label>
<div class="d-flex gap-1">
<input component="groups/userTitleOption" class="form-control" name="userTitle" id="userTitle" type="text" maxlength="40" value="{group.userTitle}"{{{ if !group.userTitleEnabled }}} disabled{{{ end }}} />
- <button component="groups/userTitleOption" type="button" class="btn btn-outline-secondary text-nowrap" data-action="icon-select"{{{ if !group.userTitleEnabled }}} disabled{{{ end }}}>[[groups:details.change-icon]]</button>
+ <button component="groups/userTitleOption" type="button" class="btn btn-outline-secondary text-nowrap" data-action="icon-select"{{{ if !group.userTitleEnabled }}} disabled{{{ end }}}>{{tx("groups:details.change-icon")}}</button>
<input type="hidden" name="icon" value="{{{ if group.icon }}}{group.icon}{{{ end }}}" />
<div id="icons" class="hidden">
<div class="icon-container">
@@ -76,11 +76,11 @@
</div>
</div>
<div class="mb-3 d-flex align-items-center justify-content-between gap-5">
- <label class="form-label mb-0 text-nowrap" for="labelColor" class="badge-color-label">[[groups:details.change-label-colour]]</label>
+ <label class="form-label mb-0 text-nowrap" for="labelColor" class="badge-color-label">{{tx("groups:details.change-label-colour")}}</label>
<input class="form-control p-1" component="groups/userTitleOption" type="color" name="labelColor" id="labelColor" value="{{{ if group.labelColor }}}{group.labelColor}{{{ end }}}" style="width: 128px;" />
</div>
<div class="d-flex align-items-center justify-content-between gap-5">
- <label class="form-label mb-0 text-nowrap" for="textColor" class="badge-color-label">[[groups:details.change-text-colour]]</label>
+ <label class="form-label mb-0 text-nowrap" for="textColor" class="badge-color-label">{{tx("groups:details.change-text-colour")}}</label>
<input class="form-control p-1" component="groups/userTitleOption" type="color" name="textColor" id="textColor" value="{{{ if group.textColor }}}{group.textColor}{{{ end }}}" style="width: 128px;"/>
</div>
</div>
diff --git a/src/views/partials/groups/filter-dropdown-content.tpl b/src/views/partials/groups/filter-dropdown-content.tpl
index 1243bed751..01ae7e5066 100644
--- a/src/views/partials/groups/filter-dropdown-content.tpl
+++ b/src/views/partials/groups/filter-dropdown-content.tpl
@@ -3,13 +3,13 @@
{{{ if selectedGroup }}}
<span class="fw-semibold">{selectedGroup.displayName}</span>
{{{ else }}}
- <span class="fw-semibold">[[groups:all-groups]]</span>
+ <span class="fw-semibold">{{tx("groups:all-groups")}}</span>
{{{ end }}} <span class="caret text-primary opacity-75"></span>
</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li role="presentation" class="user {{{ if !selectedGroup}}}selected{{{end}}}">
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{allGroupsUrl}">
- <div class="flex-grow-1">[[groups:all-groups]]</div>
+ <div class="flex-grow-1">{{tx("groups:all-groups")}}</div>
<i class="flex-shrink-0 fa fa-fw {{{ if !selectedGroup }}}fa-check{{{ end }}}"></i>
</a>
</li>
diff --git a/src/views/partials/groups/invited.tpl b/src/views/partials/groups/invited.tpl
index 3b15ce0143..88ca7bec13 100644
--- a/src/views/partials/groups/invited.tpl
+++ b/src/views/partials/groups/invited.tpl
@@ -1,20 +1,20 @@
-<label class="text-xs text-muted">[[groups:invited.search]]</label>
+<label class="text-xs text-muted">{{tx("groups:invited.search")}}</label>
<div class="input-group mb-2">
<input class="form-control" type="text" component="groups/members/invite"/>
<span class="input-group-text search-button"><i class="fa fa-search"></i></span>
</div>
<div class="mb-2">
- <label class="text-xs text-muted">[[groups:bulk-invite-instructions]]</label>
+ <label class="text-xs text-muted">{{tx("groups:bulk-invite-instructions")}}</label>
<textarea class="form-control" component="groups/members/bulk-invite"></textarea>
</div>
<div class="mb-2 clearfix">
- <button type="button" class="btn btn-primary btn-sm float-end" component="groups/members/bulk-invite-button">[[groups:bulk-invite]]</button>
+ <button type="button" class="btn btn-primary btn-sm float-end" component="groups/members/bulk-invite-button">{{tx("groups:bulk-invite")}}</button>
</div>
<div style="max-height: 500px; overflow: auto;">
- <div component="groups/invited/alert" class="alert alert-info {{{ if group.invited.length }}}hidden{{{ end }}}">[[groups:invited.none]]</div>
+ <div component="groups/invited/alert" class="alert alert-info {{{ if group.invited.length }}}hidden{{{ end }}}">{{tx("groups:invited.none")}}</div>
<table component="groups/invited" class="table table-hover">
<tbody>
{{{ each group.invited }}}
@@ -24,7 +24,7 @@
<a class="text-decoration-none" href="{config.relative_path}/user/{group.invited.userslug}">{{buildAvatar(group.invited, "24px", true)}}</a>
<a href="{config.relative_path}/user/{group.invited.userslug}">{group.invited.username}</a>
</div>
- <button class="btn btn-outline-secondary btn-sm text-nowrap" data-action="rescindInvite">[[groups:invited.uninvite]]</button>
+ <button class="btn btn-outline-secondary btn-sm text-nowrap" data-action="rescindInvite">{{tx("groups:invited.uninvite")}}</button>
</td>
</tr>
{{{ end }}}
diff --git a/src/views/partials/groups/memberlist.tpl b/src/views/partials/groups/memberlist.tpl
index ae0c448706..5a0d32f8ea 100644
--- a/src/views/partials/groups/memberlist.tpl
+++ b/src/views/partials/groups/memberlist.tpl
@@ -1,12 +1,12 @@
<div class="d-flex {{{ if group.isOwner }}}justify-content-between{{{ else }}}justify-content-end{{{ end }}} mb-3">
{{{ if isAdmin }}}
<div class="flex-shrink-0">
- <button component="groups/members/add" type="button" class="btn btn-primary btn-sm me-3" title="[[groups:details.add-member]]"><i class="fa fa-user-plus"></i> [[groups:details.add-member]]</button>
+ <button component="groups/members/add" type="button" class="btn btn-primary btn-sm me-3" title="{{tx("groups:details.add-member")}}"><i class="fa fa-user-plus"></i> {{tx("groups:details.add-member")}}</button>
</div>
{{{ end }}}
<div>
<div class="input-group">
- <input class="form-control form-control-sm" type="text" component="groups/members/search" placeholder="[[global:search]]"/>
+ <input class="form-control form-control-sm" type="text" component="groups/members/search" placeholder="{{tx("global:search")}}"/>
<button class="btn btn-primary btn-sm search-button" type="button">
<i class="fa fa-search"></i>
</button>
@@ -24,16 +24,16 @@
<div class="d-flex align-items-center gap-2">
<a class="text-decoration-none" href="{config.relative_path}/user/{group.members.userslug}">{{buildAvatar(group.members, "24px", true)}}</a>
<a class="align-text-top" href="{config.relative_path}/user/{group.members.userslug}">{group.members.username}</a>
- <i component="groups/owner/icon" title="[[groups:owner]]" class="user-owner-icon fa fa-star align-text-top text-warning {{{ if !group.members.isOwner }}}invisible{{{ end }}}"></i>
+ <i component="groups/owner/icon" title="{{tx("groups:owner")}}" class="user-owner-icon fa fa-star align-text-top text-warning {{{ if !group.members.isOwner }}}invisible{{{ end }}}"></i>
</div>
{{{ if group.isOwner }}}
<div class="owner-controls d-flex gap-1">
- <a class="btn btn-light btn-sm" href="#" data-action="toggleOwnership" title="[[groups:details.grant]]">
+ <a class="btn btn-light btn-sm" href="#" data-action="toggleOwnership" title="{{tx("groups:details.grant")}}">
<i class="fa fa-star text-warning"></i>
</a>
- <a class="btn btn-light btn-sm" href="#" data-action="kick" title="[[groups:details.kick]]">
+ <a class="btn btn-light btn-sm" href="#" data-action="kick" title="{{tx("groups:details.kick")}}">
<i class="fa fa-ban text-danger"></i>
</a>
</div>
diff --git a/src/views/partials/groups/pending.tpl b/src/views/partials/groups/pending.tpl
index 96a15fb4da..a5e1e7f37c 100644
--- a/src/views/partials/groups/pending.tpl
+++ b/src/views/partials/groups/pending.tpl
@@ -1,13 +1,12 @@
{{{ if group.pending.length }}}
<div class="d-flex justify-content-end gap-2 mb-3">
- <button class="btn btn-danger btn-sm" data-action="rejectAll">[[groups:pending.reject-all]]</button>
- <button class="btn btn-success btn-sm" data-action="acceptAll">[[groups:pending.accept-all]]</button>
-
+ <button class="btn btn-danger btn-sm" data-action="rejectAll">{{tx("groups:pending.reject-all")}}</button>
+ <button class="btn btn-success btn-sm" data-action="acceptAll">{{tx("groups:pending.accept-all")}}</button>
</div>
{{{ end }}}
<div style="max-height: 500px;overflow: auto;">
- <div component="groups/pending/alert" class="alert alert-info {{{ if group.pending.length }}}hidden{{{ end }}}">[[groups:pending.none]]</div>
+ <div component="groups/pending/alert" class="alert alert-info {{{ if group.pending.length }}}hidden{{{ end }}}">{{tx("groups:pending.none")}}</div>
<table component="groups/pending" class="table table-hover">
<tbody>
{{{ each group.pending }}}
@@ -18,8 +17,8 @@
<a href="{config.relative_path}/user/{group.pending.userslug}">{group.pending.username}</a>
</div>
<div class="d-flex gap-2">
- <button class="btn btn-danger btn-sm" data-action="reject">[[groups:pending.reject]]</a></li>
- <button class="btn btn-success btn-sm" data-action="accept">[[groups:pending.accept]]</a></li>
+ <button class="btn btn-danger btn-sm" data-action="reject">{{tx("groups:pending.reject")}}</button>
+ <button class="btn btn-success btn-sm" data-action="accept">{{tx("groups:pending.accept")}}</button>
</div>
</td>
</tr>
diff --git a/src/views/partials/groups/sidebar-left.tpl b/src/views/partials/groups/sidebar-left.tpl
index 9c7feb1042..1ee8ddd7f7 100644
--- a/src/views/partials/groups/sidebar-left.tpl
+++ b/src/views/partials/groups/sidebar-left.tpl
@@ -1,26 +1,26 @@
<div class="flex-shrink-0 pe-2 border-end-md text-sm mb-3 flex-basis-md-200">
<div class="nav sticky-md-top d-flex flex-row flex-md-column flex-wrap gap-1" style="top: 1rem; z-index: 1;">
<button data-bs-toggle="tab" data-bs-target="#groups-posts" class="btn btn-ghost btn-sm text-start d-flex align-items-baseline ff-secondary fw-semibold {{{ if template.groups/details }}}active{{{ end }}}">
- <div class="flex-grow-1">[[global:posts]]</div>
+ <div class="flex-grow-1">{{tx("global:posts")}}</div>
</button>
<button data-bs-toggle="tab" data-bs-target="#groups-members" class="btn btn-ghost btn-sm text-start d-flex align-items-baseline ff-secondary fw-semibold gap-2">
- <div class="flex-grow-1">[[groups:members]]</div>
+ <div class="flex-grow-1">{{tx("groups:members")}}</div>
<span component="group/member/count" class="flex-shrink-0 text-xs lh-1" title="{formattedNumber(group.memberCount)}">{humanReadableNumber(group.memberCount)}</span>
</button>
{{{ if group.isOwner }}}
<button data-bs-toggle="tab" data-bs-target="#groups-pending" class="btn btn-ghost btn-sm text-start d-flex align-items-baseline ff-secondary fw-semibold gap-2">
- <div class="flex-grow-1">[[groups:details.pending]]</div>
+ <div class="flex-grow-1">{{tx("groups:details.pending")}}</div>
<span component="group/pending/count" class="flex-shrink-0 text-xs lh-1" title="{formattedNumber(group.pending.length)}">{humanReadableNumber(group.pending.length)}</span>
</button>
<button data-bs-toggle="tab" data-bs-target="#groups-invited" class="btn btn-ghost btn-sm text-start d-flex align-items-baseline ff-secondary fw-semibold gap-2">
- <div class="flex-grow-1">[[groups:details.invited]]</div>
+ <div class="flex-grow-1">{{tx("groups:details.invited")}}</div>
<span component="group/invited/count" class="flex-shrink-0 text-xs lh-1" title="{formattedNumber(group.invited.length)}">{humanReadableNumber(group.invited.length)}</span>
</button>
<button data-bs-toggle="tab" data-bs-target="#groups-admin" class="btn btn-ghost btn-sm text-start d-flex align-items-baseline ff-secondary fw-semibold">
- <div class="flex-grow-1">[[global:header.admin]]</div>
+ <div class="flex-grow-1">{{tx("global:header.admin")}}</div>
</button>
{{{ end }}}
</div>
diff --git a/src/views/partials/reconnect-alert.tpl b/src/views/partials/reconnect-alert.tpl
index e825f57959..fb9cde4f3a 100644
--- a/src/views/partials/reconnect-alert.tpl
+++ b/src/views/partials/reconnect-alert.tpl
@@ -1,4 +1,4 @@
<div id="reconnect-alert" class="alert alert-dismissible alert-warning fade hide" component="toaster/toast" role="alert">
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="[[global:buttons.close]]"></button>
- <p class="mb-0">[[global:reconnecting-message, {config.siteTitle}]]</p>
+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{tx("global:buttons.close")}}"></button>
+ <p class="mb-0">{{tx("global:reconnecting-message", config.siteTitle)}}</p>
</div>
diff --git a/src/views/partials/search/filters.tpl b/src/views/partials/search/filters.tpl
index 4b31117d9f..c9092baac3 100644
--- a/src/views/partials/search/filters.tpl
+++ b/src/views/partials/search/filters.tpl
@@ -3,21 +3,21 @@
<div class="post-search-item">
<div component="category/filter" class="dropdown" data-filter-name="category">
<a component="category/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.categories.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.categories.active }}}{{stripTags(tx(filters.categories.label))}}{{{ else }}}[[search:categories]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.categories.active }}}{{stripTags(tx(filters.categories.label))}}{{{ else }}}{{tx("search:categories")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li class="px-2 py-1 mb-2 d-flex flex-column gap-2">
<div component="category-selector-search">
- <input type="text" class="form-control form-control-sm" component="category/filter/search" placeholder="[[search:type-a-category]]">
+ <input type="text" class="form-control form-control-sm" component="category/filter/search" placeholder="{{tx("search:type-a-category")}}">
</div>
</li>
<div component="category/list" class="overflow-auto ghost-scrollbar" style="max-height: 350px;"></div>
<div class="px-3 py-1 border-top">
<div class="form-check">
<input id="search-children" class="form-check-input" type="checkbox"/>
- <label class="form-check-label" for="search-children">[[search:search-child-categories]]</label>
+ <label class="form-check-label" for="search-children">{{tx("search:search-child-categories")}}</label>
</div>
</div>
</ul>
@@ -29,13 +29,13 @@
<div class="post-search-item">
<div component="tag/filter" class="dropdown" data-filter-name="tag">
<a component="tag/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.tags.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.tags.active }}}{{tx(filters.tags.label)}}{{{ else }}}[[search:tags]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.tags.active }}}{{tx(filters.tags.label)}}{{{ else }}}{{tx("search:tags")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 350px;" role="menu">
<li class="px-2 py-1 d-flex flex-column gap-2">
- <input type="text" class="form-control form-control-sm" component="tag/filter/search" placeholder="[[search:type-a-tag]]">
+ <input type="text" class="form-control form-control-sm" component="tag/filter/search" placeholder="{{tx("search:type-a-tag")}}">
<div component="tag/filter/selected" class="d-flex flex-wrap gap-2">
{{{ each tagFilterSelected }}}
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
@@ -59,13 +59,13 @@
<div class="post-search-item">
<div component="user/filter" class="dropdown" data-filter-name="user">
<a component="user/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.users.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.users.active }}}{{tx(filters.users.label)}}{{{ else }}}[[search:posted-by]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.users.active }}}{{tx(filters.users.label)}}{{{ else }}}{{tx("search:posted-by")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 350px;" role="menu">
<li class="px-2 py-1 d-flex flex-column gap-2">
- <input type="text" class="form-control form-control-sm" component="user/filter/search" placeholder="[[search:type-a-username]]">
+ <input type="text" class="form-control form-control-sm" component="user/filter/search" placeholder="{{tx("search:type-a-username")}}">
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
{{{ each userFilterSelected }}}
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
@@ -90,15 +90,15 @@
<div class="post-search-item">
<div class="dropdown" data-filter-name="replies">
<a id="reply-count-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.replies.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.replies.active }}}{tx(filters.replies.label)}}{{{ else }}}[[search:replies]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.replies.active }}}{{tx(filters.replies.label)}}{{{ else }}}{{tx("search:replies")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 300px;" role="menu">
<li class="px-2 py-1 d-flex flex-nowrap gap-2">
<select id="reply-count-filter" class="form-select form-select-sm">
- <option value="atleast">[[search:at-least]]</option>
- <option value="atmost">[[search:at-most]]</option>
+ <option value="atleast">{{tx("search:at-least")}}</option>
+ <option value="atmost">{{tx("search:at-most")}}</option>
</select>
<input id="reply-count" type="number" min="0" class="form-control form-control-sm" />
</li>
@@ -110,25 +110,25 @@
<div class="post-search-item">
<div class="dropdown" data-filter-name="time">
<a id="post-time-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.time.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.time.active }}}{tx(filters.time.label)}{{{ else }}}[[search:time]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.time.active }}}{{tx(filters.time.label)}}{{{ else }}}{{tx("search:time")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 350px;" role="menu">
<li class="px-2 py-1 d-flex flex-nowrap gap-2">
<select id="post-time-filter" class="form-select form-select-sm">
- <option value="newer">[[search:newer-than]]</option>
- <option value="older">[[search:older-than]]</option>
+ <option value="newer">{{tx("search:newer-than")}}</option>
+ <option value="older">{{tx("search:older-than")}}</option>
</select>
<select id="post-time-range" class="form-select form-select-sm">
- <option value="">[[search:any-date]]</option>
- <option value="86400">[[search:yesterday]]</option>
- <option value="604800">[[search:one-week]]</option>
- <option value="1209600">[[search:two-weeks]]</option>
- <option value="2592000">[[search:one-month]]</option>
- <option value="7776000">[[search:three-months]]</option>
- <option value="15552000">[[search:six-months]]</option>
- <option value="31104000">[[search:one-year]]</option>
+ <option value="">{{tx("search:any-date")}}</option>
+ <option value="86400">{{tx("search:yesterday")}}</option>
+ <option value="604800">{{tx("search:one-week")}}</option>
+ <option value="1209600">{{tx("search:two-weeks")}}</option>
+ <option value="2592000">{{tx("search:one-month")}}</option>
+ <option value="7776000">{{tx("search:three-months")}}</option>
+ <option value="15552000">{{tx("search:six-months")}}</option>
+ <option value="31104000">{{tx("search:one-year")}}</option>
</select>
</li>
</ul>
@@ -139,28 +139,28 @@
<div class="post-search-item">
<div class="dropdown" data-filter-name="sort">
<a id="sort-by-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.sort.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="filter-label">{{{ if filters.sort.active }}}{tx(filters.sort.label)}{{{ else }}}[[search:sort]]{{{ end }}}</span>
+ <span class="filter-label">{{{ if filters.sort.active }}}{{tx(filters.sort.label)}}{{{ else }}}{{tx("search:sort")}}{{{ end }}}</span>
<span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 250px;" role="menu">
<li class="px-2 py-1 d-flex flex-column gap-2">
<select id="post-sort-by" class="form-select form-select-sm">
- <option value="relevance">[[search:relevance]]</option>
- <option value="timestamp">[[search:post-time]]</option>
- <option value="votes">[[search:votes]]</option>
- <option value="topic.lastposttime">[[search:last-reply-time]]</option>
- <option value="topic.title">[[search:topic-title]]</option>
- <option value="topic.postcount">[[search:number-of-replies]]</option>
- <option value="topic.viewcount">[[search:number-of-views]]</option>
- <option value="topic.votes">[[search:topic-votes]]</option>
- <option value="topic.timestamp">[[search:topic-start-date]]</option>
- <option value="user.username">[[search:username]]</option>
- <option value="category.name">[[search:category]]</option>
+ <option value="relevance">{{tx("search:relevance")}}</option>
+ <option value="timestamp">{{tx("search:post-time")}}</option>
+ <option value="votes">{{tx("search:votes")}}</option>
+ <option value="topic.lastposttime">{{tx("search:last-reply-time")}}</option>
+ <option value="topic.title">{{tx("search:topic-title")}}</option>
+ <option value="topic.postcount">{{tx("search:number-of-replies")}}</option>
+ <option value="topic.viewcount">{{tx("search:number-of-views")}}</option>
+ <option value="topic.votes">{{tx("search:topic-votes")}}</option>
+ <option value="topic.timestamp">{{tx("search:topic-start-date")}}</option>
+ <option value="user.username">{{tx("search:username")}}</option>
+ <option value="category.name">{{tx("search:category")}}</option>
</select>
<select id="post-sort-direction" class="form-select form-select-sm">
- <option value="desc">[[search:descending]]</option>
- <option value="asc">[[search:ascending]]</option>
+ <option value="desc">{{tx("search:descending")}}</option>
+ <option value="asc">{{tx("search:ascending")}}</option>
</select>
</li>
</ul>
@@ -170,13 +170,13 @@
<!-- save & reset preferences -->
<div class="post-search-item">
<div class="dropdown">
- <a class="btn btn-light btn-sm border border-gray-300 dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">[[search:save]] <span class="caret text-primary opacity-75"></span>
+ <a class="btn btn-light btn-sm border border-gray-300 dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{tx("search:save")}} <span class="caret text-primary opacity-75"></span>
</a>
<ul class="dropdown-menu p-1 text-sm" style="width: 300px;" role="menu">
<li class="px-2 py-1 d-flex flex-column gap-2">
- <button id="save-preferences" class="btn btn-sm btn-primary">[[search:save-preferences]]</button>
- <button id="clear-preferences" class="btn btn-sm btn-ghost border">[[search:clear-preferences]]</button>
+ <button id="save-preferences" class="btn btn-sm btn-primary">{{tx("search:save-preferences")}}</button>
+ <button id="clear-preferences" class="btn btn-sm btn-ghost border">{{tx("search:clear-preferences")}}</button>
</li>
</ul>
</div>
diff --git a/src/views/partials/search/results.tpl b/src/views/partials/search/results.tpl
index 0b198cc68e..e81add4f2b 100644
--- a/src/views/partials/search/results.tpl
+++ b/src/views/partials/search/results.tpl
@@ -2,7 +2,7 @@
<div class="card card-header text-xs px-2 py-1 fw-semibold border-0 align-self-start">{{tx("search:results-matching", matchCount, txEscape(search_query), time)}}</div>
{{{ else }}}
{{{ if search_query }}}
-<div class="badge text-bg-warning align-self-start">[[search:no-matches]]</div>
+<div class="badge text-bg-warning align-self-start">{{tx("search:no-matches")}}</div>
{{{ end }}}
{{{ end }}}
diff --git a/src/views/partials/tags/filter-dropdown-content.tpl b/src/views/partials/tags/filter-dropdown-content.tpl
index 3bd0d836fd..49237ed4cd 100644
--- a/src/views/partials/tags/filter-dropdown-content.tpl
+++ b/src/views/partials/tags/filter-dropdown-content.tpl
@@ -6,19 +6,19 @@
</span>
{{{ else }}}
<i class="fa fa-fw fa-tags text-primary"></i>
- <span class="visible-md-inline visible-lg-inline fw-semibold">[[tags:all-tags]]</span>
+ <span class="visible-md-inline visible-lg-inline fw-semibold">{{tx("tags:all-tags")}}</span>
{{{ end }}}
</button>
<div class="dropdown-menu p-1">
<div component="tag/filter/search" class="p-1 hidden">
- <input type="text" class="form-control form-control-sm" placeholder="[[search:type-to-search]]" autocomplete="off">
+ <input type="text" class="form-control form-control-sm" placeholder="{{tx("search:type-to-search")}}" autocomplete="off">
<hr class="mt-2 mb-0"/>
</div>
<ul component="tag/filter/list" class="list-unstyled mb-0 text-sm overflow-auto ghost-scrollbar" role="menu" style="max-height: 500px;" role="menu">
<li role="presentation" data-tag="">
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="#">
- <span class="flex-grow-1">[[tags:all-tags]]</span>
+ <span class="flex-grow-1">{{tx("tags:all-tags")}}</span>
<i component="tag/select/icon" class="flex-shrink-0 fa fa-fw fa-check {{{if selectedTag }}}invisible{{{ end }}}"></i>
</a>
</li>
diff --git a/src/views/partials/tags/watch.tpl b/src/views/partials/tags/watch.tpl
index 75f5ebbb3c..6a5861d806 100644
--- a/src/views/partials/tags/watch.tpl
+++ b/src/views/partials/tags/watch.tpl
@@ -3,12 +3,12 @@
<button class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center dropdown-toggle h-100" data-bs-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
<span component="tag/following/menu" class="d-flex gap-2 align-items-center{{{ if !isFollowing }}} hidden{{{ end }}}">
<i class="flex-shrink-0 fa fa-fw fa-bell-o text-primary"></i>
- <span class="d-none d-md-inline fw-semibold">[[tags:watching]]</span>
+ <span class="d-none d-md-inline fw-semibold">{{tx("tags:watching")}}</span>
</span>
<span component="tag/not-following/menu" class="d-flex gap-2 align-items-center{{{ if isFollowing}}} hidden{{{ end }}}">
<i class="flex-shrink-0 fa fa-fw fa-bell-slash-o text-primary"></i>
- <span class="d-none d-md-inline fw-semibold">[[tags:not-watching]]</span>
+ <span class="d-none d-md-inline fw-semibold">{{tx("tags:not-watching")}}</span>
</span>
</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
@@ -17,9 +17,9 @@
<div class="flex-grow-1 d-flex flex-column">
<span class="d-flex align-items-center gap-2">
<i class="flex-shrink-0 fa fa-fw fa-bell-o"></i>
- <span class="flex-grow-1 fw-semibold">[[tags:watching]]</span>
+ <span class="flex-grow-1 fw-semibold">{{tx("tags:watching")}}</span>
</span>
- <div class="help-text text-muted text-xs">[[tags:watching.description]]</div>
+ <div class="help-text text-muted text-xs">{{tx("tags:watching.description")}}</div>
</div>
<span class="flex-shrink-0"><i component="tag/following/check" class="fa fa-fw {{{ if isFollowing }}}fa-check{{{ end }}}"></i></span>
</a>
@@ -30,9 +30,9 @@
<div class="flex-grow-1 d-flex flex-column">
<span class="d-flex align-items-center gap-2">
<i class="flex-shrink-0 fa fa-fw fa-bell-slash-o"></i>
- <span class="flex-grow-1 fw-semibold">[[tags:not-watching]]</span>
+ <span class="flex-grow-1 fw-semibold">{{tx("tags:not-watching")}}</span>
</span>
- <div class="help-text text-muted text-xs">[[tags:not-watching.description]]</div>
+ <div class="help-text text-muted text-xs">{{tx("tags:not-watching.description")}}</div>
</div>
<span class="flex-shrink-0"><i component="tag/not-following/check" class="fa fa-fw {{{ if !isFollowing }}}fa-check{{{ end }}}"></i></span>
</a>
diff --git a/src/views/partials/topic/deleted-message.tpl b/src/views/partials/topic/deleted-message.tpl
index 32ccc09267..cd7b2593e9 100644
--- a/src/views/partials/topic/deleted-message.tpl
+++ b/src/views/partials/topic/deleted-message.tpl
@@ -1,5 +1,5 @@
<div component="topic/deleted/message" class="alert alert-warning d-flex justify-content-between flex-wrap{{{ if !deleted }}} hidden{{{ end }}}">
- <span>[[topic:deleted-message]]</span>
+ <span>{{tx("topic:deleted-message")}}</span>
<span>
{{{ if deleter }}}
<a class="fw-bold" href="{config.relative_path}/user/{deleter.userslug}">{deleter.username}</a> <small class="timeago" title="{deletedTimestampISO}"></small>
diff --git a/src/views/partials/topic/forked-message.tpl b/src/views/partials/topic/forked-message.tpl
index c4c3795693..10e12ffc21 100644
--- a/src/views/partials/topic/forked-message.tpl
+++ b/src/views/partials/topic/forked-message.tpl
@@ -1,5 +1,5 @@
<div component="topic/forked/message" class="alert alert-info d-flex justify-content-between flex-wrap">
- <span>[[topic:forked-message, {config.relative_path}/topic/{forkedFromTid}, {forker.forkedFromTitle}]]</span>
+ <span>{{tx("topic:forked-message", concat(config.relative_path, "/topic/", forkedFromTid), forker.forkedFromTitle)}}</span>
<span>
<a class="fw-bold" href="{config.relative_path}/user/{forker.userslug}">{forker.username}</strong></a> <small class="timeago" title="{forkTimestampISO}"></small>
</span>
diff --git a/src/views/partials/topic/guest-cta.tpl b/src/views/partials/topic/guest-cta.tpl
index 506cabc82f..d104aec892 100644
--- a/src/views/partials/topic/guest-cta.tpl
+++ b/src/views/partials/topic/guest-cta.tpl
@@ -1,9 +1,9 @@
<div id="guest-cta-alert" class="alert alert-warning alert-dismissible fade show guest-cta-alert" role="alert">
- <p><strong>[[topic:guest-cta.title]]</strong></p>
- <p>[[topic:guest-cta.message]]</p>
- <p>[[topic:guest-cta.closing]]</p>
- <a href="{config.relative_path}/register" class="fw-semibold btn btn-sm btn-warning">[[global:register]]</a>
- <a href="{config.relative_path}/login" class="fw-semibold btn btn-sm btn-info">[[global:login]]</a>
+ <p><strong>{{tx("topic:guest-cta.title")}}</strong></p>
+ <p>{{tx("topic:guest-cta.message")}}</p>
+ <p>{{tx("topic:guest-cta.closing")}}</p>
+ <a href="{config.relative_path}/register" class="fw-semibold btn btn-sm btn-warning">{{tx("global:register")}}</a>
+ <a href="{config.relative_path}/login" class="fw-semibold btn btn-sm btn-info">{{tx("global:login")}}</a>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<script>
diff --git a/src/views/partials/topic/post-menu-list.tpl b/src/views/partials/topic/post-menu-list.tpl
index e572e81f82..b7e26b45c1 100644
--- a/src/views/partials/topic/post-menu-list.tpl
+++ b/src/views/partials/topic/post-menu-list.tpl
@@ -1,25 +1,25 @@
{{{ if posts.display_moderator_tools }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/edit" role="menuitem" href="#">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-pencil"></i></span> [[topic:edit]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-pencil"></i></span> {{tx("topic:edit")}}
</a>
</li>
{{{ if posts.display_delete_tools }}}
<li {{{ if posts.deleted }}}hidden{{{ end }}}>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/delete" role="menuitem" href="#" class="{{{ if posts.deleted }}}hidden{{{ end }}}">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-trash-o"></i></span> [[topic:delete]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-trash-o"></i></span> {{tx("topic:delete")}}
</a>
</li>
<li {{{ if !posts.deleted }}}hidden{{{ end }}}>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/restore" role="menuitem" href="#" class="{{{ if !posts.deleted }}}hidden{{{ end }}}">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-history"></i></span> [[topic:restore]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-history"></i></span> {{tx("topic:restore")}}
</a>
</li>
{{{ end }}}
{{{ if posts.display_purge_tools }}}
<li {{{ if !posts.deleted }}}hidden{{{ end }}}>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/purge" role="menuitem" href="#" class="{{{ if !posts.deleted }}}hidden{{{ end }}}">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-eraser"></i></span> [[topic:purge]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-eraser"></i></span> {{tx("topic:purge")}}
</a>
</li>
{{{ end }}}
@@ -27,7 +27,7 @@
{{{ if posts.display_move_tools }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/move" role="menuitem" href="#">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-arrows"></i></span> [[topic:move]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-arrows"></i></span> {{tx("topic:move")}}
</a>
</li>
{{{ end }}}
@@ -35,7 +35,7 @@
{{{ if posts.display_change_owner_tools }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/change-owner" role="menuitem" href="#">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-user"></i></span> [[topic:change-owner]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-user"></i></span> {{tx("topic:change-owner")}}
</a>
</li>
{{{ end }}}
@@ -43,7 +43,7 @@
{{{ if posts.display_manage_editors_tools }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/manage-editors" role="menuitem" href="#">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-user-pen"></i></span> [[topic:manage-editors]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-user-pen"></i></span> {{tx("topic:manage-editors")}}
</a>
</li>
{{{ end }}}
@@ -51,13 +51,13 @@
{{{ if posts.ip }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/copy-ip" role="menuitem" href="#" data-clipboard-text="{posts.ip}">
- <span class="menu-icon" ><i class="fa fa-fw text-secondary fa-copy"></i></span> [[topic:copy-ip]] {posts.ip}
+ <span class="menu-icon" ><i class="fa fa-fw text-secondary fa-copy"></i></span> {{tx("topic:copy-ip")}} {posts.ip}
</a>
</li>
{{{ if posts.display_ip_ban }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/ban-ip" role="menuitem" href="#" data-ip="{posts.ip}">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-ban"></i></span> [[topic:ban-ip]] {posts.ip}
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-ban"></i></span> {{tx("topic:ban-ip")}} {posts.ip}
</a>
</li>
{{{ end }}}
@@ -76,7 +76,7 @@
{{{ if posts.display_history}}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/view-history" role="menuitem" href="#">
- <span class="menu-icon"><i class="fa fa-fw text-secondary fa-history"></i></span> [[topic:view-history]]
+ <span class="menu-icon"><i class="fa fa-fw text-secondary fa-history"></i></span> {{tx("topic:view-history")}}
</a>
</li>
{{{ end }}}
@@ -88,7 +88,7 @@
<i component="post/bookmark/on" class="fa fa-fw text-secondary fa-bookmark {{{ if !posts.bookmarked }}}hidden{{{ end }}}"></i>
<i component="post/bookmark/off" class="fa fa-fw text-secondary fa-bookmark-o {{{ if posts.bookmarked }}}hidden{{{ end }}}"></i>
</span>
- <span class="bookmark-text">[[topic:bookmark]]</span>
+ <span class="bookmark-text">{{tx("topic:bookmark")}}</span>
<span component="post/bookmark-count" class="bookmarkCount badge bg-secondary" data-bookmarks="{posts.bookmarks}">{posts.bookmarks}</span>&nbsp;
</a>
</li>
@@ -98,25 +98,25 @@
{{{ if !posts.display_original_url }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="#" data-clipboard-text="{posts.absolute_url}">
- <i class="fa fa-fw text-secondary fa-link"></i> [[topic:copy-permalink]]
+ <i class="fa fa-fw text-secondary fa-link"></i> {{tx("topic:copy-permalink")}}
</a>
</li>
{{{ else }}}
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="#" data-clipboard-text="{{{ if posts.url }}}{posts.url}{{{ else }}}{posts.pid}{{{ end }}}">
- <i class="fa fa-fw text-secondary fa-link"></i> [[topic:copy-permalink]]
+ <i class="fa fa-fw text-secondary fa-link"></i> {{tx("topic:copy-permalink")}}
</a>
</li>
<li>
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" target="_self" href="{{{ if posts.url }}}{posts.url}{{{ else }}}{posts.pid}{{{ end }}}">
- <i class="fa fa-fw text-secondary fa-external-link"></i> [[topic:go-to-original]]
+ <i class="fa fa-fw text-secondary fa-external-link"></i> {{tx("topic:go-to-original")}}
</a>
</li>
{{{ end }}}
{{{ if postSharing.length }}}
{{{ if config.loggedIn }}}<li class="dropdown-divider"></li>{{{ end }}}
- <li class="dropdown-header">[[topic:share-this-post]]</li>
+ <li class="dropdown-header">{{tx("topic:share-this-post")}}</li>
{{{ end }}}
<li class="d-flex gap-2 px-3">
{{{ each postSharing }}}
@@ -129,15 +129,15 @@
<li class="dropdown-divider"></li>
<li {{{ if posts.flags.flagged }}}hidden{{{ end }}}>
- <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flag" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-flag"></i> [[topic:flag-post]]</a>
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flag" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-flag"></i> {{tx("topic:flag-post")}}</a>
</li>
<li {{{ if !posts.flags.flagged }}}hidden{{{ end }}} class="disabled text-secondary">
- <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/already-flagged" role="menuitem" href="#" data-flag-id="{posts.flagId}"><i class="fa fa-fw text-secondary fa-flag"></i> [[topic:already-flagged]]</a>
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/already-flagged" role="menuitem" href="#" data-flag-id="{posts.flagId}"><i class="fa fa-fw text-secondary fa-flag"></i> {{tx("topic:already-flagged")}}</a>
</li>
{{{ if (!posts.selfPost && posts.uid) }}}
<li>
- <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flagUser" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-flag"></i> [[topic:flag-user]]</a>
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flagUser" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-flag"></i> {{tx("topic:flag-user")}}</a>
</li>
{{{ end }}}
{{{ end }}}
@@ -145,11 +145,11 @@
{{{ if posts.display_moderator_tools }}}
{{{ if posts.flags.exists }}}
<li>
- <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/flags/{posts.flags.flagId}"><i class="fa fa-fw text-secondary fa-exclamation-circle"></i> [[topic:view-flag-report]]</a>
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/flags/{posts.flags.flagId}"><i class="fa fa-fw text-secondary fa-exclamation-circle"></i> {{tx("topic:view-flag-report")}}</a>
</li>
{{{ if (posts.flags.state == "open") }}}
<li>
- <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flagResolve" data-flagId="{posts.flags.flagId}" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-check"></i> [[topic:resolve-flag]]</a>
+ <a class="dropdown-item rounded-1 d-flex align-items-center gap-2" component="post/flagResolve" data-flagId="{posts.flags.flagId}" role="menuitem" href="#"><i class="fa fa-fw text-secondary fa-check"></i> {{tx("topic:resolve-flag")}}</a>
</li>
{{{ end }}}
{{{ end }}}
diff --git a/src/views/partials/users/filter-dropdown-content.tpl b/src/views/partials/users/filter-dropdown-content.tpl
index 2ea8fa943c..963397ad50 100644
--- a/src/views/partials/users/filter-dropdown-content.tpl
+++ b/src/views/partials/users/filter-dropdown-content.tpl
@@ -2,13 +2,13 @@
{{{ if selectedUser }}}
<span class="fw-semibold">{{buildAvatar(selectedUser, "20px", true, "not-responsive")}} {selectedUser.username}</span>
{{{ else }}}
- <span class="fw-semibold">[[users:all-users]]</span>
+ <span class="fw-semibold">{{tx("users:all-users")}}</span>
{{{ end }}} <span class="caret text-primary opacity-75"></span>
</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
<li role="presentation" class="user {{{ if !selectedUser}}}selected{{{end}}}">
<a class="dropdown-item rounded-1 d-flex align-items-center gap-2" role="menuitem" href="{config.relative_path}/{allUsersUrl}">
- <div class="flex-grow-1">[[users:all-users]]</div>
+ <div class="flex-grow-1">{{tx("users:all-users")}}</div>
<i class="flex-shrink-0 fa fa-fw {{{ if !selectedUser }}}fa-check{{{ end }}}"></i>
</a>
</li>
diff --git a/src/views/post-queue.tpl b/src/views/post-queue.tpl
index 82bd668d59..7e46237865 100644
--- a/src/views/post-queue.tpl
+++ b/src/views/post-queue.tpl
@@ -2,13 +2,13 @@
{{{ if isAdmin }}}
{{{ if !enabled }}}
<div class="alert alert-info">
- [[post-queue:enabling-help, {config.relative_path}/admin/settings/post#post-queue]]
+ {{tx("post-queue:enabling-help", concat(config.relative_path, "/admin/settings/post#post-queue"))}}
</div>
{{{ end }}}
{{{ else }}}
<div>
- <p class="lead">[[post-queue:public-intro]]</p>
- <p>[[post-queue:public-description]]</p>
+ <p class="lead">{{tx("post-queue:public-intro")}}</p>
+ <p>{{tx("post-queue:public-description")}}</p>
<hr />
</div>
{{{ end }}}
@@ -21,18 +21,18 @@
<div class="dropdown bottom-sheet" component="post-queue/bulk-actions">
<button type="button" class="btn btn-ghost btn-sm ff-secondary dropdown-toggle d-flex align-items-center gap-2" data-bs-toggle="dropdown" autocomplete="off" aria-haspopup="true" aria-expanded="false">
- <i class="fa fa-clone text-primary"></i><span class="fw-semibold"> [[post-queue:bulk-actions]]</span>
+ <i class="fa fa-clone text-primary"></i><span class="fw-semibold"> {{tx("post-queue:bulk-actions")}}</span>
</button>
<ul class="dropdown-menu p-1 text-sm dropdown-menu-end" role="menu">
{{{ if canAccept }}}
- <li><a class="dropdown-item rounded-1" href="#" data-action="accept-all" role="menuitem">[[post-queue:accept-all]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="accept-selected" role="menuitem">[[post-queue:accept-selected]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="accept-all" role="menuitem">{{tx("post-queue:accept-all")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="accept-selected" role="menuitem">{{tx("post-queue:accept-selected")}}</a></li>
<li class="dropdown-divider"></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="reject-all" role="menuitem">[[post-queue:reject-all]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="reject-selected" role="menuitem">[[post-queue:reject-selected]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="reject-all" role="menuitem">{{tx("post-queue:reject-all")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="reject-selected" role="menuitem">{{tx("post-queue:reject-selected")}}</a></li>
{{{ else }}}
- <li><a class="dropdown-item rounded-1" href="#" data-action="reject-all" role="menuitem">[[post-queue:remove-all]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="reject-selected" role="menuitem">[[post-queue:remove-selected]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="reject-all" role="menuitem">{{tx("post-queue:remove-all")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="reject-selected" role="menuitem">{{tx("post-queue:remove-selected")}}</a></li>
{{{ end }}}
</ul>
</div>
@@ -47,14 +47,14 @@
<div class="mx-auto p-4 bg-light border rounded">
<i class="text-secondary fa fa-fw fa-4x fa-seedling"></i>
</div>
- [[post-queue:no-queued-posts]]
+ {{tx("post-queue:no-queued-posts")}}
</div>
</div>
{{{ else }}}
<div class="alert alert-info d-flex align-items-md-center d-flex flex-column flex-md-row">
- <p class="mb-md-0">[[post-queue:no-single-post]]</p>
+ <p class="mb-md-0">{{tx("post-queue:no-single-post")}}</p>
<div class="d-grid ms-md-auto">
- <a class="btn btn-sm btn-primary flex-shrink text-nowrap" href=".">[[post-queue:back-to-list]]</a>
+ <a class="btn btn-sm btn-primary flex-shrink text-nowrap" href=".">{{tx("post-queue:back-to-list")}}</a>
</div>
</div>
{{{ end }}}
@@ -71,39 +71,39 @@
{{{ end }}}
<label for="{./id}" class="small stretched-link">
{{{ if posts.data.crosspostCid }}}
- [[post-queue:crosspost]]
+ {{tx("post-queue:crosspost")}}
{{{ else }}}
- {{{ if posts.data.tid }}}[[post-queue:reply]]{{{ end }}}
- {{{ if posts.data.cid }}}[[post-queue:topic]]{{{ end }}}
+ {{{ if posts.data.tid }}}{{tx("post-queue:reply")}}{{{ end }}}
+ {{{ if posts.data.cid }}}{{tx("post-queue:topic")}}{{{ end }}}
{{{ end }}}
</label>
</li>
<li class="card-body d-flex flex-column gap-1 border-bottom">
<div class="d-flex text-xs fw-semibold align-items-center">
- [[post-queue:user]]
+ {{tx("post-queue:user")}}
{{{ if ((privileges.ban || privileges.mute) || privileges.admin:users) }}}
<div class="ms-auto dropdown bottom-sheet">
- <button href="#" class="btn btn-ghost btn-sm ff-secondary border text-xs dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">[[global:actions]]</button>
+ <button href="#" class="btn btn-ghost btn-sm ff-secondary border text-xs dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{tx("global:actions")}}</button>
<ul class="dropdown-menu p-1 text-sm" role="menu">
{{{ if ./canAccept }}}
- <li><a class="dropdown-item rounded-1" data-action="notify"> [[post-queue:notify]]</a></li>
+ <li><a class="dropdown-item rounded-1" data-action="notify"> {{tx("post-queue:notify")}}</a></li>
<li class="dropdown-divider"></li>
{{{ end }}}
{{{ if privileges.view:users:info }}}
- <li><a class="dropdown-item rounded-1" href="{config.relative_path}/user/{./user.userslug}/info" role="menuitem">[[user:account-info]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="{config.relative_path}/user/{./user.userslug}/info" role="menuitem">{{tx("user:account-info")}}</a></li>
{{{ end }}}
{{{ if privileges.ban }}}
- <li class="{{{ if target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="ban" role="menuitem">[[user:ban-account]]</a></li>
- <li class="{{{ if !target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unban" role="menuitem">[[user:unban-account]]</a></li>
+ <li class="{{{ if target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="ban" role="menuitem">{{tx("user:ban-account")}}</a></li>
+ <li class="{{{ if !target.user.banned }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unban" role="menuitem">{{tx("user:unban-account")}}</a></li>
{{{ end }}}
{{{ if privileges.mute}}}
- <li class="{{{ if target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="mute" role="menuitem">[[user:mute-account]]</a></li>
- <li class="{{{ if !target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unmute" role="menuitem">[[user:unmute-account]]</a></li>
+ <li class="{{{ if target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="mute" role="menuitem">{{tx("user:mute-account")}}</a></li>
+ <li class="{{{ if !target.user.muted }}}hidden{{{ end }}}"><a class="dropdown-item rounded-1" href="#" data-action="unmute" role="menuitem">{{tx("user:unmute-account")}}</a></li>
{{{ end }}}
{{{ if privileges.admin:users }}}
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-account" role="menuitem">[[user:delete-account-as-admin]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-content" role="menuitem">[[user:delete-content]]</a></li>
- <li><a class="dropdown-item rounded-1" href="#" data-action="delete-all" role="menuitem">[[user:delete-all]]</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-account" role="menuitem">{{tx("user:delete-account-as-admin")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-content" role="menuitem">{{tx("user:delete-content")}}</a></li>
+ <li><a class="dropdown-item rounded-1" href="#" data-action="delete-all" role="menuitem">{{tx("user:delete-all")}}</a></li>
{{{ end }}}
</ul>
</div>
@@ -119,29 +119,29 @@
<div>
<span class="badge text-body border border-gray-300 stats text-xs">
<span title="{posts.user.postcount}" class="fw-bold">{humanReadableNumber(posts.user.postcount)}</span>
- <span class="text-lowercase fw-normal">[[global:posts]]</span>
+ <span class="text-lowercase fw-normal">{{tx("global:posts")}}</span>
</span>
<span class="badge text-body border border-gray-300 stats text-xs">
<span title="{posts.user.reputation}" class="fw-bold">{humanReadableNumber(posts.user.reputation)}</span>
- <span class="text-lowercase fw-normal">[[global:reputation]]</span>
+ <span class="text-lowercase fw-normal">{{tx("global:reputation")}}</span>
</span>
<span class="badge text-body border border-gray-300 stats text-xs">
- <span class="text-lowercase fw-normal">[[user:joined]]</span>
+ <span class="text-lowercase fw-normal">{{tx("user:joined")}}</span>
<span title="{posts.user.joindateISO}" class="timeago fw-bold"></span>
</span>
</div>
</li>
<li class="card-body border-bottom">
- <div class="text-xs fw-semibold mb-1">[[post-queue:when]]</div>
+ <div class="text-xs fw-semibold mb-1">{{tx("post-queue:when")}}</div>
<span class="small timeago" title={posts.data.timestampISO}></span>
</li>
<li class="card-body border-bottom">
<div class="d-flex align-items-center justify-content-between mb-1">
<span class="text-xs fw-semibold">
- {{{ if posts.data.tid }}}[[post-queue:topic]]{{{ else }}}[[post-queue:title]]{{{ end }}}
+ {{{ if posts.data.tid }}}{{tx("post-queue:topic")}}{{{ else }}}{{tx("post-queue:title")}}{{{ end }}}
</span>
{{{ if !posts.data.tid }}}
- <button data-action="editTitle" class="btn btn-ghost btn-sm ff-secondary border text-xs">[[post-queue:edit]]</button>
+ <button data-action="editTitle" class="btn btn-ghost btn-sm ff-secondary border text-xs">{{tx("post-queue:edit")}}</button>
{{{ end }}}
</div>
<span class="small topic-title text-break">
@@ -149,7 +149,7 @@
<div class="d-flex flex-column align-items-start gap-1">
<a href="{config.relative_path}/topic/{posts.data.tid}">{posts.topic.title}</a>
<span class="badge text-body border border-gray-300 stats text-xs">
- <span class="text-lowercase fw-normal">[[global:lastpost]]</span>
+ <span class="text-lowercase fw-normal">{{tx("global:lastpost")}}</span>
<span title="{posts.topic.lastposttimeISO}" class="timeago fw-bold"></span>
</span>
</div>
@@ -166,10 +166,10 @@
<li class="card-body border-bottom">
<div class="d-flex align-items-center justify-content-between mb-1">
<div class="text-xs fw-semibold">
- [[post-queue:category]]
+ {{tx("post-queue:category")}}
</div>
{{{ if posts.data.cid }}}
- <button data-action="editCategory" class="btn btn-ghost btn-sm ff-secondary border text-xs">[[post-queue:edit]]</button>
+ <button data-action="editCategory" class="btn btn-ghost btn-sm ff-secondary border text-xs">{{tx("post-queue:edit")}}</button>
{{{ end }}}
</div>
@@ -187,9 +187,9 @@
<li class="card-body border-bottom" data-crosspost>
<div class="d-flex align-items-center justify-content-between mb-1">
<div class="text-xs fw-semibold">
- [[post-queue:crosspost-to]]
+ {{tx("post-queue:crosspost-to")}}
</div>
- <button data-action="editCategory" class="btn btn-ghost btn-sm ff-secondary border text-xs">[[post-queue:edit]]</button>
+ <button data-action="editCategory" class="btn btn-ghost btn-sm ff-secondary border text-xs">{{tx("post-queue:edit")}}</button>
</div>
<div class="topic-category">
@@ -207,10 +207,10 @@
<li class="card-body border-bottom">
<div class="d-flex align-items-center justify-content-between mb-1">
<div class="text-xs fw-semibold">
- [[post-queue:tags]]
+ {{tx("post-queue:tags")}}
</div>
- <button data-action="editTags" class="btn btn-ghost btn-sm ff-secondary border text-xs">[[post-queue:edit]]</button>
+ <button data-action="editTags" class="btn btn-ghost btn-sm ff-secondary border text-xs">{{tx("post-queue:edit")}}</button>
</div>
<div class="tag-list">
{{{ each posts.data.tags }}}
@@ -227,14 +227,14 @@
<div class="row row-cols-2 g-1">
{{{ if ./canAccept }}}
<div class="col d-grid">
- <button class="btn btn-success btn-sm" data-action="accept"><i class="fa fa-fw fa-check"></i> [[post-queue:accept]] </button>
+ <button class="btn btn-success btn-sm" data-action="accept"><i class="fa fa-fw fa-check"></i> {{tx("post-queue:accept")}} </button>
</div>
<div class="col d-grid">
- <button class="btn btn-danger btn-sm" data-action="reject"><i class="fa fa-fw fa-times"></i> [[post-queue:reject]]</button>
+ <button class="btn btn-danger btn-sm" data-action="reject"><i class="fa fa-fw fa-times"></i> {{tx("post-queue:reject")}}</button>
</div>
{{{ else }}}
<div class="col d-grid">
- <button class="btn btn-danger btn-sm" data-action="reject"><i class="fa fa-fw fa-times"></i> [[post-queue:remove]]</button>
+ <button class="btn btn-danger btn-sm" data-action="reject"><i class="fa fa-fw fa-times"></i> {{tx("post-queue:remove")}}</button>
</div>
{{{ end }}}
</div>
@@ -244,30 +244,30 @@
<div class="col-lg-9 d-flex flex-column">
<div class="d-flex align-items-center justify-content-between mb-1 px-3 pt-3 pb-1">
<div class="text-xs fw-semibold">
- [[post-queue:content]]
+ {{tx("post-queue:content")}}
</div>
{{{ if ./canEdit }}}
- <button data-action="editContent" class="btn btn-ghost btn-sm ff-secondary border text-xs">[[post-queue:edit]]</button>
+ <button data-action="editContent" class="btn btn-ghost btn-sm ff-secondary border text-xs">{{tx("post-queue:edit")}}</button>
{{{ end }}}
</div>
- <div class="post-content mb-auto text-break px-3 py-0 px-1 h-100">{{txEscape(posts.data.content)}}</div>
+ <div class="post-content mb-auto text-break px-3 py-0 px-1 h-100">{{posts.data.content}}</div>
<div class="post-content-editable flex-grow-1 hidden px-2">
<textarea class="form-control w-100 h-100 px-2">{posts.data.rawContent}</textarea>
</div>
<div component="post-queue/link-container" class="hidden border-top mx-3 py-3">
- <label class="text-secondary form-text mb-2">[[post-queue:links-in-this-post]]</label>
+ <label class="text-secondary form-text mb-2">{{tx("post-queue:links-in-this-post")}}</label>
<ul component="post-queue/link-container/list" class="text-sm"></ul>
</div>
{{{ if (posts.type == "topic") }}}
<div class="border-top mx-3 py-3">
- <label class="text-secondary form-text mb-2">[[post-queue:thumbs-in-this-post]]</label>
+ <label class="text-secondary form-text mb-2">{{tx("post-queue:thumbs-in-this-post")}}</label>
<div class="thumb-list d-flex gap-3 flex-wrap">
{{{ each posts.data.thumbs }}}
<div class="position-relative">
<a class="d-inline-block" href="#">
<img class="rounded-1 bg-light" style="width:auto; max-width: 5.33rem; height: 3.33rem; object-fit: contain;" src="{@value}" />
</a>
- <a href="#" data-action="removeThumb" class="link-danger position-absolute btn shadow-none top-0 start-100 translate-middle p-1"><i class="fa-solid fa-circle-xmark"></i></button>
+ <a href="#" data-action="removeThumb" class="link-danger position-absolute btn shadow-none top-0 start-100 translate-middle p-1"><i class="fa-solid fa-circle-xmark"></i></a>
</div>
{{{ end }}}
<a class="btn btn-ghost d-inline-block p-0" href="#" data-action="uploadThumb">
diff --git a/src/views/register.tpl b/src/views/register.tpl
index 40734d180a..4b08e6276f 100644
--- a/src/views/register.tpl
+++ b/src/views/register.tpl
@@ -5,37 +5,37 @@
</div>
<div class="row register flex-fill">
<div class="d-flex flex-column gap-2 {{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
- <h2 class="tracking-tight fw-semibold text-center">[[global:register]]</h2>
+ <h2 class="tracking-tight fw-semibold text-center">{{tx("global:register")}}</h2>
<div class="row justify-content-center gap-5">
<div class="col-12 col-md-5 col-lg-3 px-md-0">
<div class="register-block">
<form component="register/local" class="d-flex flex-column gap-3" role="form" action="{config.relative_path}/register" method="post">
<div class="mb-2 d-flex flex-column gap-2">
- <label for="username">[[register:username]]</label>
+ <label for="username">{{tx("register:username")}}</label>
<div class="d-flex flex-column">
- <input class="form-control" type="text" placeholder="[[register:username-placeholder]]" name="username" id="username" autocorrect="off" autocapitalize="off" autocomplete="nickname" aria-required="true" aria-describedby="username-notify"/>
+ <input class="form-control" type="text" placeholder="{{tx("register:username-placeholder")}}" name="username" id="username" autocorrect="off" autocapitalize="off" autocomplete="nickname" aria-required="true" aria-describedby="username-notify"/>
<span class="register-feedback text-xs text-danger" id="username-notify" aria-live="polite"></span>
- <span class="form-text text-xs">[[register:help.username-restrictions, {minimumUsernameLength}, {maximumUsernameLength}]]</span>
+ <span class="form-text text-xs">{{tx("register:help.username-restrictions", minimumUsernameLength, maximumUsernameLength)}}</span>
</div>
</div>
<div class="mb-2 d-flex flex-column gap-2">
- <label for="password">[[register:password]]</label>
+ <label for="password">{{tx("register:password")}}</label>
<div class="d-flex flex-column">
- <input class="form-control" type="password" placeholder="[[register:password-placeholder]]" name="password" id="password" autocomplete="new-password" autocapitalize="off" aria-required="true" aria-describedby="password-notify"/>
+ <input class="form-control" type="password" placeholder="{{tx("register:password-placeholder")}}" name="password" id="password" autocomplete="new-password" autocapitalize="off" aria-required="true" aria-describedby="password-notify"/>
<span class="register-feedback text-xs text-danger" id="password-notify" aria-live="polite"></span>
- <span class="form-text text-xs">[[register:help.minimum-password-length, {minimumPasswordLength}]]</span>
+ <span class="form-text text-xs">{{tx("register:help.minimum-password-length", minimumPasswordLength)}}</span>
<p id="caps-lock-warning" class="text-danger hidden">
- <i class="fa fa-exclamation-triangle"></i> [[login:caps-lock-enabled]]
+ <i class="fa fa-exclamation-triangle"></i> {{tx("login:caps-lock-enabled")}}
</p>
</div>
</div>
<div class="mb-2 d-flex flex-column gap-2">
- <label for="password-confirm">[[register:confirm-password]]</label>
+ <label for="password-confirm">{{tx("register:confirm-password")}}</label>
<div>
- <input class="form-control" type="password" placeholder="[[register:confirm-password-placeholder]]" name="password-confirm" id="password-confirm" autocomplete="new-password" autocapitalize="off" aria-required="true" aria-describedby="password-confirm-notify"/>
+ <input class="form-control" type="password" placeholder="{{tx("register:confirm-password-placeholder")}}" name="password-confirm" id="password-confirm" autocomplete="new-password" autocapitalize="off" aria-required="true" aria-describedby="password-confirm-notify"/>
<span class="register-feedback text-xs text-danger" id="password-confirm-notify" aria-live="polite"></span>
</div>
</div>
@@ -47,21 +47,21 @@
</div>
{{{ end }}}
- <button class="btn btn-primary" id="register" type="submit">[[register:register-now-button]]</button>
+ <button class="btn btn-primary" id="register" type="submit">{{tx("register:register-now-button")}}</button>
<div class="alert alert-danger{{{ if !error }}} hidden{{{ end }}}" id="register-error-notify" role="alert" aria-atomic="true">
- <strong>[[error:registration-error]]</strong>
- <p class="mb-0">{error}</p>
+ <strong>{{tx("error:registration-error")}}</strong>
+ <p class="mb-0">{{tx(error)}}</p>
</div>
<hr/>
- <span class="text-sm">[[register:already-have-account]]</span>
- <a class="btn btn-outline-light text-body" href="{config.relative_path}/login">[[global:login]]</a>
+ <span class="text-sm">{{tx("register:already-have-account")}}</span>
+ <a class="btn btn-outline-light text-body" href="{config.relative_path}/login">{{tx("global:login")}}</a>
{{{ if osw_logins }}}
<button class="btn btn-outline-light text-body" id="ap-register-handle-btn" type="button">
- <i class="fa fa-share-alt"></i> [[login:manage-social-web-handles]]
+ <i class="fa fa-share-alt"></i> {{tx("login:manage-social-web-handles")}}
</button>
{{{ end }}}
@@ -78,7 +78,7 @@
{{{ if alternate_logins }}}
<div class="col-12 col-md-5 col-lg-3 px-md-0">
<div class="alt-register-block d-flex flex-column gap-2">
- <label>[[register:alternative-registration]]</label>
+ <label>{{tx("register:alternative-registration")}}</label>
<ul class="alt-logins list-unstyled">
{{{ each authentication }}}
<li class="{./name} mb-2">
diff --git a/src/views/registerComplete.tpl b/src/views/registerComplete.tpl
index 136c4c8578..39c85ab1df 100644
--- a/src/views/registerComplete.tpl
+++ b/src/views/registerComplete.tpl
@@ -1,13 +1,13 @@
<div class="row">
<div class="col-12 col-sm-8 offset-sm-2">
<h1 class="text-center fs-5">
- {{{ if register }}}[[register:interstitial.intro-new]]{{{ else }}}[[register:interstitial.intro]]{{{ end }}}
+ {{{ if register }}}{{tx("register:interstitial.intro-new")}}{{{ else }}}{{tx("register:interstitial.intro")}}{{{ end }}}
</h1>
{{{ if errors.length }}}
<div class="alert alert-warning">
<p>
- [[register:interstitial.errors-found]]
+ {{tx("register:interstitial.errors-found")}}
</p>
<ul>
{{{each errors}}}
@@ -36,8 +36,8 @@
<div class="row mt-3">
<div class="col-12 col-sm-8 offset-sm-2 d-grid">
- <button class="btn btn-primary">[[topic:composer.submit]]</button>
- <button class="btn btn-link" formaction="{config.relative_path}/register/abort">{{{ if register }}}[[register:cancel-registration]]{{{ else }}}[[modules:bootbox.cancel]]{{{ end }}}</button>
+ <button class="btn btn-primary">{{tx("topic:composer.submit")}}</button>
+ <button class="btn btn-link" formaction="{config.relative_path}/register/abort">{{{ if register }}}{{tx("register:cancel-registration")}}{{{ else }}}{{tx("modules:bootbox.cancel")}}{{{ end }}}</button>
</div>
</div>
</form>
diff --git a/src/views/registration-queue.tpl b/src/views/registration-queue.tpl
index bdf939c294..53d546735d 100644
--- a/src/views/registration-queue.tpl
+++ b/src/views/registration-queue.tpl
@@ -11,7 +11,7 @@
aria-controls="registration-queue-pane"
aria-selected="true"
>
- [[registration-queue:queue]]
+ {{tx("registration-queue:queue")}}
</button>
</li>
@@ -26,7 +26,7 @@
aria-controls="invitations-pane"
aria-selected="false"
>
- [[registration-queue:invitations]]
+ {{tx("registration-queue:invitations")}}
</button>
</li>
</ul>
@@ -41,7 +41,7 @@
>
{{{ if users.length }}}
<div class="text-end">
- <button data-action="reject-all" class="btn btn-sm btn-light ff-secondary">[[registration-queue:reject-all]]</button>
+ <button data-action="reject-all" class="btn btn-sm btn-light ff-secondary">{{tx("registration-queue:reject-all")}}</button>
</div>
{{{ end }}}
<div class="registration mb-3">
@@ -51,16 +51,16 @@
{{{ if queueEnabled }}}
{{{ end }}}
{{{ if !users.length }}}
- <p>[[registration-queue:no-users-in-queue]]</p>
+ <p>{{tx("registration-queue:no-users-in-queue")}}</p>
{{{ else }}}
<div class="table-responsive">
<table class="table table-sm text-sm users-list">
<thead>
<tr>
- <th>[[registration-queue:list.name]]</th>
- <th>[[registration-queue:list.email]]</th>
- <th class="hidden-xs">[[registration-queue:list.ip]]</th>
- <th class="hidden-xs">[[registration-queue:list.time]]</th>
+ <th>{{tx("registration-queue:list.name")}}</th>
+ <th>{{tx("registration-queue:list.email")}}</th>
+ <th class="hidden-xs">{{tx("registration-queue:list.ip")}}</th>
+ <th class="hidden-xs">{{tx("registration-queue:list.time")}}</th>
{{{ each customHeaders }}}
<th class="hidden-xs">{./label}</th>
{{{ end }}}
@@ -72,7 +72,7 @@
<tr data-username="{./username}" class="align-middle">
<td>
{{{ if ./usernameSpam }}}
- <i class="fa fa-times-circle text-danger" title="[[registration-queue:list.username-spam, {./spamData.username.frequency}, {./spamData.username.appears}, {./spamData.username.confidence}]]" data-bs-toggle="tooltip" data-bs-html="true"></i>
+ <i class="fa fa-times-circle text-danger" title="{{tx("registration-queue:list.username-spam", ./spamData.username.frequency, ./spamData.username.appears, ./spamData.username.confidence)}}" data-bs-toggle="tooltip" data-bs-html="true"></i>
{{{ else }}}
{{{ if ./spamChecked }}}
<i class="fa fa-check text-success"></i>
@@ -85,7 +85,7 @@
</td>
<td>
{{{ if ./emailSpam }}}
- <i class="fa fa-times-circle text-danger" title="[[registration-queue:list.email-spam, {./spamData.email.frequency}, {./spamData.email.appears}, {./spamData.email.confidence}]]" data-bs-toggle="tooltip" data-bs-html="true"></i>
+ <i class="fa fa-times-circle text-danger" title="{{tx("registration-queue:list.email-spam", ./spamData.email.frequency, ./spamData.email.appears, ./spamData.email.confidence)}}" data-bs-toggle="tooltip" data-bs-html="true"></i>
{{{ else }}}
{{{ if ./spamChecked }}}
<i class="fa fa-check text-success"></i>
@@ -96,7 +96,7 @@
<td class="hidden-xs">
<div class="d-flex gap-2 align-items-center">
{{{ if ./ipSpam }}}
- <i class="fa fa-times-circle text-danger" title="[[registration-queue:list.ip-spam, {./spamData.ip.frequency}, {./spamData.ip.appears}, {./spamData.ip.confidence}]]" data-bs-toggle="tooltip" data-bs-html="true"></i>
+ <i class="fa fa-times-circle text-danger" title="{{tx("registration-queue:list.ip-spam", ./spamData.ip.frequency, ./spamData.ip.appears, ./spamData.ip.confidence)}}" data-bs-toggle="tooltip" data-bs-html="true"></i>
{{{ else }}}
{{{ if ./spamChecked }}}
<i class="fa fa-check text-success"></i>
@@ -158,15 +158,15 @@
>
<div class="invitations">
<p class="">
- [[registration-queue:invitations.description]]
+ {{tx("registration-queue:invitations.description")}}
</p>
<div class="table-responsive">
<table class="table table-sm text-sm invites-list">
<thead>
<tr>
- <th>[[registration-queue:invitations.inviter-username]]</th>
- <th>[[registration-queue:invitations.invitee-email]]</th>
- <th>[[registration-queue:invitations.invitee-username]]</th>
+ <th>{{tx("registration-queue:invitations.inviter-username")}}</th>
+ <th>{{tx("registration-queue:invitations.invitee-email")}}</th>
+ <th>{{tx("registration-queue:invitations.invitee-username")}}</th>
</tr>
</thead>
<tbody>
diff --git a/src/views/reset.tpl b/src/views/reset.tpl
index b81537d491..344f7e59d5 100644
--- a/src/views/reset.tpl
+++ b/src/views/reset.tpl
@@ -1,24 +1,24 @@
<div class="flex-fill row justify-content-center">
<div class="col-12 col-md-5 col-lg-4 px-md-0">
<div class="alert alert-info">
- [[reset_password:enter-email]]
+ {{tx("reset_password:enter-email")}}
</div>
<div class="card card-body bg-light">
<div class="alert alert-success alert-dismissible hide" id="success">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
- [[reset_password:password-reset-sent]]
+ {{tx("reset_password:password-reset-sent")}}
</div>
<div class="alert alert-danger alert-dismissible hide" id="error">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
- [[reset_password:invalid-email]]
+ {{tx("reset_password:invalid-email")}}
</div>
<form onsubmit="return false;">
<div class="mb-3">
- <input type="email" class="form-control" id="email" placeholder="[[reset_password:enter-email-address]]" autocomplete="off">
+ <input type="email" class="form-control" id="email" placeholder="{{tx("reset_password:enter-email-address")}}" autocomplete="off">
</div>
<div class="d-grid">
- <button class="btn btn-primary" id="reset" type="submit">[[reset_password:reset-password]]</button>
+ <button class="btn btn-primary" id="reset" type="submit">{{tx("reset_password:reset-password")}}</button>
</div>
</form>
</div>
diff --git a/src/views/reset_code.tpl b/src/views/reset_code.tpl
index 94bbf9fe75..f14f295ce1 100644
--- a/src/views/reset_code.tpl
+++ b/src/views/reset_code.tpl
@@ -4,13 +4,13 @@
<div class="card card-body bg-light">
{{{ if displayExpiryNotice }}}
<div class="alert alert-warning">
- [[reset_password:password-expired]]
+ {{tx("reset_password:password-expired")}}
</div>
{{{ end }}}
<div class="alert alert-success alert-dismissible hidden" id="success">
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
- <strong>[[reset_password:password-changed.title]]</strong>
- <p>[[reset_password:password-changed.message]]</p>
+ <strong>{{tx("reset_password:password-changed.title")}}</strong>
+ <p>{{tx("reset_password:password-changed.message")}}</p>
</div>
<div class="alert alert-warning hidden" id="notice">
<strong></strong>
@@ -18,23 +18,23 @@
</div>
<form onsubmit="return false;" id="reset-form">
<div class="mb-3">
- <label class="form-label" for="password">[[reset_password:new-password]]</label>
- <input class="form-control" type="password" placeholder="[[reset_password:new-password]]" id="password" />
+ <label class="form-label" for="password">{{tx("reset_password:new-password")}}</label>
+ <input class="form-control" type="password" placeholder="{{tx("reset_password:new-password")}}" id="password" />
</div>
<div class="mb-3">
- <label class="form-label" for="repeat">[[reset_password:repeat-password]]</label>
- <input class="form-control" type="password" placeholder="[[reset_password:repeat-password]]" id="repeat" />
+ <label class="form-label" for="repeat">{{tx("reset_password:repeat-password")}}</label>
+ <input class="form-control" type="password" placeholder="{{tx("reset_password:repeat-password")}}" id="repeat" />
</div>
- <button class="btn btn-primary" id="reset" type="submit">[[reset_password:reset-password]]</button>
+ <button class="btn btn-primary" id="reset" type="submit">{{tx("reset_password:reset-password")}}</button>
</form>
</div>
{{{ else }}}
<div class="card">
<div class="card-header">
- <h5 class="mb-0">[[reset_password:wrong-reset-code.title]]</h5>
+ <h5 class="mb-0">{{tx("reset_password:wrong-reset-code.title")}}</h5>
</div>
<div class="card-body">
- <p>[[reset_password:wrong-reset-code.message]]</p>
+ <p>{{tx("reset_password:wrong-reset-code.message")}}</p>
</div>
</div>
{{{ end }}}
diff --git a/src/views/search.tpl b/src/views/search.tpl
index 242e5690fd..c76b86e706 100644
--- a/src/views/search.tpl
+++ b/src/views/search.tpl
@@ -3,35 +3,35 @@
<!-- sidebar -->
<div class="flex-shrink-0 pe-2 border-end-md text-sm mb-3" style="flex-basis: 240px!important;">
<form action="{config.relative_path}/search" method="get" class="nav sticky-md-top d-flex flex-row flex-md-column flex-wrap gap-3 pe-md-3" style="top: 1rem; z-index: 1;">
- <h2 class="fw-semibold tracking-tight mb-0">[[global:search]]</h2>
+ <h2 class="fw-semibold tracking-tight mb-0">{{tx("global:search")}}</h2>
- <input id="search-input" name="term" type="text" class="form-control fw-semibold py-2 ps-2 pe-3" id="search-input" placeholder="[[search:type-to-search]]">
+ <input id="search-input" name="term" type="text" class="form-control fw-semibold py-2 ps-2 pe-3" id="search-input" placeholder="{{tx("search:type-to-search")}}">
<select id="search-in" name="in" class="form-select text-sm py-2 ps-2 pe-3">
- <option value="titlesposts">[[search:in-titles-posts]]</option>
- <option value="titles">[[search:in-titles]]</option>
- <option value="posts">[[search:in-posts]]</option>
- <option value="bookmarks">[[search:in-bookmarks]]</option>
- <option value="categories">[[search:in-categories]]</option>
+ <option value="titlesposts">{{tx("search:in-titles-posts")}}</option>
+ <option value="titles">{{tx("search:in-titles")}}</option>
+ <option value="posts">{{tx("search:in-posts")}}</option>
+ <option value="bookmarks">{{tx("search:in-bookmarks")}}</option>
+ <option value="categories">{{tx("search:in-categories")}}</option>
{{{if privileges.search:users}}}
- <option value="users">[[search:in-users]]</option>
+ <option value="users">{{tx("search:in-users")}}</option>
{{{end}}}
{{{if privileges.search:tags}}}
- <option value="tags">[[search:in-tags]]</option>
+ <option value="tags">{{tx("search:in-tags")}}</option>
{{{end}}}
</select>
<select id="match-words-filter" name="matchWords" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
- <option value="all">[[search:match-all-words]]</option>
- <option value="any">[[search:match-any-word]]</option>
+ <option value="all">{{tx("search:match-all-words")}}</option>
+ <option value="any">{{tx("search:match-any-word")}}</option>
</select>
<select id="show-results-as" name="showAs" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
- <option value="posts" selected>[[search:show-results-as-posts]]</option>
- <option value="topics">[[search:show-results-as-topics]]</option>
+ <option value="posts" selected>{{tx("search:show-results-as-posts")}}</option>
+ <option value="topics">{{tx("search:show-results-as-topics")}}</option>
</select>
- <button type="submit" class="btn btn-primary fw-semibold form-control py-2 px-3">[[global:search]]</button>
+ <button type="submit" class="btn btn-primary fw-semibold form-control py-2 px-3">{{tx("global:search")}}</button>
</form>
</div>
diff --git a/src/views/tos.tpl b/src/views/tos.tpl
index ca62a206f4..c64b612552 100644
--- a/src/views/tos.tpl
+++ b/src/views/tos.tpl
@@ -1,4 +1,4 @@
-<h3>[[register:terms-of-use]]</h3>
+<h3>{{tx("register:terms-of-use")}}</h3>
<hr/>
{{termsOfUse}}
diff --git a/src/views/unsubscribe.tpl b/src/views/unsubscribe.tpl
index 2f9857864b..05e55eacff 100644
--- a/src/views/unsubscribe.tpl
+++ b/src/views/unsubscribe.tpl
@@ -1,15 +1,15 @@
{{{ if !error }}}
<div class="alert alert-success">
- <strong>[[global:alert.success]]</strong>
- <p>[[email:unsub.success, {payload.template}]]</p>
+ <strong>{{tx("global:alert.success")}}</strong>
+ <p>{{tx("email:unsub.success", payload.template)}}</p>
{{{ else }}}
<div class="alert alert-warning">
- <strong>[[email:unsub.failure.title]]</strong>
- <p>[[email:unsub.failure.message, {error}, {config.relative_path}/me/settings]]</p>
+ <strong>{{tx("email:unsub.failure.title")}}</strong>
+ <p>{{tx("email:unsub.failure.message", error, concat(config.relative_path, "/me/settings"))}}</p>
{{{ end }}}
<hr />
<p>
- <a href="{config.relative_path}/">[[notifications:back-to-home, {config.siteTitle}]]</a>
+ <a href="{config.relative_path}/">{{tx("notifications:back-to-home", config.siteTitle)}}</a>
</p>
</div>
\ No newline at end of file