chore(data-source-manager): improve translation

This commit is contained in:
chenos 2024-03-05 09:01:29 +08:00
parent bc9260ac52
commit 9bd0f4faff
2 changed files with 15 additions and 3 deletions

View File

@ -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 })}
<br /> <a>{t('View more', { ns: NAMESPACE })}</a>
<br />{' '}
<a
target="_blank"
href={
api.auth.locale === 'zh-CN'
? 'https://docs-cn.nocobase.com/handbook/data-source-manager'
: 'https://docs.nocobase.com/handbook/data-source-manager'
}
rel="noreferrer"
>
{t('View documentation', { ns: NAMESPACE })}
</a>
</>
}
/>

View File

@ -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": "名称",