mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-26 13:47:03 +02:00
move username to i18n key (#17818)
Some languages structure phrases and sentences differently, so the username can't always be assumed to be the last item in the phrase. This change uses the Trans component to maintain the HTML formatting.
This commit is contained in:
parent
9a786a50d6
commit
484ea10037
@ -483,7 +483,7 @@
|
||||
},
|
||||
"changeRole": {
|
||||
"title": "Change User Role",
|
||||
"desc": "Update permissions for",
|
||||
"desc": "Update permissions for <strong>{{username}}</strong>",
|
||||
"roleInfo": {
|
||||
"intro": "Select the appropriate role for this user:",
|
||||
"admin": "Admin",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { Button } from "../ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
@ -46,8 +46,14 @@ export default function RoleChangeDialog({
|
||||
{t("users.dialog.changeRole.title")}
|
||||
</DialogTitle>
|
||||
<DialogDescription>
|
||||
{t("users.dialog.changeRole.desc")}
|
||||
<span className="font-medium"> {username}</span>
|
||||
<Trans
|
||||
i18nKey="users.dialog.changeRole.desc"
|
||||
ns="views/settings"
|
||||
values={{ username }}
|
||||
components={{
|
||||
strong: <span className="font-medium" />,
|
||||
}}
|
||||
/>
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user