From ab2e20ee0a2e2a571b7a83ad6f67d3d801380bf4 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Wed, 8 Nov 2023 13:03:50 +0800 Subject: [PATCH] fix: rename api based extension (#1485) --- .../moderation/moderation-setting-modal.tsx | 2 +- .../tools/external-data-tool-modal.tsx | 2 +- web/i18n/lang/common.en.ts | 16 +++++++-------- web/i18n/lang/common.zh.ts | 20 +++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx b/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx index 710a0f637e..072339751f 100644 --- a/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx +++ b/web/app/components/app/configuration/toolbox/moderation/moderation-setting-modal.tsx @@ -201,7 +201,7 @@ const ModerationSettingModal: FC = ({ } if (localeData.type === 'api' && !localeData.config.api_based_extension_id) { - notify({ type: 'error', message: t('appDebug.errorMessage.valueOfVarRequired', { key: locale === 'en' ? 'API-based Extension' : '基于 API 的扩展' }) }) + notify({ type: 'error', message: t('appDebug.errorMessage.valueOfVarRequired', { key: locale === 'en' ? 'API Extension' : 'API 扩展' }) }) return } diff --git a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx index 56f823b8bb..ce46956616 100644 --- a/web/app/components/app/configuration/tools/external-data-tool-modal.tsx +++ b/web/app/components/app/configuration/tools/external-data-tool-modal.tsx @@ -155,7 +155,7 @@ const ExternalDataToolModal: FC = ({ } if (localeData.type === 'api' && !localeData.config?.api_based_extension_id) { - notify({ type: 'error', message: t('appDebug.errorMessage.valueOfVarRequired', { key: locale === 'en' ? 'API-based Extension' : '基于 API 的扩展' }) }) + notify({ type: 'error', message: t('appDebug.errorMessage.valueOfVarRequired', { key: locale === 'en' ? 'API Extension' : 'API 扩展' }) }) return } diff --git a/web/i18n/lang/common.en.ts b/web/i18n/lang/common.en.ts index 219731de4a..0c914ace9e 100644 --- a/web/i18n/lang/common.en.ts +++ b/web/i18n/lang/common.en.ts @@ -109,7 +109,7 @@ const translation = { provider: 'Model Provider', dataSource: 'Data Source', plugin: 'Plugins', - apiBasedExtension: 'API-based Extension', + apiBasedExtension: 'API Extension', }, account: { avatar: 'Avatar', @@ -303,17 +303,17 @@ const translation = { }, apiBasedExtension: { title: 'API-based extensions provide centralized API management, simplifying configuration for easy use across Dify\'s applications.', - link: 'Learn how to develop your own API-based Extension.', + link: 'Learn how to develop your own API Extension.', linkUrl: 'https://docs.dify.ai/advanced/api_based_extension', - add: 'Add API-based Extension', + add: 'Add API Extension', selector: { - title: 'API-based Extension', + title: 'API Extension', placeholder: 'Please select API-based extension', - manage: 'Manage API-based Extension', + manage: 'Manage API Extension', }, modal: { - title: 'Add API-based Extension', - editTitle: 'Edit API-based Extension', + title: 'Add API Extension', + editTitle: 'Edit API Extension', name: { title: 'Name', placeholder: 'Please enter the name', @@ -329,7 +329,7 @@ const translation = { }, }, confirm: { - desc: 'Deleting the WebHook might cause the extension points configured for this API-based Extension to fail and produce errors. Please proceed with caution.', + desc: 'Deleting the WebHook might cause the extension points configured for this API Extension to fail and produce errors. Please proceed with caution.', }, }, about: { diff --git a/web/i18n/lang/common.zh.ts b/web/i18n/lang/common.zh.ts index 35dc9bd53b..ded277d911 100644 --- a/web/i18n/lang/common.zh.ts +++ b/web/i18n/lang/common.zh.ts @@ -109,7 +109,7 @@ const translation = { provider: '模型供应商', dataSource: '数据来源', plugin: '插件', - apiBasedExtension: '基于 API 的扩展', + apiBasedExtension: 'API 的扩展', }, account: { avatar: '头像', @@ -302,18 +302,18 @@ const translation = { }, }, apiBasedExtension: { - title: '基于 API 的扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。', - link: '了解如何开发您自己的基于 API 的扩展。', + title: 'API 的扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。', + link: '了解如何开发您自己的 API 的扩展。', linkUrl: 'https://docs.dify.ai/v/zh-hans/advanced/api_based_extension', - add: '新增基于 API 的扩展', + add: '新增 API 的扩展', selector: { - title: '基于 API 的扩展', - placeholder: '请选择基于 API 的扩展', - manage: '管理基于 API 的扩展', + title: 'API 的扩展', + placeholder: '请选择 API 的扩展', + manage: '管理 API 的扩展', }, modal: { - title: '新增基于 API 的扩展', - editTitle: '编辑基于 API 的扩展', + title: '新增 API 的扩展', + editTitle: '编辑 API 的扩展', name: { title: '名称', placeholder: '请输入名称', @@ -329,7 +329,7 @@ const translation = { }, }, confirm: { - desc: '删除 WebHook 可能会导致这个基于 API 的扩展配置的扩展失败并产生错误。请谨慎删除。', + desc: '删除 WebHook 可能会导致这个 API 的扩展配置的扩展失败并产生错误。请谨慎删除。', }, }, about: {