From 73b3896671b0bbf00b83d76e6e76f114c1508315 Mon Sep 17 00:00:00 2001 From: anankul <123915589+anankul@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:43:20 -0700 Subject: [PATCH 1/2] Use message string for the supported applications Apparently, the totp.policy.supportedApplications array returns the message keys for the apps, they need to be replaced by actual translation. --- src/lib/pages/LoginConfigTotp.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/pages/LoginConfigTotp.tsx b/src/lib/pages/LoginConfigTotp.tsx index 5a48eef9..681a9116 100644 --- a/src/lib/pages/LoginConfigTotp.tsx +++ b/src/lib/pages/LoginConfigTotp.tsx @@ -2,7 +2,7 @@ import React from "react"; import { clsx } from "../tools/clsx"; import type { PageProps } from "../KcProps"; import type { KcContextBase } from "../getKcContext"; -import type { I18nBase } from "../i18n"; +import type { I18nBase, MessageKeyBase } from "../i18n"; export default function LoginConfigTotp(props: PageProps, I18nBase>) { const { kcContext, i18n, doFetchDefaultThemeResources = true, Template, ...kcProps } = props; @@ -29,7 +29,7 @@ export default function LoginConfigTotp(props: PageProps {totp.policy.supportedApplications.map(app => ( -
  • {app}
  • +
  • { msg(app as MessageKeyBase) == undefined? app : msg(app as MessageKeyBase) }
  • ))} From 23d6939a832cfa7609d29a36d00efa08797e7ac8 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 26 Oct 2023 12:33:52 +0200 Subject: [PATCH 2/2] Update src/lib/pages/LoginConfigTotp.tsx --- src/lib/pages/LoginConfigTotp.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pages/LoginConfigTotp.tsx b/src/lib/pages/LoginConfigTotp.tsx index 681a9116..79d1535e 100644 --- a/src/lib/pages/LoginConfigTotp.tsx +++ b/src/lib/pages/LoginConfigTotp.tsx @@ -29,7 +29,7 @@ export default function LoginConfigTotp(props: PageProps {totp.policy.supportedApplications.map(app => ( -
  • { msg(app as MessageKeyBase) == undefined? app : msg(app as MessageKeyBase) }
  • +
  • {msg(app as MessageKeyBase)}
  • ))}