From 9bd0f4faff70e46a7f3e242b79e486cb2209f8ee Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 5 Mar 2024 09:01:29 +0800 Subject: [PATCH] chore(data-source-manager): improve translation --- .../component/CreateDatabaseConnectAction.tsx | 16 ++++++++++++++-- .../src/locale/zh-CN.json | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx index 5a3931b10..a2a731e99 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/CreateDatabaseConnectAction.tsx @@ -1,6 +1,6 @@ import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { uid } from '@formily/shared'; -import { ActionContext, SchemaComponent, useCompile, usePlugin } from '@nocobase/client'; +import { ActionContext, SchemaComponent, useAPIClient, useCompile, usePlugin } from '@nocobase/client'; import { Button, Dropdown, Empty } from 'antd'; import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -15,6 +15,7 @@ export const CreateDatabaseConnectAction = () => { const [visible, setVisible] = useState(false); const { t } = useTranslation(); const [dialect, setDialect] = useState(null); + const api = useAPIClient(); const useDialectDataSource = (field) => { const options = [...plugin.types.keys()].map((key) => { const type = plugin.types.get(key); @@ -100,7 +101,18 @@ export const CreateDatabaseConnectAction = () => { description={ <> {t('No external data source plugin installed', { ns: NAMESPACE })} -
{t('View more', { ns: NAMESPACE })} +
{' '} + + {t('View documentation', { ns: NAMESPACE })} + } /> diff --git a/packages/plugins/@nocobase/plugin-data-source-manager/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-data-source-manager/src/locale/zh-CN.json index b0d6165ff..e0629b75d 100644 --- a/packages/plugins/@nocobase/plugin-data-source-manager/src/locale/zh-CN.json +++ b/packages/plugins/@nocobase/plugin-data-source-manager/src/locale/zh-CN.json @@ -7,7 +7,7 @@ "Data source manager": "数据源管理", "Data sources": "数据源", "No external data source plugin installed": "未安装外部数据源", - "View more": "查看更多", + "View documentation": "查看文档", "Test Connection": "测试连接", "Connection successful": "连接成功", "Display name": "名称",