fix: internationalize relay states

This commit is contained in:
Julian Lam
2025-08-27 12:20:36 -04:00
parent 28b63891d4
commit 6576468e2e
2 changed files with 6 additions and 5 deletions

View File

@@ -35,8 +35,9 @@
"relays.add": "Add New Relay",
"relays.relay": "Relay",
"relays.state": "State",
"relays.state-pending": "Pending",
"relays.state-active": "Active",
"relays.state-0": "Pending",
"relays.state-1": "Receiving only",
"relays.state-2": "Active",
"server-filtering": "Filtering",
"count": "This NodeBB is currently aware of <strong>%1</strong> server(s)",

View File

@@ -14,15 +14,15 @@ Relays.is = async (actor) => {
Relays.list = async () => {
let relays = await db.getSortedSetMembersWithScores('relays:state');
relays = relays.reduce((memo, { value, score }) => {
let state = 'Pending';
let state = '[[admin/settings/activitypub:relays.state-0]]';
switch(score) {
case 1: {
state = 'Establishing';
state = '[[admin/settings/activitypub:relays.state-1]]';
break;
}
case 2: {
state = 'Active';
state = '[[admin/settings/activitypub:relays.state-2]]';
break;
}
}