import {
getLocaleOnServer,
useTranslation as translate,
} from '@/i18n/server'
type DescriptionProps = {
locale?: string
}
const Description = async ({
locale: localeFromProps,
}: DescriptionProps) => {
const localeDefault = getLocaleOnServer()
const { t } = await translate(localeFromProps || localeDefault, 'plugin')
const { t: tCommon } = await translate(localeFromProps || localeDefault, 'common')
const isZhHans = localeFromProps === 'zh-Hans'
return (
<>
{t('marketplace.empower')}
{
isZhHans && (
<>
{tCommon('operation.in')}
{t('marketplace.difyMarketplace')}
{t('marketplace.discover')}
>
)
}
{
!isZhHans && (
<>
{t('marketplace.discover')}
>
)
}
{t('category.models')}
,
{t('category.tools')}
,
{t('category.agents')}
,
{t('category.extensions')}
{t('marketplace.and')}
{t('category.bundles')}
{
!isZhHans && (
<>
{tCommon('operation.in')}
{t('marketplace.difyMarketplace')}
>
)
}
>
)
}
export default Description