Move another username to i18n key (#17820)

Same as https://github.com/blakeblackshear/frigate/pull/17818 - this time in the delete user dialog
This commit is contained in:
Josh Hawkins 2025-04-19 20:53:23 -05:00 committed by GitHub
parent 43a9641ae8
commit 6e79ec1624
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -474,7 +474,7 @@
"deleteUser": {
"title": "Delete User",
"desc": "This action cannot be undone. This will permanently delete the user account and remove all associated data.",
"warn": "Are you sure you want to delete"
"warn": "Are you sure you want to delete <strong>{{username}}</strong>?"
},
"passwordSetting": {
"updatePassword": "Update Password for {{username}}",

View File

@ -1,4 +1,4 @@
import { useTranslation } from "react-i18next";
import { Trans, useTranslation } from "react-i18next";
import { Button } from "../ui/button";
import {
Dialog,
@ -35,8 +35,14 @@ export default function DeleteUserDialog({
<div className="my-4 rounded-md border border-destructive/20 bg-destructive/5 p-4 text-center text-sm">
<p className="font-medium text-destructive">
{t("users.dialog.deleteUser.warn")}
<span className="font-medium"> {username}</span>?
<Trans
i18nKey="users.dialog.deleteUser.warn"
ns="views/settings"
values={{ username }}
components={{
strong: <span className="font-medium" />,
}}
/>
</p>
</div>