fix: improve translation

This commit is contained in:
chenos 2023-08-12 10:18:47 +08:00
parent 9223999db2
commit 15504c2813
3 changed files with 16 additions and 10 deletions

View File

@ -182,6 +182,9 @@ export default {
"Action type": "Action type", "Action type": "Action type",
"Actions": "Actions", "Actions": "Actions",
"Insert": "Insert", "Insert": "Insert",
"Insert if not exists": "Insert if not exists",
"Insert if not exists, or update": "Insert if not exists, or update",
"Determine whether a record exists by the following fields": "Determine whether a record exists by the following fields",
"Update": "Update", "Update": "Update",
"View": "View", "View": "View",
"View record": "View record", "View record": "View record",

View File

@ -731,6 +731,8 @@ export default {
'Constant': '常量', 'Constant': '常量',
'Select a variable': '选择变量', 'Select a variable': '选择变量',
"Insert": "插入", "Insert": "插入",
"Insert if not exists": "不存在时插入",
"Insert if not exists, or update": "不存在时插入,否则更新",
'System variables': '系统变量', 'System variables': '系统变量',
'Date variables': '日期变量', 'Date variables': '日期变量',
'Double click to choose entire object': '双击选择整个对象', 'Double click to choose entire object': '双击选择整个对象',
@ -802,5 +804,6 @@ export default {
"Tag color field":"标签颜色字段", "Tag color field":"标签颜色字段",
"Sync successfully":"同步成功", "Sync successfully":"同步成功",
"Sync from form fields":"同步表单字段", "Sync from form fields":"同步表单字段",
"Select all":"全选" "Select all":"全选",
"Determine whether a record exists by the following fields": "通过以下字段判断记录是否存在"
} }

View File

@ -1,20 +1,20 @@
import { ArrayTable } from '@formily/antd-v5'; import { ArrayTable } from '@formily/antd-v5';
import { onFieldValueChange } from '@formily/core';
import { connect, ISchema, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react'; import { connect, ISchema, mapProps, useField, useFieldSchema, useForm, useFormEffects } from '@formily/react';
import { isValid, uid } from '@formily/shared'; import { isValid, uid } from '@formily/shared';
import { Alert, Tree as AntdTree } from 'antd'; import { Alert, Tree as AntdTree } from 'antd';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import React, { useEffect, useState, useMemo, useCallback } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { RemoteSelect, useCompile, useDesignable } from '../..'; import { RemoteSelect, useCompile, useDesignable } from '../..';
import { useCollection, useCollectionManager } from '../../../collection-manager'; import { useCollection, useCollectionManager } from '../../../collection-manager';
import { useRecord } from '../../../record-provider';
import { OpenModeSchemaItems } from '../../../schema-items'; import { OpenModeSchemaItems } from '../../../schema-items';
import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings'; import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings';
import { useCollectionState } from '../../../schema-settings/DataTemplates/hooks/useCollectionState'; import { useCollectionState } from '../../../schema-settings/DataTemplates/hooks/useCollectionState';
import { useSyncFromForm } from '../../../schema-settings/DataTemplates/utils';
import { useLinkageAction } from './hooks'; import { useLinkageAction } from './hooks';
import { requestSettingsSchema } from './utils'; import { requestSettingsSchema } from './utils';
import { useRecord } from '../../../record-provider';
import { useSyncFromForm } from '../../../schema-settings/DataTemplates/utils';
import { onFieldValueChange } from '@formily/core';
const Tree = connect( const Tree = connect(
AntdTree, AntdTree,
@ -143,17 +143,17 @@ function SaveMode() {
saveMode: { saveMode: {
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'Radio.Group', 'x-component': 'Radio.Group',
title: t('Save mode'), // title: t('Save mode'),
default: field.componentProps.saveMode || 'create', default: field.componentProps.saveMode || 'create',
enum: [ enum: [
{ value: 'create', label: '{{t("Create")}}' }, { value: 'create', label: '{{t("Insert")}}' },
{ value: 'firstOrCreate', label: '{{t("First or create")}}' }, { value: 'firstOrCreate', label: '{{t("Insert if not exists")}}' },
{ value: 'updateOrCreate', label: '{{t("Update or create")}}' }, { value: 'updateOrCreate', label: '{{t("Insert if not exists, or update")}}' },
], ],
}, },
filterKeys: { filterKeys: {
type: 'array', type: 'array',
title: '{{ t("Find by the following fields") }}', title: '{{ t("Determine whether a record exists by the following fields") }}',
required: true, required: true,
default: field.componentProps.filterKeys, default: field.componentProps.filterKeys,
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',