diff --git a/packages/core/client/src/collection-manager/interfaces/index.ts b/packages/core/client/src/collection-manager/interfaces/index.ts index a8cf312df..98a790fb6 100644 --- a/packages/core/client/src/collection-manager/interfaces/index.ts +++ b/packages/core/client/src/collection-manager/interfaces/index.ts @@ -33,4 +33,3 @@ export * from './time'; export * from './updatedAt'; export * from './updatedBy'; export * from './url'; -export * from './username'; diff --git a/packages/core/client/src/collection-manager/interfaces/input.ts b/packages/core/client/src/collection-manager/interfaces/input.ts index ed27f637c..af21aa9ce 100644 --- a/packages/core/client/src/collection-manager/interfaces/input.ts +++ b/packages/core/client/src/collection-manager/interfaces/input.ts @@ -2,6 +2,13 @@ import { ISchema } from '@formily/react'; import { defaultProps, operators, unique } from './properties'; import { IField } from './types'; import { i18n } from '../../i18n'; +import { registerValidateRules } from '@formily/validator'; + +registerValidateRules({ + username(value) { + return /^[^@.<>"'/]{2,16}$/.test(value) || i18n.t('Must be 2-16 characters in length (excluding @.<>"\'/)'); + }, +}); export const input: IField = { name: 'input', diff --git a/packages/core/client/src/collection-manager/interfaces/username.ts b/packages/core/client/src/collection-manager/interfaces/username.ts deleted file mode 100644 index 6039cbcfa..000000000 --- a/packages/core/client/src/collection-manager/interfaces/username.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { i18n } from '../../i18n'; -import { defaultProps, operators, unique } from './properties'; -import { IField } from './types'; -import { registerValidateRules } from '@formily/core'; - -registerValidateRules({ - username(value) { - return /^[^@.<>"'/]{2,16}$/.test(value) || i18n.t('2 to 16 characters (excluding @.<>"\'/)'); - }, -}); - -export const username: IField = { - name: 'username', - type: 'object', - group: 'basic', - order: 1, - title: '{{t("Username")}}', - sortable: true, - default: { - type: 'string', - // name, - uiSchema: { - type: 'string', - // title, - 'x-component': 'Input', - 'x-validator': { username: true }, - required: true, - }, - }, - availableTypes: ['string'], - hasDefaultValue: false, - properties: { - ...defaultProps, - unique, - }, - filterable: { - operators: operators.string, - }, - titleUsable: true, -}; diff --git a/packages/core/client/src/locale/zh_CN.ts b/packages/core/client/src/locale/zh_CN.ts index e88567fde..6bdd78a1f 100644 --- a/packages/core/client/src/locale/zh_CN.ts +++ b/packages/core/client/src/locale/zh_CN.ts @@ -1,553 +1,561 @@ export default { - "Display <1><0>10<1>20<2>50<3>100 items per page": "每页显示 <1><0>10<1>20<2>50<3>100 条", - "Page number": "页码", - "Page size": "每页条数", - "Meet <1><0>All<1>Any conditions in the group": "满足组内 <1><0>全部<1>任意 条件", - "Open in<1><0>Modal<1>Drawer<2>Window": "在 <1><0>对话框<1>抽屉<2>窗口 内打开", - "{{count}} filter items": "{{count}} 个筛选项", - "{{count}} more items": "还有 {{count}} 项", - "Total {{count}} items": "总共 {{count}} 条", - "Today": "今天", - "Yesterday": "昨天", - "Tomorrow": "明天", - "Month": "月", - "Week": "周", - "This week": "本周", - "Next week": "下周", - "This month": "本月", - "Next month": "下月", - "Last quarter": "上季度", - "This quarter": "本季度", - "Next quarter": "下季度", - "This year": "今年", - "Next year": "明年", - "Last week": "上周", - "Last month": "上月", - "Last year": "去年", - "Last 7 days": "最近 7 天", - "Last 30 days": "最近 30 天", - "Last 90 days": "最近 90 天", - "Next 7 days": "未来 7 天", - "Next 30 days": "未来 30 天", - "Next 90 days": "未来 90 天", - "Work week": "工作日", - "Day": "天", - "Agenda": "列表", - "Date": "日期", - "Time": "时间", - "Event": "事件", - "None": "无", - "Unconnected": "未连接", - "System settings": "系统设置", - "System title": "系统名称", - "Setting": "设置", - "Enable": "启用", - "Disable": "禁用", - 'On':'启用', - 'Off':'禁用', - "Logo": "Logo", - "Add menu item": "添加菜单项", - "Page": "页面", - "Name": "名称", - "Icon": "图标", - "Group": "分组", - "Link": "链接", - "Save conditions": "保存筛选条件", - "Edit menu item": "编辑菜单项", - "Move to": "移动到", - "Insert left": "在左边插入", - "Insert right": "在右边插入", - "Insert inner": "在里面插入", - "Delete": "删除", - "UI editor": "界面配置", - "Collection": "数据表", - "Enable child collections":"启用子表", - "Allow adding records to the current collection":"允许向当前数据表里添加记录", - "Collections & Fields": "数据表配置", - "All collections":"全部数据表", - "Add category":"添加分类", - "Delete category":"删除分类", - "Edit category":"编辑分类", - "Collection category":"数据表类别", - "Collection template":"数据表模板", - "Visible":"显示", - "Read only":"只读(禁止编辑)", - "Easy reading":"只读(阅读模式)", - "Hidden":"隐藏", - "Hidden(reserved value)":"隐藏(保留值)", - "Not required":"非必填", - "Value":"字段值", - "Disabled":"禁用", - "Enabled":"启用", - "Empty":"赋空值", - "Linkage rule":"联动规则", - "Linkage rules":"联动规则", - "Condition":"条件", - "Properties":"属性", - "Add linkage rule":"添加联动规则", - "Add property":"添加属性", - "Calculation engine": "计算引擎", - "Expression":"表达式", - "Expression collection": "表达式表", - "Sort":"排序", - "Categories":"数据表类别", - "Category name":"分类名称", - 'Add child':'添加子记录', - 'Collapse all':'全部收起', - 'Expand all':'全部展开', - 'Expand/Collapse':'展开/折叠', - 'Default collapse':'默认展开', + 'Display <1><0>10<1>20<2>50<3>100 items per page': + '每页显示 <1><0>10<1>20<2>50<3>100 条', + 'Page number': '页码', + 'Page size': '每页条数', + 'Meet <1><0>All<1>Any conditions in the group': '满足组内 <1><0>全部<1>任意 条件', + 'Open in<1><0>Modal<1>Drawer<2>Window': '在 <1><0>对话框<1>抽屉<2>窗口 内打开', + '{{count}} filter items': '{{count}} 个筛选项', + '{{count}} more items': '还有 {{count}} 项', + 'Total {{count}} items': '总共 {{count}} 条', + Today: '今天', + Yesterday: '昨天', + Tomorrow: '明天', + Month: '月', + Week: '周', + 'This week': '本周', + 'Next week': '下周', + 'This month': '本月', + 'Next month': '下月', + 'Last quarter': '上季度', + 'This quarter': '本季度', + 'Next quarter': '下季度', + 'This year': '今年', + 'Next year': '明年', + 'Last week': '上周', + 'Last month': '上月', + 'Last year': '去年', + 'Last 7 days': '最近 7 天', + 'Last 30 days': '最近 30 天', + 'Last 90 days': '最近 90 天', + 'Next 7 days': '未来 7 天', + 'Next 30 days': '未来 30 天', + 'Next 90 days': '未来 90 天', + 'Work week': '工作日', + Day: '天', + Agenda: '列表', + Date: '日期', + Time: '时间', + Event: '事件', + None: '无', + Unconnected: '未连接', + 'System settings': '系统设置', + 'System title': '系统名称', + Setting: '设置', + Enable: '启用', + Disable: '禁用', + On: '启用', + Off: '禁用', + Logo: 'Logo', + 'Add menu item': '添加菜单项', + Page: '页面', + Name: '名称', + Icon: '图标', + Group: '分组', + Link: '链接', + 'Save conditions': '保存筛选条件', + 'Edit menu item': '编辑菜单项', + 'Move to': '移动到', + 'Insert left': '在左边插入', + 'Insert right': '在右边插入', + 'Insert inner': '在里面插入', + Delete: '删除', + 'UI editor': '界面配置', + Collection: '数据表', + 'Enable child collections': '启用子表', + 'Allow adding records to the current collection': '允许向当前数据表里添加记录', + 'Collections & Fields': '数据表配置', + 'All collections': '全部数据表', + 'Add category': '添加分类', + 'Delete category': '删除分类', + 'Edit category': '编辑分类', + 'Collection category': '数据表类别', + 'Collection template': '数据表模板', + Visible: '显示', + 'Read only': '只读(禁止编辑)', + 'Easy reading': '只读(阅读模式)', + Hidden: '隐藏', + 'Hidden(reserved value)': '隐藏(保留值)', + 'Not required': '非必填', + Value: '字段值', + Disabled: '禁用', + Enabled: '启用', + Empty: '赋空值', + 'Linkage rule': '联动规则', + 'Linkage rules': '联动规则', + Condition: '条件', + Properties: '属性', + 'Add linkage rule': '添加联动规则', + 'Add property': '添加属性', + 'Calculation engine': '计算引擎', + Expression: '表达式', + 'Expression collection': '表达式表', + Sort: '排序', + Categories: '数据表类别', + 'Category name': '分类名称', + 'Add child': '添加子记录', + 'Collapse all': '全部收起', + 'Expand all': '全部展开', + 'Expand/Collapse': '展开/折叠', + 'Default collapse': '默认展开', 'Tree collection': '树结构表', - "Tree table":"树表格", + 'Tree table': '树表格', 'Parent ID': '父记录ID', - 'Parent': '父记录', - 'Children': '子记录', - "Roles & Permissions": "角色和权限", - "Edit profile": "个人资料", - "Change password": "修改密码", - "Old password": "旧密码", - "New password": "新密码", - "Switch role": "切换角色", - "Super admin": "超级管理员", - "Language": "语言设置", - "Allow sign up": "允许注册", - "Enable SMS authentication": "启用短信登录和注册", - "Sign out": "注销", - "Cancel": "取消", - "Confirm": "确定", - "Submit": "提交", - "Close": "关闭", - "Set the data scope": "设置数据范围", - "Block": "区块", - "Data blocks": "数据区块", - "Filter blocks": "筛选区块", - "Table": "表格", - "Form": "表单", - "List": "列表", - "Grid Card": "网格卡片", - "Screen size": "屏幕尺寸", - "pixels": "像素", - "Display title": "显示标题", - 'Set the count of columns displayed in a row': "设置一行展示的列数", - 'Column': '列', + Parent: '父记录', + Children: '子记录', + 'Roles & Permissions': '角色和权限', + 'Edit profile': '个人资料', + 'Change password': '修改密码', + 'Old password': '旧密码', + 'New password': '新密码', + 'Switch role': '切换角色', + 'Super admin': '超级管理员', + Language: '语言设置', + 'Allow sign up': '允许注册', + 'Enable SMS authentication': '启用短信登录和注册', + 'Sign out': '注销', + Cancel: '取消', + Confirm: '确定', + Submit: '提交', + Close: '关闭', + 'Set the data scope': '设置数据范围', + Block: '区块', + 'Data blocks': '数据区块', + 'Filter blocks': '筛选区块', + Table: '表格', + Form: '表单', + List: '列表', + 'Grid Card': '网格卡片', + 'Screen size': '屏幕尺寸', + pixels: '像素', + 'Display title': '显示标题', + 'Set the count of columns displayed in a row': '设置一行展示的列数', + Column: '列', 'Phone device': '手机设备', 'Tablet device': '平板设备', 'Desktop device': '电脑设备', 'Large screen device': '大屏幕设备', - "Table OID(Inheritance)":"数据表 OID(继承)", - "Collapse": "折叠面板", - "Select data source": "选择数据源", - "Calendar": "日历", + 'Table OID(Inheritance)': '数据表 OID(继承)', + Collapse: '折叠面板', + 'Select data source': '选择数据源', + Calendar: '日历', 'Delete events': '删除日程', 'This event': '此日程', 'This and following events': '此日程及后续日程', 'All events': '所有日程', 'Delete this event?': '是否删除这个日程?', 'Delete Event': '删除日程', - "Kanban": "看板", - "Gantt":"甘特图", - "Create gantt block":"创建甘特图区块", - "Progress field":"进度字段", - "Time scale":"时间缩放等级", - "Hour":"小时", - "Quarter of day":"四分之一天", - "Half of day":"半天", - "Year":"年", - "QuarterYear":"季度", - "Select grouping field": "选择分组字段", - "Media": "多媒体", - "Markdown": "Markdown", - "Wysiwyg": "富文本", - "Chart blocks": "图表区块", - "Column chart": "柱状图", - "Bar chart": "条形图", - "Line chart": "折线图", - "Pie chart": "饼图", - "Area chart": "面积图", - "Other chart": "其他图表", - "Other blocks": "其他区块", - "In configuration": "配置中", - "Chart title": "图表标题", - "Chart type": "图表类型", - "Chart config": "图表配置", - "Templates": "模板", - "Select template": "选择模板", - "Action logs": "操作日志", - "Create template": "创建模板", - "Edit markdown": "编辑 Markdown", - "Add block": "创建区块", - "Add new": "添加", - "Add record": "添加数据", - "Custom field display name": "自定义字段名称", - "Display fields": "显示字段", - "Edit record": "编辑数据", - "Delete menu item": "删除菜单项", - "Add page": "添加页面", - "Add group": "添加分组", - "Add link": "添加链接", - "Insert above": "在上面插入", - "Insert below": "在下面插入", - "Save": "保存", - "Delete block": "删除区块", - "Are you sure you want to delete it?": "你确定要删除吗?", - "This is a demo text, **supports Markdown syntax**.": "这是一段演示文本,**支持 Markdown 语法**。", + Kanban: '看板', + Gantt: '甘特图', + 'Create gantt block': '创建甘特图区块', + 'Progress field': '进度字段', + 'Time scale': '时间缩放等级', + Hour: '小时', + 'Quarter of day': '四分之一天', + 'Half of day': '半天', + Year: '年', + QuarterYear: '季度', + 'Select grouping field': '选择分组字段', + Media: '多媒体', + Markdown: 'Markdown', + Wysiwyg: '富文本', + 'Chart blocks': '图表区块', + 'Column chart': '柱状图', + 'Bar chart': '条形图', + 'Line chart': '折线图', + 'Pie chart': '饼图', + 'Area chart': '面积图', + 'Other chart': '其他图表', + 'Other blocks': '其他区块', + 'In configuration': '配置中', + 'Chart title': '图表标题', + 'Chart type': '图表类型', + 'Chart config': '图表配置', + Templates: '模板', + 'Select template': '选择模板', + 'Action logs': '操作日志', + 'Create template': '创建模板', + 'Edit markdown': '编辑 Markdown', + 'Add block': '创建区块', + 'Add new': '添加', + 'Add record': '添加数据', + 'Custom field display name': '自定义字段名称', + 'Display fields': '显示字段', + 'Edit record': '编辑数据', + 'Delete menu item': '删除菜单项', + 'Add page': '添加页面', + 'Add group': '添加分组', + 'Add link': '添加链接', + 'Insert above': '在上面插入', + 'Insert below': '在下面插入', + Save: '保存', + 'Delete block': '删除区块', + 'Are you sure you want to delete it?': '你确定要删除吗?', + 'This is a demo text, **supports Markdown syntax**.': '这是一段演示文本,**支持 Markdown 语法**。', - "Filter": "筛选", - "Connect data blocks": "连接数据区块", - "Action type": "操作类型", - "Actions": "操作", - "Update": "更新", - "View": "查看", - "View record": "查看数据", - "Refresh": "刷新", + Filter: '筛选', + 'Connect data blocks': '连接数据区块', + 'Action type': '操作类型', + Actions: '操作', + Update: '更新', + View: '查看', + 'View record': '查看数据', + Refresh: '刷新', - "Data changes": "数据变更", - "Field name": "字段标识", - "Before change": "变更前", - "After change": "变更后", + 'Data changes': '数据变更', + 'Field name': '字段标识', + 'Before change': '变更前', + 'After change': '变更后', - "Delete record": "删除数据", - "Create collection": "创建数据表", - "Collection display name": "数据表名称", - "Collection name": "数据表标识", - "Inherits": "继承", - "Generate ID field automatically": "自动生成 ID 字段", - "Store the creation user of each record": "记录创建人", - "Store the last update user of each record": "记录最后更新人", - "Store the creation time of each record": "记录创建时间", - "Store the last update time of each record": "记录最后更新时间", - "More options": "更多选项", - "Records can be sorted": "可以对行记录进行排序", - "Calendar collection": "日历数据表", - "General collection": "普通数据表", - "Connect to database view":"连接数据库视图", - "Source collections":"来源数据表", - "Field source":"来源字段", - "Preview":"预览", - "Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.": "随机生成,可修改。支持英文、数字和下划线,必须以英文字母开头。", - "Edit": "编辑", - "Edit collection": "编辑数据表", - "Configure field": "配置字段", - "Configure fields": "配置字段", - "Configure columns": "配置字段", - "Edit field": "编辑字段", - "Override": "重写", - "Override field": "重写字段", - "Configure fields of {{title}}": "「{{title}}」的字段配置", - "Association fields filter": "关系筛选", - "PK & FK fields": "主外键字段", - "Association fields": "关系字段", - "Choices fields": "选项字段", - "System fields": "系统字段", - "General fields": "普通字段", - "Inherited fields": "继承字段", - "Parent collection fields": "父表字段", - "Basic": "基本类型", - "Single line text": "单行文本", - "Long text": "多行文本", - "Phone": "手机号码", - "Email": "电子邮箱", - "Username": "用户名", - 'Null': '空值', - "Boolean": "逻辑值", - "Number": "数字", - "Integer": "整数", - "Percent": "百分比", - "String": "字符串", - "Password": "密码", - "Advanced type": "高级类型", - "Formula": "公式", - "Formula description": "基于同一条记录中的其他字段计算出一个值。", - "Syntax references": "语法参考", - "Math.js comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types": "Math.js 包含大量内置函数和常量,并提供了集成的解决方案来处理不同的数据类型。", - "Formula.js supports most Microsoft Excel formula functions.": "Formula.js 支持大部分 Mircrosoft Excel 公式。", - "Choices": "选择类型", - "Checkbox": "勾选", - "Display when unchecked": "未勾选时显示 ", - "Single select": "下拉菜单(单选)", - "Multiple select": "下拉菜单(多选)", - "Radio group": "单选框", - "Checkbox group": "复选框", - "China region": "中国行政区", - "Date & Time": "日期 & 时间", - "Datetime": "日期", - "Relation": "关系类型", - "Link to": "关联", - "Link to description": "用于快速创建表关系,可兼容大多数普通场景。适合非开发人员使用。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。创建后,将同时在目标数据表中生成当前数据表的关联字段。", - "Sub-table": "子表格", - "System info": "系统信息", - "Created at": "创建日期", - "Last updated at": "最后修改日期", - "Created by": "创建人", - "Last updated by": "最后修改人", - "Add field": "添加字段", - "Field display name": "字段名称", - "Field type": "字段类型", - "Field interface": "字段类型", - "Date format": "日期格式", - "Year/Month/Day": "年/月/日", - "Year-Month-Day": "年-月-日", - "Day/Month/Year": "日/月/年", - "Show time": "显示时间", - "Time format": "时间格式", - "12 hour": "12 小时制", - "24 hour": "24 小时制", - "Relationship type": "关系类型", - "Inverse relationship type": "反向关系类型", - "Source collection": "源数据表", - "Source key": "源数据表字段标识", - "Target collection": "目标数据表", - "Through collection": "中间数据表", - "Target key": "目标数据表字段标识", - "Foreign key": "外键", - "One to one": "一对一", - "One to many": "一对多", - "Many to one": "多对一", - "Many to many": "多对多", - "Foreign key 1": "外键1", - "Foreign key 2": "外键2", - "One to one description": "用于创建一对一关系,比如一个用户会有一套个人资料。", - "One to many description": "用于创建一对多关系,比如一个国家会有多个城市。作为字段存在时,它是一个子表格用于显示目标数据表的数据。创建后,会在目标数据表里自动生成一个多对一字段。", - "Many to one description": "用于创建多对一关系,比如一个城市只能属于一个国家,一个国家可以有多个城市。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。创建后,会在目标数据表里自动生成一个多对一字段。", - "Many to many description": "用于创建多对多关系,比如一个学生会有多个老师,一个老师也会有多个学生。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。", - "Generated automatically if left blank": "留空时,自动生成中间表", - "Display association fields": "显示关联表的字段", - "Display field title": "显示字段标题", - "Field component": "字段组件", - "Allow multiple": "允许添加/关联多条", - "Allow dissociate": "允许移除已关联记录", - "Quick upload": "快速上传", - "Select file": "选择文件", - "Subtable": "子表格", - "Sub-form": "子表单", - "Sub-form(Popover)":"子表单(弹窗)", - "Sub-details":"子详情", - "Record picker": "数据选择器", - "Toggles the subfield mode": "切换子字段模式", - "Selector mode": "选择器模式", - "Subtable mode": "子表格模式", - "Subform mode": "子表单模式", - "Field mode":"字段组件", - "Allow add new data":"允许添加数据", - "Edit block title": "编辑区块标题", - "Block title": "区块标题", - "Pattern": "模式", - "Operator": "运算符", - "Editable": "可编辑", - "Readonly": "只读(禁止编辑)", - "Easy-reading": "只读(阅读模式)", - "Add filter": "添加筛选条件", - "Add filter group": "添加筛选分组", - "Comparision": "值比较", - "is": "等于", - "is not": "不等于", - "contains": "包含", - "does not contain": "不包含", - "starts with": "开头是", - "not starts with": "开头不是", - "ends with": "结尾是", - "not ends with": "结尾不是", - "is empty": "为空", - "is not empty": "不为空", - "Edit chart": "编辑图表", - "Add text": "添加文本", - "Filterable fields": "可筛选字段", - "Edit button": "编辑按钮", - "Hide": "隐藏", - "Enable actions": "启用操作", - "Import": "导入", - "Export": "导出", - "Customize": "自定义", - "Custom": "自定义", - "Function": "Function", - "Popup form": "Popup form", - "Flexible popup": "Flexible popup", - "Configure actions": "配置操作", - "Display order number": "显示序号", - "Enable drag and drop sorting": "启用拖拽排序", - "Triggered when the row is clicked": "点击表格行时触发", - "Add tab": "添加标签页", - "Disable tabs": "禁用标签页", - "Details": "详情", - "Edit tab": "编辑标签页", - "Relationship blocks": "关系数据区块", - "Select record": "选择数据", - "Display name": "显示名称", - "Select icon": "选择图标", - "Custom column name": "自定义列名称", - "Edit description": "编辑描述", - "Required": "必填", - "Unique": "不允许重复", - "Label field": "标签字段", - "Default is the ID field": "默认为 ID 字段", - "Set default sorting rules": "设置排序规则", + 'Delete record': '删除数据', + 'Create collection': '创建数据表', + 'Collection display name': '数据表名称', + 'Collection name': '数据表标识', + Inherits: '继承', + 'Generate ID field automatically': '自动生成 ID 字段', + 'Store the creation user of each record': '记录创建人', + 'Store the last update user of each record': '记录最后更新人', + 'Store the creation time of each record': '记录创建时间', + 'Store the last update time of each record': '记录最后更新时间', + 'More options': '更多选项', + 'Records can be sorted': '可以对行记录进行排序', + 'Calendar collection': '日历数据表', + 'General collection': '普通数据表', + 'Connect to database view': '连接数据库视图', + 'Source collections': '来源数据表', + 'Field source': '来源字段', + Preview: '预览', + 'Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.': + '随机生成,可修改。支持英文、数字和下划线,必须以英文字母开头。', + Edit: '编辑', + 'Edit collection': '编辑数据表', + 'Configure field': '配置字段', + 'Configure fields': '配置字段', + 'Configure columns': '配置字段', + 'Edit field': '编辑字段', + Override: '重写', + 'Override field': '重写字段', + 'Configure fields of {{title}}': '「{{title}}」的字段配置', + 'Association fields filter': '关系筛选', + 'PK & FK fields': '主外键字段', + 'Association fields': '关系字段', + 'Choices fields': '选项字段', + 'System fields': '系统字段', + 'General fields': '普通字段', + 'Inherited fields': '继承字段', + 'Parent collection fields': '父表字段', + Basic: '基本类型', + 'Single line text': '单行文本', + 'Long text': '多行文本', + Phone: '手机号码', + Email: '电子邮箱', + Username: '用户名', + Null: '空值', + Boolean: '逻辑值', + Number: '数字', + Integer: '整数', + Percent: '百分比', + String: '字符串', + Password: '密码', + 'Advanced type': '高级类型', + Formula: '公式', + 'Formula description': '基于同一条记录中的其他字段计算出一个值。', + 'Syntax references': '语法参考', + 'Math.js comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types': + 'Math.js 包含大量内置函数和常量,并提供了集成的解决方案来处理不同的数据类型。', + 'Formula.js supports most Microsoft Excel formula functions.': 'Formula.js 支持大部分 Mircrosoft Excel 公式。', + Choices: '选择类型', + Checkbox: '勾选', + 'Display when unchecked': '未勾选时显示 ', + 'Single select': '下拉菜单(单选)', + 'Multiple select': '下拉菜单(多选)', + 'Radio group': '单选框', + 'Checkbox group': '复选框', + 'China region': '中国行政区', + 'Date & Time': '日期 & 时间', + Datetime: '日期', + Relation: '关系类型', + 'Link to': '关联', + 'Link to description': + '用于快速创建表关系,可兼容大多数普通场景。适合非开发人员使用。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。创建后,将同时在目标数据表中生成当前数据表的关联字段。', + 'Sub-table': '子表格', + 'System info': '系统信息', + 'Created at': '创建日期', + 'Last updated at': '最后修改日期', + 'Created by': '创建人', + 'Last updated by': '最后修改人', + 'Add field': '添加字段', + 'Field display name': '字段名称', + 'Field type': '字段类型', + 'Field interface': '字段类型', + 'Date format': '日期格式', + 'Year/Month/Day': '年/月/日', + 'Year-Month-Day': '年-月-日', + 'Day/Month/Year': '日/月/年', + 'Show time': '显示时间', + 'Time format': '时间格式', + '12 hour': '12 小时制', + '24 hour': '24 小时制', + 'Relationship type': '关系类型', + 'Inverse relationship type': '反向关系类型', + 'Source collection': '源数据表', + 'Source key': '源数据表字段标识', + 'Target collection': '目标数据表', + 'Through collection': '中间数据表', + 'Target key': '目标数据表字段标识', + 'Foreign key': '外键', + 'One to one': '一对一', + 'One to many': '一对多', + 'Many to one': '多对一', + 'Many to many': '多对多', + 'Foreign key 1': '外键1', + 'Foreign key 2': '外键2', + 'One to one description': '用于创建一对一关系,比如一个用户会有一套个人资料。', + 'One to many description': + '用于创建一对多关系,比如一个国家会有多个城市。作为字段存在时,它是一个子表格用于显示目标数据表的数据。创建后,会在目标数据表里自动生成一个多对一字段。', + 'Many to one description': + '用于创建多对一关系,比如一个城市只能属于一个国家,一个国家可以有多个城市。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。创建后,会在目标数据表里自动生成一个多对一字段。', + 'Many to many description': + '用于创建多对多关系,比如一个学生会有多个老师,一个老师也会有多个学生。作为字段存在时,它是一个下拉选择用于选择目标数据表的数据。', + 'Generated automatically if left blank': '留空时,自动生成中间表', + 'Display association fields': '显示关联表的字段', + 'Display field title': '显示字段标题', + 'Field component': '字段组件', + 'Allow multiple': '允许添加/关联多条', + 'Allow dissociate': '允许移除已关联记录', + 'Quick upload': '快速上传', + 'Select file': '选择文件', + Subtable: '子表格', + 'Sub-form': '子表单', + 'Sub-form(Popover)': '子表单(弹窗)', + 'Sub-details': '子详情', + 'Record picker': '数据选择器', + 'Toggles the subfield mode': '切换子字段模式', + 'Selector mode': '选择器模式', + 'Subtable mode': '子表格模式', + 'Subform mode': '子表单模式', + 'Field mode': '字段组件', + 'Allow add new data': '允许添加数据', + 'Edit block title': '编辑区块标题', + 'Block title': '区块标题', + Pattern: '模式', + Operator: '运算符', + Editable: '可编辑', + Readonly: '只读(禁止编辑)', + 'Easy-reading': '只读(阅读模式)', + 'Add filter': '添加筛选条件', + 'Add filter group': '添加筛选分组', + Comparision: '值比较', + is: '等于', + 'is not': '不等于', + contains: '包含', + 'does not contain': '不包含', + 'starts with': '开头是', + 'not starts with': '开头不是', + 'ends with': '结尾是', + 'not ends with': '结尾不是', + 'is empty': '为空', + 'is not empty': '不为空', + 'Edit chart': '编辑图表', + 'Add text': '添加文本', + 'Filterable fields': '可筛选字段', + 'Edit button': '编辑按钮', + Hide: '隐藏', + 'Enable actions': '启用操作', + Import: '导入', + Export: '导出', + Customize: '自定义', + Custom: '自定义', + Function: 'Function', + 'Popup form': 'Popup form', + 'Flexible popup': 'Flexible popup', + 'Configure actions': '配置操作', + 'Display order number': '显示序号', + 'Enable drag and drop sorting': '启用拖拽排序', + 'Triggered when the row is clicked': '点击表格行时触发', + 'Add tab': '添加标签页', + 'Disable tabs': '禁用标签页', + Details: '详情', + 'Edit tab': '编辑标签页', + 'Relationship blocks': '关系数据区块', + 'Select record': '选择数据', + 'Display name': '显示名称', + 'Select icon': '选择图标', + 'Custom column name': '自定义列名称', + 'Edit description': '编辑描述', + Required: '必填', + Unique: '不允许重复', + 'Label field': '标签字段', + 'Default is the ID field': '默认为 ID 字段', + 'Set default sorting rules': '设置排序规则', - "Set validation rules": "设置验证规则", - "Max length": "最大长度", - "Min length": "最小长度", - "Maximum": "最大值", - "Minimum": "最小值", - "Max length must greater than min length": "最大长度必须大于最小长度", - "Min length must less than max length": "最小长度必须小于最大长度", - "Maximum must greater than minimum": "最大值必须大于最小值", - "Minimum must less than maximum": "最小值必须小于最大值", - "Validation rule": "验证规则", - "Add validation rule": "新增验证规则", - "Format": "格式", - "Regular expression": "正则表达式", - "Error message": "错误消息", - "Length": "长度", - "The field value cannot be greater than ": "数值不能大于", - "The field value cannot be less than ": "数值不能小于", - "The field value is not an integer number": "数字不是整数", - "Set default value": "设置默认值", - "Default value": "默认值", + 'Set validation rules': '设置验证规则', + 'Max length': '最大长度', + 'Min length': '最小长度', + Maximum: '最大值', + Minimum: '最小值', + 'Max length must greater than min length': '最大长度必须大于最小长度', + 'Min length must less than max length': '最小长度必须小于最大长度', + 'Maximum must greater than minimum': '最大值必须大于最小值', + 'Minimum must less than maximum': '最小值必须小于最大值', + 'Validation rule': '验证规则', + 'Add validation rule': '新增验证规则', + Format: '格式', + 'Regular expression': '正则表达式', + 'Error message': '错误消息', + Length: '长度', + 'The field value cannot be greater than ': '数值不能大于', + 'The field value cannot be less than ': '数值不能小于', + 'The field value is not an integer number': '数字不是整数', + 'Set default value': '设置默认值', + 'Default value': '默认值', - "is before": "早于", - "is after": "晚于", - "is on or after": "不早于", - "is on or before": "不晚于", - "is between": "介于", + 'is before': '早于', + 'is after': '晚于', + 'is on or after': '不早于', + 'is on or before': '不晚于', + 'is between': '介于', - "Upload": "上传", + Upload: '上传', - "Select level": "选择层级", - "Province": "省", - "City": "市", - "Area": "区/县", - "Street": "乡镇/街道", - "Village": "村/居委会", - "Must select to the last level": "必须选到最后一级", + 'Select level': '选择层级', + Province: '省', + City: '市', + Area: '区/县', + Street: '乡镇/街道', + Village: '村/居委会', + 'Must select to the last level': '必须选到最后一级', - "Move {{title}} to": "将 {{title}} 移动到", - "Target position": "目标位置", - "After": "之后", - "Before": "之前", + 'Move {{title}} to': '将 {{title}} 移动到', + 'Target position': '目标位置', + After: '之后', + Before: '之前', - "Add {{type}} before \"{{title}}\"": "在 \"{{title}}\" 前插入{{type}}", - "Add {{type}} after \"{{title}}\"": "在 \"{{title}}\" 前插入{{type}}", - "Add {{type}} in \"{{title}}\"": "在 \"{{title}}\" 里插入{{type}}", + 'Add {{type}} before "{{title}}"': '在 "{{title}}" 前插入{{type}}', + 'Add {{type}} after "{{title}}"': '在 "{{title}}" 前插入{{type}}', + 'Add {{type}} in "{{title}}"': '在 "{{title}}" 里插入{{type}}', - "Original name": "原名称", - "Custom name": "自定义名称", - "Custom Title": "自定义标题", + 'Original name': '原名称', + 'Custom name': '自定义名称', + 'Custom Title': '自定义标题', - "Options": "选项", - "Option value": "选项值", - "Option label": "选项标签", - "Color": "颜色", - "Add option": "添加选项", - "Related collection": "关系表", - "Allow linking to multiple records": "允许关联多条记录", + Options: '选项', + 'Option value': '选项值', + 'Option label': '选项标签', + Color: '颜色', + 'Add option': '添加选项', + 'Related collection': '关系表', + 'Allow linking to multiple records': '允许关联多条记录', - "Daily": "每天", - "Weekly": "每周", - "Monthly": "每月", - "Yearly": "每年", - "Repeats": "重复", - "Configure calendar": "配置日历", - "Title field": "标题字段", - "Custom title": "自定义标题", - "Show lunar": "展示农历", - "Start date field": "开始日期字段", - "End date field": "结束日期字段", - "Navigate": "分页", - "Title": "标题", - "Description": "描述", - "Select view": "切换视图", - "Reset": "重置", - "Importable fields": "可导入字段", - "Exportable fields": "可导出字段", - "Saved successfully": "保存成功", - "Nickname": "昵称", - "Sign in": "登录", - "Sign in via account": "账号密码登录", - "Sign in via phone": "手机号登录", - "Create an account": "注册账号", - "Sign up": "注册", - "Confirm password": "确认密码", - "Log in with an existing account": "使用已有账号登录", - "Signed up successfully. It will jump to the login page.": "注册成功,将跳转登录页。", - "Password mismatch": "重复密码不匹配", - "Users": "用户", - "Verification code": "验证码", - "Send code": "发送验证码", - "Retry after {{count}} seconds": "{{count}} 秒后重试", - '2 to 16 characters (excluding @.<>"\'/)': '2到16个字符(不包含@.<>"\'/)', + Daily: '每天', + Weekly: '每周', + Monthly: '每月', + Yearly: '每年', + Repeats: '重复', + 'Configure calendar': '配置日历', + 'Title field': '标题字段', + 'Custom title': '自定义标题', + 'Show lunar': '展示农历', + 'Start date field': '开始日期字段', + 'End date field': '结束日期字段', + Navigate: '分页', + Title: '标题', + Description: '描述', + 'Select view': '切换视图', + Reset: '重置', + 'Importable fields': '可导入字段', + 'Exportable fields': '可导出字段', + 'Saved successfully': '保存成功', + Nickname: '昵称', + 'Sign in': '登录', + 'Sign in via account': '账号密码登录', + 'Sign in via phone': '手机号登录', + 'Create an account': '注册账号', + 'Sign up': '注册', + 'Confirm password': '确认密码', + 'Log in with an existing account': '使用已有账号登录', + 'Signed up successfully. It will jump to the login page.': '注册成功,将跳转登录页。', + 'Password mismatch': '重复密码不匹配', + Users: '用户', + 'Verification code': '验证码', + 'Send code': '发送验证码', + 'Retry after {{count}} seconds': '{{count}} 秒后重试', + 'Must be 2-16 characters in length (excluding @.<>"\'/)': '长度为2到16个字符(不能包含@.<>"\'/)', - "Roles": "角色", - "Add role": "添加角色", - "Role name": "角色名称", - "Configure": "配置", - "Configure permissions": "配置权限", - "Edit role": "编辑角色", + Roles: '角色', + 'Add role': '添加角色', + 'Role name': '角色名称', + Configure: '配置', + 'Configure permissions': '配置权限', + 'Edit role': '编辑角色', - "Action permissions": "数据表操作权限", - "Menu permissions": "菜单访问权限", + 'Action permissions': '数据表操作权限', + 'Menu permissions': '菜单访问权限', - "Menu item name": "菜单名称", - "Allow access": "允许访问", + 'Menu item name': '菜单名称', + 'Allow access': '允许访问', - "Action name": "操作名称", - "Allow action": "允许操作", - "Action scope": "可操作数据范围", - "Operate on new data": "对新增数据操作", - "Operate on existing data": "对已有数据操作", + 'Action name': '操作名称', + 'Allow action': '允许操作', + 'Action scope': '可操作数据范围', + 'Operate on new data': '对新增数据操作', + 'Operate on existing data': '对已有数据操作', - "Yes": "是", - "No": "否", + Yes: '是', + No: '否', - "Red": "薄暮", - "Magenta": "法式洋红", - "Volcano": "火山", - "Orange": "日暮", - "Gold": "金盏花", - "Lime": "青柠", - "Green": "极光绿", - "Cyan": "明青", - "Blue": "拂晓蓝", - "Geek blue": "极客蓝", - "Purple": "酱紫", - "Default": "默认", + Red: '薄暮', + Magenta: '法式洋红', + Volcano: '火山', + Orange: '日暮', + Gold: '金盏花', + Lime: '青柠', + Green: '极光绿', + Cyan: '明青', + Blue: '拂晓蓝', + 'Geek blue': '极客蓝', + Purple: '酱紫', + Default: '默认', - "Add card": "添加卡片", - "edit title": "修改标题", - "Turn pages": "翻页", - "Others": "其他", - "Save as template": "保存为模板", - "Save as block template": "保存为区块模板", - "Block templates": "区块模板", - "Convert reference to duplicate": "模板引用转为复制", - "Template name": "模板名称", - "Block type": "区块类型", - "No blocks to connect": "没有可连接的区块", - "Action column": "操作列", - "Records per page": "每页显示数量", - "(Fields only)": "(仅字段)", - "Button title": "按钮标题", - "Button icon": "按钮图标", - "Submitted successfully": "提交成功", - "Operation succeeded": "操作成功", - "Operation failed": "操作失败", - "Open mode": "打开方式", - "Popup size": "弹窗尺寸", - "Small": "较窄", - "Middle": "中等", - "Large": "较宽", + 'Add card': '添加卡片', + 'edit title': '修改标题', + 'Turn pages': '翻页', + Others: '其他', + 'Save as template': '保存为模板', + 'Save as block template': '保存为区块模板', + 'Block templates': '区块模板', + 'Convert reference to duplicate': '模板引用转为复制', + 'Template name': '模板名称', + 'Block type': '区块类型', + 'No blocks to connect': '没有可连接的区块', + 'Action column': '操作列', + 'Records per page': '每页显示数量', + '(Fields only)': '(仅字段)', + 'Button title': '按钮标题', + 'Button icon': '按钮图标', + 'Submitted successfully': '提交成功', + 'Operation succeeded': '操作成功', + 'Operation failed': '操作失败', + 'Open mode': '打开方式', + 'Popup size': '弹窗尺寸', + Small: '较窄', + Middle: '中等', + Large: '较宽', 'Menu item title': '菜单项名称', 'Menu item icon': '菜单项图标', - 'Target': '目标', - 'Position': '位置', + Target: '目标', + Position: '位置', 'Insert before': '在前面插入', 'Insert after': '在后面插入', 'UI Editor': '界面配置', - 'ASC': '升序', - 'DESC': '降序', + ASC: '升序', + DESC: '降序', 'Add sort field': '添加排序字段', - 'ID': 'ID', - 'Identifier for program usage. Support letters, numbers and underscores, must start with an letter.': '用于程序使用的标识符,支持字母、数字和下划线,必须以字母开头。', - 'Drawer': '抽屉', - 'Dialog': '对话框', + ID: 'ID', + 'Identifier for program usage. Support letters, numbers and underscores, must start with an letter.': + '用于程序使用的标识符,支持字母、数字和下划线,必须以字母开头。', + Drawer: '抽屉', + Dialog: '对话框', 'Delete action': '删除操作', 'Custom column title': '自定义列标题', 'Column title': '列标题', @@ -560,15 +568,15 @@ export default { 'The field has been deleted': '字段已删除', 'When submitting the following fields, the saved values are': '提交以下字段时,保存的值为', 'After successful submission': '提交成功后', - 'Then': '然后', + Then: '然后', 'Stay on current page': '停留在当前页面', 'Redirect to': '跳转到', 'Save action': '保存操作', - 'Exists': '存在', + Exists: '存在', 'Add condition': '添加条件', 'Add condition group': '添加条件分组', - 'exists': '存在', + exists: '存在', 'not exists': '不存在', '=': '=', '≠': '≠', @@ -578,11 +586,11 @@ export default { '≤': '≤', 'Role UID': '角色标识', - 'Precision': '精确度', + Precision: '精确度', 'Rich Text': '富文本', 'Junction collection': '中间表', 'Leave it blank, unless you need a custom intermediate table': '默认留空,除非你需要一个自定义的中间表', - 'Fields': '字段', + Fields: '字段', 'Edit field title': '编辑字段标题', 'Field title': '字段标题', 'Original field title: ': '原始字段标题:', @@ -607,41 +615,43 @@ export default { 'Role display name': '角色名称', 'Default role': '默认角色', - 'All collections use general action permissions by default; permission configured individually will override the default one.': '所有数据表都默认使用通用数据操作权限;同时,可以针对每个数据表单独配置权限。', - 'Allows configuration of the whole system, including UI, collections, permissions, etc.': '允许配置系统,包括界面配置、数据表配置、权限配置、系统配置等全部配置项', + 'All collections use general action permissions by default; permission configured individually will override the default one.': + '所有数据表都默认使用通用数据操作权限;同时,可以针对每个数据表单独配置权限。', + 'Allows configuration of the whole system, including UI, collections, permissions, etc.': + '允许配置系统,包括界面配置、数据表配置、权限配置、系统配置等全部配置项', 'New menu items are allowed to be accessed by default.': '新增菜单项默认允许访问', 'Global permissions': '全局配置', 'General permissions': '通用配置', 'Global action permissions': '全局操作权限', 'General action permissions': '通用操作权限', - "Plugin settings permissions":"插件配置权限", - 'Allow to desgin pages':"允许界面配置", - "Allow to manage plugins":"允许管理插件", - "Allow to configure plugins":"允许管理配置中心", + 'Plugin settings permissions': '插件配置权限', + 'Allow to desgin pages': '允许界面配置', + 'Allow to manage plugins': '允许管理插件', + 'Allow to configure plugins': '允许管理配置中心', 'Allows to configure interface': '允许配置界面', 'Allows to install, activate, disable plugins': '允许安装、激活、禁用插件', 'Allows to configure plugins': '允许配置插件', 'Action display name': '操作名称', - 'Allow': '允许', + Allow: '允许', 'Data scope': '数据范围', 'Action on new records': '对新增数据操作', 'Action on existing records': '对已有数据操作', 'All records': '所有数据', 'Own records': '自己的数据', 'Permission policy': '权限策略', - 'Individual': '单独配置', - 'General': '通用配置', - 'Accessible': '允许访问', + Individual: '单独配置', + General: '通用配置', + Accessible: '允许访问', 'Configure permission': '配置权限', 'Action permission': '操作权限', 'Field permission': '字段权限', 'Scope name': '数据范围名称', 'Unsaved changes': '未保存修改', - 'Are you sure you don\'t want to save?': '你确定不保存修改吗?', - 'Dragging': '拖拽中', + "Are you sure you don't want to save?": '你确定不保存修改吗?', + Dragging: '拖拽中', - 'Popup': '打开弹窗', + Popup: '打开弹窗', 'Trigger workflow': '触发工作流', 'Request API': '请求API', 'Assign field values': '字段赋值', @@ -650,7 +660,7 @@ export default { 'Current user': '当前用户', 'Current record': '当前记录', 'Current time': '当前时间', - 'Now': '现在', + Now: '现在', 'Popup close method': '弹窗关闭方式', 'Automatic close': '自动关闭', 'Manually close': '手动关闭', @@ -658,10 +668,12 @@ export default { 'Save record': '保存数据', 'Updated successfully': '更新成功', 'After successful save': '保存成功后', - 'After clicking the custom button, the following field values will be assigned according to the following form.': '点击当前自定义按钮时,以下字段值将按照以下表单赋值。', - 'After clicking the custom button, the following fields of the current record will be saved according to the following form.': '点击当前自定义按钮时,当前数据以下字段将按照以下表单保存。', + 'After clicking the custom button, the following field values will be assigned according to the following form.': + '点击当前自定义按钮时,以下字段值将按照以下表单赋值。', + 'After clicking the custom button, the following fields of the current record will be saved according to the following form.': + '点击当前自定义按钮时,当前数据以下字段将按照以下表单保存。', 'Button background color': '按钮颜色', - 'Highlight': '高亮', + Highlight: '高亮', 'Danger red': '红色', 'Custom request': '自定义请求', 'Request settings': '请求设置', @@ -675,51 +687,51 @@ export default { 'After successful request': '请求成功之后', 'Add exportable field': '添加可导出字段', // 'Custom column title': '自定义列标题', - "Audit logs": "操作记录", - "Record ID": "数据 ID", - "User": "用户", - "Field": "字段", - "Select": "选择", - "Select field": "选择字段", - "Field value changes": "变更记录", - "One to one (has one)": "一对一(has one)", - "One to one (belongs to)": "一对一(belongs to)", - "Use the same time zone (GMT) for all users": "所有用户使用同一时区 (格林尼治标准时间)", - "Province/city/area name": "省市区名称", - "Enabled languages": "启用的语言", - "View all plugins": "查看所有插件", - "Print": "打印", - "Done": "完成", + 'Audit logs': '操作记录', + 'Record ID': '数据 ID', + User: '用户', + Field: '字段', + Select: '选择', + 'Select field': '选择字段', + 'Field value changes': '变更记录', + 'One to one (has one)': '一对一(has one)', + 'One to one (belongs to)': '一对一(belongs to)', + 'Use the same time zone (GMT) for all users': '所有用户使用同一时区 (格林尼治标准时间)', + 'Province/city/area name': '省市区名称', + 'Enabled languages': '启用的语言', + 'View all plugins': '查看所有插件', + Print: '打印', + Done: '完成', 'Sign up successfully, and automatically jump to the sign in page': '注册成功,即将跳转到登录页面', - 'ACL': '访问控制', + ACL: '访问控制', 'Collection manager': '数据表管理', 'Plugin manager': '插件管理器', - 'Local': '本地', + Local: '本地', 'Built-in': '内置', - 'Marketplace': '插件市场', + Marketplace: '插件市场', 'Coming soon...': '敬请期待...', 'All plugin settings': '所有插件配置', - 'Bookmark': '书签', + Bookmark: '书签', 'Manage all settings': '管理所有配置', 'Create inverse field in the target collection': '在目标数据表里创建反向关系字段', 'Inverse field name': '反向关系字段标识', 'Inverse field display name': '反向关系字段名称', - "Bulk update": "批量更新", - "After successful bulk update": "批量成功更新后", - "Bulk edit": "批量编辑", - "Data will be updated": "更新的数据", - "Selected": "选中", - "All": "所有", - "Update selected data?": "更新选中的数据吗?", - "Update all data?": "更新全部数据吗?", - "Remains the same": "不更新", - "Changed to": "修改为", - "Clear": "清空", - "Add attach": "增加关联", - "Please select the records to be updated": "请选择要更新的记录", - "Selector": "选择器", - "Inner": "里面", - "Search and select collection": "搜索并选择数据表", + 'Bulk update': '批量更新', + 'After successful bulk update': '批量成功更新后', + 'Bulk edit': '批量编辑', + 'Data will be updated': '更新的数据', + Selected: '选中', + All: '所有', + 'Update selected data?': '更新选中的数据吗?', + 'Update all data?': '更新全部数据吗?', + 'Remains the same': '不更新', + 'Changed to': '修改为', + Clear: '清空', + 'Add attach': '增加关联', + 'Please select the records to be updated': '请选择要更新的记录', + Selector: '选择器', + Inner: '里面', + 'Search and select collection': '搜索并选择数据表', 'Please fill in the iframe URL': '请填写嵌入的地址', 'Fix block': '固定区块', @@ -729,35 +741,38 @@ export default { 'Display page title': '显示页面标题', 'Edit page title': '编辑页面标题', 'Enable page tabs': '启用页面选项卡', - "Enable link": "启用链接", + 'Enable link': '启用链接', 'Column width': '列宽', - 'Sortable': '可排序的', - 'Constant': '常量', + Sortable: '可排序的', + Constant: '常量', 'Select a variable': '选择变量', - "Insert": "插入", - "Insert if not exists": "不存在时插入", - "Insert if not exists, or update": "不存在时插入,否则更新", + Insert: '插入', + 'Insert if not exists': '不存在时插入', + 'Insert if not exists, or update': '不存在时插入,否则更新', 'System variables': '系统变量', 'Date variables': '日期变量', 'Double click to choose entire object': '双击选择整个对象', - 'True': '真', - 'False': '假', - 'Prettify': '格式化', - 'Theme': '主题', + True: '真', + False: '假', + Prettify: '格式化', + Theme: '主题', 'Default theme': '默认主题', 'Compact theme': '紧凑主题', - "This is likely a NocoBase internals bug. Please open an issue at <1>here": "这可能是 NocoBase 内部的问题,你可以在<1>这里将该错误反馈给我们,我们会尽快修复", - "Render Failed": "渲染失败", - "Feedback": "反馈问题", - "Try again": "重试一下", + 'This is likely a NocoBase internals bug. Please open an issue at <1>here': + '这可能是 NocoBase 内部的问题,你可以在<1>这里将该错误反馈给我们,我们会尽快修复', + 'Render Failed': '渲染失败', + Feedback: '反馈问题', + 'Try again': '重试一下', 'Click or drag file to this area to upload': '点击或拖拽文件到此区域上传', 'Support for a single or bulk upload, file size should not exceed': '支持单个或批量上传,文件大小不能超过', 'Default title for each record': '用作数据的默认标题', - 'If collection inherits, choose inherited collections as templates': '当前表有继承关系时,可选择继承链路上的表作为模板来源', + 'If collection inherits, choose inherited collections as templates': + '当前表有继承关系时,可选择继承链路上的表作为模板来源', 'Select an existing piece of data as the initialization data for the form': '选择一条已有的数据作为表单的初始化数据', - 'Only the selected fields will be used as the initialization data for the form': '仅选择的字段才会作为表单的初始化数据', + 'Only the selected fields will be used as the initialization data for the form': + '仅选择的字段才会作为表单的初始化数据', 'Template Data': '模板数据', 'Data fields': '数据字段', 'Add template': '添加模板', @@ -770,44 +785,45 @@ export default { 'The application is reloading, please do not close the page.': '应用正在重新加载,请勿关闭页面。', 'Application reloading': '应用重新加载中', 'Restart application': '重启应用', - "Allows to clear cache, reboot application": "允许清除缓存,重启应用", - 'The will interrupt service, it may take a few seconds to restart. Are you sure to continue?': '重启将会中断当前服务,这个过程可能需要一点时间,确定要继续吗?', - 'Restart': '重启', + 'Allows to clear cache, reboot application': '允许清除缓存,重启应用', + 'The will interrupt service, it may take a few seconds to restart. Are you sure to continue?': + '重启将会中断当前服务,这个过程可能需要一点时间,确定要继续吗?', + Restart: '重启', 'Clear cache': '清除缓存', - "Duplicate":"复制", - "Duplicating":"复制中", - "Duplicate mode":"复制方式", - "Quick duplicate":"快速复制", - "Duplicate and continue":"复制并继续", - "Please configure the duplicate fields":"请配置要复制的字段", - "Add":"创建", - "Add new mode":"添加方式", - "Quick add":"快捷添加", - "Modal add":"弹窗添加", - 'Save mode':"保存方式", - "First or create":"不存在时则新增,存在时不处理", - "Update or create":"不存在时新增,存在时更新", - "Find by the following fields":"通过以下字段查找", - "Create":"仅新增", - "Current form":"当前表单", - "Current object":"当前对象", - "Quick create": "快速创建", - "Dropdown": "下拉菜单", - "Pop-up": "弹窗", - "File manager": "文件管理器", - "Direct duplicate": "直接复制", - "Copy into the form and continue to fill in": "复制到表单并继续填写", - "Linkage with form fields":"从表单字段联动", - "Failed to load plugin": "插件加载失败", - "Allow add new, update and delete actions":"允许增删改操作", - "Date display format":"日期显示格式", - "Assign data scope for the template":"为模板指定数据范围", - "Table selected records":"表格中选中的记录", + Duplicate: '复制', + Duplicating: '复制中', + 'Duplicate mode': '复制方式', + 'Quick duplicate': '快速复制', + 'Duplicate and continue': '复制并继续', + 'Please configure the duplicate fields': '请配置要复制的字段', + Add: '创建', + 'Add new mode': '添加方式', + 'Quick add': '快捷添加', + 'Modal add': '弹窗添加', + 'Save mode': '保存方式', + 'First or create': '不存在时则新增,存在时不处理', + 'Update or create': '不存在时新增,存在时更新', + 'Find by the following fields': '通过以下字段查找', + Create: '仅新增', + 'Current form': '当前表单', + 'Current object': '当前对象', + 'Quick create': '快速创建', + Dropdown: '下拉菜单', + 'Pop-up': '弹窗', + 'File manager': '文件管理器', + 'Direct duplicate': '直接复制', + 'Copy into the form and continue to fill in': '复制到表单并继续填写', + 'Linkage with form fields': '从表单字段联动', + 'Failed to load plugin': '插件加载失败', + 'Allow add new, update and delete actions': '允许增删改操作', + 'Date display format': '日期显示格式', + 'Assign data scope for the template': '为模板指定数据范围', + 'Table selected records': '表格中选中的记录', - "Tag":"标签", - "Tag color field":"标签颜色字段", - "Sync successfully":"同步成功", - "Sync from form fields":"同步表单字段", - "Select all":"全选", - "Determine whether a record exists by the following fields": "通过以下字段判断记录是否存在" -} + Tag: '标签', + 'Tag color field': '标签颜色字段', + 'Sync successfully': '同步成功', + 'Sync from form fields': '同步表单字段', + 'Select all': '全选', + 'Determine whether a record exists by the following fields': '通过以下字段判断记录是否存在', +}; diff --git a/packages/plugins/users/src/server/collections/users.ts b/packages/plugins/users/src/server/collections/users.ts index ea0fe0517..bb6db245e 100644 --- a/packages/plugins/users/src/server/collections/users.ts +++ b/packages/plugins/users/src/server/collections/users.ts @@ -34,7 +34,7 @@ export default { }, }, { - interface: 'username', + interface: 'input', type: 'string', name: 'username', unique: true, diff --git a/packages/plugins/users/src/server/migrations/20230908164036-update-username-interface.ts b/packages/plugins/users/src/server/migrations/20230908164036-update-username-interface.ts new file mode 100644 index 000000000..f63a9212a --- /dev/null +++ b/packages/plugins/users/src/server/migrations/20230908164036-update-username-interface.ts @@ -0,0 +1,24 @@ +import { Migration } from '@nocobase/server'; + +export default class UpdateUserNameInterfaceMigration extends Migration { + async up() { + const match = await this.app.version.satisfies('<=0.13.0-alpha.8'); + if (!match) { + return; + } + const Field = this.context.db.getRepository('fields'); + const field = await Field.findOne({ + filter: { + name: 'username', + collectionName: 'users', + interface: 'username', + }, + }); + if (!field) { + return; + } + await field.update({ interface: 'input' }); + } + + async down() {} +}