From d13169934da1206fbebcf400384a74688dc02579 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Fri, 8 Nov 2024 16:13:52 +0800 Subject: [PATCH] fix: marketplace i18n --- .../plugins/marketplace/description/index.tsx | 8 ++++---- .../plugins/marketplace/plugin-type-switch.tsx | 2 +- web/app/components/tools/marketplace/index.tsx | 10 ++++++---- web/i18n/en-US/marketplace.ts | 10 ---------- web/i18n/en-US/plugin.ts | 8 ++++++++ web/i18n/zh-Hans/marketplace.ts | 10 ---------- web/i18n/zh-Hans/plugin.ts | 8 ++++++++ 7 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 web/i18n/en-US/marketplace.ts delete mode 100644 web/i18n/zh-Hans/marketplace.ts diff --git a/web/app/components/plugins/marketplace/description/index.tsx b/web/app/components/plugins/marketplace/description/index.tsx index 3b0454c3c6..9e3f9774b5 100644 --- a/web/app/components/plugins/marketplace/description/index.tsx +++ b/web/app/components/plugins/marketplace/description/index.tsx @@ -15,10 +15,10 @@ const Description = async ({ return ( <>

- Empower your AI development + {t('marketplace.empower')}

- Discover + {t('marketplace.discover')} {t('category.models')} @@ -30,11 +30,11 @@ const Description = async ({ {t('category.extensions')} - and + {t('marketplace.and')} {t('category.bundles')} - in Dify Marketplace + {t('marketplace.inDifyMarketplace')}

) diff --git a/web/app/components/plugins/marketplace/plugin-type-switch.tsx b/web/app/components/plugins/marketplace/plugin-type-switch.tsx index 6a44524a0c..82758ad87d 100644 --- a/web/app/components/plugins/marketplace/plugin-type-switch.tsx +++ b/web/app/components/plugins/marketplace/plugin-type-switch.tsx @@ -30,7 +30,7 @@ const PluginTypeSwitch = ({ const options = [ { value: PLUGIN_TYPE_SEARCH_MAP.all, - text: 'All', + text: t('plugin.category.all'), icon: null, }, { diff --git a/web/app/components/tools/marketplace/index.tsx b/web/app/components/tools/marketplace/index.tsx index f2092227a0..c50b898362 100644 --- a/web/app/components/tools/marketplace/index.tsx +++ b/web/app/components/tools/marketplace/index.tsx @@ -31,9 +31,11 @@ const Marketplace = ({ onClick={() => onMarketplaceScroll()} />
-
More from Marketplace
+
+ {t('plugin.marketplace.moreFrom')} +
- Discover + {t('plugin.marketplace.discover')} {t('plugin.category.models')} @@ -45,11 +47,11 @@ const Marketplace = ({ {t('plugin.category.extensions')} - and + {t('plugin.marketplace.and')} {t('plugin.category.bundles')} - in Dify Marketplace + {t('plugin.marketplace.inDifyMarketplace')}
{ diff --git a/web/i18n/en-US/marketplace.ts b/web/i18n/en-US/marketplace.ts deleted file mode 100644 index 4a53d94e57..0000000000 --- a/web/i18n/en-US/marketplace.ts +++ /dev/null @@ -1,10 +0,0 @@ -const translation = { - plugins: { - title: 'Plugins', - }, - discover: { - title: 'Explore Marketplace', - }, -} - -export default translation diff --git a/web/i18n/en-US/plugin.ts b/web/i18n/en-US/plugin.ts index 6d6e0d57c0..5c3bdc6f29 100644 --- a/web/i18n/en-US/plugin.ts +++ b/web/i18n/en-US/plugin.ts @@ -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 diff --git a/web/i18n/zh-Hans/marketplace.ts b/web/i18n/zh-Hans/marketplace.ts deleted file mode 100644 index ba3b2a192f..0000000000 --- a/web/i18n/zh-Hans/marketplace.ts +++ /dev/null @@ -1,10 +0,0 @@ -const translation = { - plugins: { - title: '插件', - }, - discover: { - title: '探索市场', - }, -} - -export default translation diff --git a/web/i18n/zh-Hans/plugin.ts b/web/i18n/zh-Hans/plugin.ts index 8b13e63aee..c1f7bb7600 100644 --- a/web/i18n/zh-Hans/plugin.ts +++ b/web/i18n/zh-Hans/plugin.ts @@ -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