l18n for client names in device activity (#32982)

Fixes #32916

Signed-off-by: Stan Silvert <ssilvert@redhat.com>
This commit is contained in:
Stan Silvert 2024-09-17 06:48:25 -04:00 committed by GitHub
parent 905584c742
commit 01601beaa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
import {
ContinueCancelModal,
useEnvironment,
label,
} from "@keycloak/keycloak-ui-shared";
import {
Button,
@ -35,7 +36,6 @@ import {
SessionRepresentation,
} from "../api/representations";
import { Page } from "../components/page/Page";
import { TFuncKey } from "../i18n";
import { formatDate } from "../utils/formatDate";
import { useAccountAlerts } from "../utils/useAccountAlerts";
import { usePromise } from "../utils/usePromise";
@ -92,7 +92,7 @@ export const DeviceActivity = () => {
clients.forEach((client, index) => {
let clientName: string;
if (client.clientName !== "") {
clientName = t(client.clientName as TFuncKey);
clientName = label(t, client.clientName);
} else {
clientName = client.clientId;
}