fix: marketplace i18n

This commit is contained in:
StyleZhang 2024-11-08 16:13:52 +08:00
parent 324437b3f1
commit d13169934d
7 changed files with 27 additions and 29 deletions

View File

@ -15,10 +15,10 @@ const Description = async ({
return (
<>
<h1 className='shrink-0 mb-2 text-center title-4xl-semi-bold text-text-primary'>
Empower your AI development
{t('marketplace.empower')}
</h1>
<h2 className='shrink-0 flex justify-center items-center text-center body-md-regular text-text-tertiary'>
Discover
{t('marketplace.discover')}
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('category.models')}
</span>
@ -30,11 +30,11 @@ const Description = async ({
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('category.extensions')}
</span>
and
{t('marketplace.and')}
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('category.bundles')}
</span>
in Dify Marketplace
{t('marketplace.inDifyMarketplace')}
</h2>
</>
)

View File

@ -30,7 +30,7 @@ const PluginTypeSwitch = ({
const options = [
{
value: PLUGIN_TYPE_SEARCH_MAP.all,
text: 'All',
text: t('plugin.category.all'),
icon: null,
},
{

View File

@ -31,9 +31,11 @@ const Marketplace = ({
onClick={() => onMarketplaceScroll()}
/>
<div className='sticky top-0 pt-5 pb-3 bg-background-default-subtle z-10'>
<div className='title-2xl-semi-bold bg-gradient-to-r from-[rgba(11,165,236,0.95)] to-[rgba(21,90,239,0.95)] bg-clip-text text-transparent'>More from Marketplace</div>
<div className='title-2xl-semi-bold bg-gradient-to-r from-[rgba(11,165,236,0.95)] to-[rgba(21,90,239,0.95)] bg-clip-text text-transparent'>
{t('plugin.marketplace.moreFrom')}
</div>
<div className='flex items-center text-center body-md-regular text-text-tertiary'>
Discover
{t('plugin.marketplace.discover')}
<span className="relative ml-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('plugin.category.models')}
</span>
@ -45,11 +47,11 @@ const Marketplace = ({
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('plugin.category.extensions')}
</span>
and
{t('plugin.marketplace.and')}
<span className="relative ml-1 mr-1 body-md-medium text-text-secondary after:content-[''] after:absolute after:left-0 after:bottom-[1.5px] after:w-full after:h-2 after:bg-text-text-selected">
{t('plugin.category.bundles')}
</span>
in Dify Marketplace
{t('plugin.marketplace.inDifyMarketplace')}
</div>
</div>
{

View File

@ -1,10 +0,0 @@
const translation = {
plugins: {
title: 'Plugins',
},
discover: {
title: 'Explore Marketplace',
},
}
export default translation

View File

@ -1,5 +1,6 @@
const translation = {
category: {
all: 'All',
models: 'models',
tools: 'tools',
extensions: 'extensions',
@ -116,6 +117,13 @@ const translation = {
error: {
inValidGitHubUrl: 'Invalid GitHub URL. Please enter a valid URL in the format: https://github.com/owner/repo',
},
marketplace: {
empower: 'Empower your AI development',
discover: 'Discover',
and: 'and',
inDifyMarketplace: 'in Dify Marketplace',
moreFrom: 'More from Marketplace',
},
}
export default translation

View File

@ -1,10 +0,0 @@
const translation = {
plugins: {
title: '插件',
},
discover: {
title: '探索市场',
},
}
export default translation

View File

@ -1,5 +1,6 @@
const translation = {
category: {
all: '全部',
models: '模型',
tools: '工具',
extensions: '扩展',
@ -116,6 +117,13 @@ const translation = {
error: {
inValidGitHubUrl: '无效的 GitHub URL。请输入格式为 https://github.com/owner/repo 的有效 URL',
},
marketplace: {
empower: '助力您的 AI 开发',
discover: '探索',
and: '和',
inDifyMarketplace: '在 Dify 市场中',
moreFrom: '更多来自市场',
},
}
export default translation