From d56079a549ff4bb1ed1811f3078a8845566275cb Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Fri, 10 Jan 2025 18:15:58 +0800 Subject: [PATCH] fix: marketplace card i18n (#12623) --- web/app/components/plugins/card/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx index accd57c965..871f5cb62f 100644 --- a/web/app/components/plugins/card/index.tsx +++ b/web/app/components/plugins/card/index.tsx @@ -13,6 +13,7 @@ import { useGetLanguage } from '@/context/i18n' import { getLanguage } from '@/i18n/language' import { useSingleCategories } from '../hooks' import { renderI18nObject } from '@/hooks/use-i18n' +import { useMixedTranslation } from '@/app/components/plugins/marketplace/hooks' export type Props = { className?: string @@ -43,7 +44,8 @@ const Card = ({ }: Props) => { const defaultLocale = useGetLanguage() const locale = localeFromProps ? getLanguage(localeFromProps) : defaultLocale - const { categoriesMap } = useSingleCategories() + const { t } = useMixedTranslation(localeFromProps) + const { categoriesMap } = useSingleCategories(t) const { category, type, name, org, label, brief, icon, verified } = payload const isBundle = !['plugin', 'model', 'tool', 'extension', 'agent-strategy'].includes(type) const cornerMark = isBundle ? categoriesMap.bundle?.label : categoriesMap[category]?.label