From b1a23b876bc73375dea7edd5f5d7ec3e61820652 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 23 Jun 2025 00:10:25 +0200 Subject: [PATCH] Show native language name for installed extensions --- src/modules/extension/components/ExtensionCard.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/extension/components/ExtensionCard.tsx b/src/modules/extension/components/ExtensionCard.tsx index 03e79d7e..a1a5a8d3 100644 --- a/src/modules/extension/components/ExtensionCard.tsx +++ b/src/modules/extension/components/ExtensionCard.tsx @@ -36,6 +36,7 @@ import { ListCardContent } from '@/modules/core/components/lists/cards/ListCardC import { AppRoutes } from '@/modules/core/AppRoute.constants.ts'; import { MUIUtil } from '@/lib/mui/MUI.util.ts'; import { OptionalCardActionAreaLink } from '@/modules/core/components/lists/cards/OptionalCardActionAreaLink.tsx'; +import { languageCodeToName } from '@/modules/core/utils/Languages.ts'; interface IProps { extension: TExtension; @@ -62,8 +63,6 @@ export function ExtensionCard(props: IProps) { setInstalledState(getInstalledState(isInstalled, isObsolete, hasUpdate)); }, [getInstalledState(isInstalled, isObsolete, hasUpdate)]); - const langPress = lang === 'all' ? t('extension.language.all') : lang.toUpperCase(); - const requestExtensionAction = async (action: ExtensionAction): Promise => { const nextAction = EXTENSION_ACTION_TO_NEXT_ACTION_MAP[action]; const state = EXTENSION_ACTION_TO_STATE_MAP[action]; @@ -117,7 +116,7 @@ export function ExtensionCard(props: IProps) { {name} - {isInstalled ? `${langPress} ` : ''} + {isInstalled ? `${languageCodeToName(lang)} ` : ''} {versionName} {isNsfw && (