From 9131838b986cba0087ab5b61ee7e27135d69282b Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Tue, 21 Jul 2026 12:34:35 +0200 Subject: [PATCH] refactor(webui): generalize central selection lists --- webui/src/components/admin/AdminSelectionList.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/webui/src/components/admin/AdminSelectionList.tsx b/webui/src/components/admin/AdminSelectionList.tsx index 5ab7fd2..b2873de 100644 --- a/webui/src/components/admin/AdminSelectionList.tsx +++ b/webui/src/components/admin/AdminSelectionList.tsx @@ -1,9 +1,10 @@ -import { usePlatformLanguage } from "../../i18n/LanguageContext"; +import type { ReactNode } from "react"; +import { translateReactNode, usePlatformLanguage } from "../../i18n/LanguageContext"; type Option = { id: string; - label: string; - description?: string | null; + label: ReactNode; + description?: ReactNode; disabled?: boolean; }; @@ -37,11 +38,11 @@ export default function AdminSelectionList({ }} /> - {translateText(option.label)} - {option.description && {translateText(option.description)}} + {translateReactNode(option.label, translateText)} + {option.description && {translateReactNode(option.description, translateText)}} )} ); -} \ No newline at end of file +}