Skip to content

Node.js based forum software built for the modern web

fix: move ban/mute lang keys to the client

Barış Soner Uşaklı4a6bdcd85eb7
diff --git a/public/language/en-GB/admin/manage/users.json b/public/language/en-GB/admin/manage/users.json
index b7554b31e1..707c6f6b08 100644
--- a/public/language/en-GB/admin/manage/users.json
+++ b/public/language/en-GB/admin/manage/users.json
@@ -83,14 +83,6 @@
"create.password": "Password",
"create.password-confirm": "Confirm Password",
- "temp-ban.length": "Length",
- "temp-ban.reason": "Reason <span class=\"text-muted\">(Optional)</span>",
- "temp-ban.select-reason": "Select a reason",
- "temp-ban.hours": "Hours",
- "temp-ban.days": "Days",
- "temp-ban.explanation": "Enter the length of time for the ban. Note that a time of 0 will be a considered a permanent ban.",
- "temp-mute.explanation": "Enter the length of time for the mute. Note that a time of 0 will be a considered a permanent mute.",
-
"alerts.confirm-ban": "Do you really want to ban this user <strong>permanently</strong>?",
"alerts.confirm-ban-multi": "Do you really want to ban these users <strong>permanently</strong>?",
"alerts.ban-success": "User(s) banned!",
diff --git a/public/language/en-GB/users.json b/public/language/en-GB/users.json
index ac1faf4a09..ffe99711ee 100644
--- a/public/language/en-GB/users.json
+++ b/public/language/en-GB/users.json
@@ -22,5 +22,13 @@
"unread-topics": "Unread Topics",
"categories": "Categories",
"tags": "Tags",
- "no-users-found": "No users found!"
+ "no-users-found": "No users found!",
+
+ "temp-ban.length": "Length",
+ "temp-ban.reason": "Reason <span class=\"text-muted\">(Optional)</span>",
+ "temp-ban.select-reason": "Select a reason",
+ "temp-ban.hours": "Hours",
+ "temp-ban.days": "Days",
+ "temp-ban.explanation": "Enter the length of time for the ban. Note that a time of 0 will be a considered a permanent ban.",
+ "temp-mute.explanation": "Enter the length of time for the mute. Note that a time of 0 will be a considered a permanent mute."
}
\ No newline at end of file
diff --git a/src/views/modals/temporary-ban.tpl b/src/views/modals/temporary-ban.tpl
index d50dc8d52c..5fecdf4d01 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">
- {{tx("admin/manage/users:temp-ban.explanation")}}
+ {{tx("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">{{tx("admin/manage/users:temp-ban.length")}}</label>
+ <label class="form-label" for="length">{{tx("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">{{tx("admin/manage/users:temp-ban.hours")}}</option>
- <option value="1">{{tx("admin/manage/users:temp-ban.days")}}</option>
+ <option value="0">{{tx("users:temp-ban.hours")}}</option>
+ <option value="1">{{tx("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 37aaf700c2..9f745cd3f0 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">
- {{tx("admin/manage/users:temp-mute.explanation")}}
+ {{tx("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">{{tx("admin/manage/users:temp-ban.length")}}</label>
+ <label class="form-label" for="length">{{tx("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">{{tx("admin/manage/users:temp-ban.hours")}}</option>
- <option value="1">{{tx("admin/manage/users:temp-ban.days")}}</option>
+ <option value="0">{{tx("users:temp-ban.hours")}}</option>
+ <option value="1">{{tx("users:temp-ban.days")}}</option>
</select>
</div>
</div>
diff --git a/src/views/modals/unban.tpl b/src/views/modals/unban.tpl
index 8ba57cd586..adabcfa545 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">{{tx("admin/manage/users:temp-ban.reason")}}</label>
+ <label class="form-label" for="reason">{{tx("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 8ba57cd586..adabcfa545 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">{{tx("admin/manage/users:temp-ban.reason")}}</label>
+ <label class="form-label" for="reason">{{tx("users:temp-ban.reason")}}</label>
<input type="text" class="form-control" id="reason" name="reason" />
</div>
</div>
diff --git a/src/views/partials/custom-reason.tpl b/src/views/partials/custom-reason.tpl
index d8a1e57d1a..1bbfe8035e 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">{{tx("admin/manage/users:temp-ban.reason")}}</label>
+ <label class="form-label mb-0" for="reason">{{tx("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">
- {{tx("admin/manage/users:temp-ban.select-reason")}}
+ {{tx("users:temp-ban.select-reason")}}
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="reasonDropdown">