mirror of https://github.com/langgenius/dify.git
fix: marketplace card i18n (#12623)
This commit is contained in:
parent
c08b451874
commit
d56079a549
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue