Skip to content

Commit 6256dde

Browse files
committed
Move another username to i18n key
Same as #17818 - this time in the delete user dialog
1 parent 9a786a5 commit 6256dde

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

web/public/locales/en/views/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@
474474
"deleteUser": {
475475
"title": "Delete User",
476476
"desc": "This action cannot be undone. This will permanently delete the user account and remove all associated data.",
477-
"warn": "Are you sure you want to delete"
477+
"warn": "Are you sure you want to delete <strong>{{username}}</strong>?"
478478
},
479479
"passwordSetting": {
480480
"updatePassword": "Update Password for {{username}}",

web/src/components/overlay/DeleteUserDialog.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useTranslation } from "react-i18next";
1+
import { Trans, useTranslation } from "react-i18next";
22
import { Button } from "../ui/button";
33
import {
44
Dialog,
@@ -35,8 +35,14 @@ export default function DeleteUserDialog({
3535

3636
<div className="my-4 rounded-md border border-destructive/20 bg-destructive/5 p-4 text-center text-sm">
3737
<p className="font-medium text-destructive">
38-
{t("users.dialog.deleteUser.warn")}
39-
<span className="font-medium"> {username}</span>?
38+
<Trans
39+
i18nKey="users.dialog.deleteUser.warn"
40+
ns="views/settings"
41+
values={{ username }}
42+
components={{
43+
strong: <span className="font-medium" />,
44+
}}
45+
/>
4046
</p>
4147
</div>
4248

0 commit comments

Comments
 (0)