chore(data-source-manager): improve translation
This commit is contained in:
parent
bc9260ac52
commit
9bd0f4faff
@ -1,6 +1,6 @@
|
|||||||
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
|
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
|
||||||
import { uid } from '@formily/shared';
|
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 { Button, Dropdown, Empty } from 'antd';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@ -15,6 +15,7 @@ export const CreateDatabaseConnectAction = () => {
|
|||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [dialect, setDialect] = useState(null);
|
const [dialect, setDialect] = useState(null);
|
||||||
|
const api = useAPIClient();
|
||||||
const useDialectDataSource = (field) => {
|
const useDialectDataSource = (field) => {
|
||||||
const options = [...plugin.types.keys()].map((key) => {
|
const options = [...plugin.types.keys()].map((key) => {
|
||||||
const type = plugin.types.get(key);
|
const type = plugin.types.get(key);
|
||||||
@ -100,7 +101,18 @@ export const CreateDatabaseConnectAction = () => {
|
|||||||
description={
|
description={
|
||||||
<>
|
<>
|
||||||
{t('No external data source plugin installed', { ns: NAMESPACE })}
|
{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>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"Data source manager": "数据源管理",
|
"Data source manager": "数据源管理",
|
||||||
"Data sources": "数据源",
|
"Data sources": "数据源",
|
||||||
"No external data source plugin installed": "未安装外部数据源",
|
"No external data source plugin installed": "未安装外部数据源",
|
||||||
"View more": "查看更多",
|
"View documentation": "查看文档",
|
||||||
"Test Connection": "测试连接",
|
"Test Connection": "测试连接",
|
||||||
"Connection successful": "连接成功",
|
"Connection successful": "连接成功",
|
||||||
"Display name": "名称",
|
"Display name": "名称",
|
||||||
|
Loading…
Reference in New Issue
Block a user