Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add english support for system modules #314

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions web/src/locales/lang/en/system.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
export default {
selectData: 'Please select a piece of data',
modifyDataPrompt: 'Sorry, only unapproved documents can be edited!',
role: {
title: 'Role List',
addRole: 'Add Role',
editRole: 'Edit Role',
menuAllocation: 'Menu Allocation',
titleNotice: 'The role list can assign different permissions to characters by clicking the gear button in the operation bar',
header: {
roleName: 'Role Name',
status: 'Status',
viewAllData: 'View all data',
allData: 'All Data',
viewPersonalData: 'View personal data',
personalData: 'Personal Data',
blockPurchasePrice: 'Block purchase price',
blockSalesPrice: 'Block sales price',
blockRetailPrice: 'Block retail price',
enable: 'Enable',
disable: 'Disable',
},
table: {
roleName: 'Role Name',
type: 'Type',
priceBlocking: 'Price Blocking',
status: 'Status',
remark: 'Remark',
createTime: 'Create Time',
action: 'Action',
},
form: {
roleName: 'Role Name',
type: 'Type',
priceBlocking: 'Price Blocking',
status: 'Status',
remark: 'Remark',
}
},
department: {
title: 'Department List',
addDepartment: 'Add department',
editDepartment: 'Edit department',
header: {
name: 'Department Name',
},
table: {
name: 'Department Name',
number: 'Department Number',
manager: 'Department Manager',
status: 'Status',
createTime: 'Create Time',
remark: 'Remark',
action: 'Action',
},
form: {
name: 'Name',
number: 'Number',
parent: 'Superior Department',
manager: 'Manager',
status: 'Status',
sort: 'Sort',
remark: 'Remark',
enable: 'Enable',
disable: 'Disable',
notice: 'If not filled in, it defaults to the parent department',
}
},
menu: {
title: 'Menu List',
addMenu: 'Add Menu',
editMenu: 'Edit Menu',
table: {
menuTitle: 'Menu Title',
icon: 'Icon',
path: 'Path',
component: 'Component',
sort: 'Sort',
status: 'Status',
createTime: 'Create Time',
},
form:{
menuType: 'Menu type',
catalogue: 'Catalogue',
menu: 'Menu',
rootMenu: 'Root menu',
menuName: 'Menu name',
menuTitle: 'Menu title',
menuEnglishTitle: 'Menu english title',
parent: 'Parent menu',
sort: 'Sort',
icon: 'Icon',
routeAddress: 'Route address',
componentPath: 'Component',
status: 'Status',
enable: 'Enable',
disable: 'Disable',
isExternalLink: 'Is external link',
isCached: 'Is cached',
isDisplayed: 'Is displayed',
yes: 'Yes',
no: 'No',
notice: 'If not filled in, it defaults to the directory'
}
},
configure: {
title: 'System Configuration',
tip: 'The main function of this page is to configure the current system.',
name: 'Company Name',
inputName: 'Please enter the company name',
contact: 'Contact',
inputContact: 'Please enter the contact',
address: 'Company Address',
inputAddress: 'Please enter the company address',
phone: 'Phone',
inputPhone: 'Please enter the phone',
fax: 'Fax',
inputFax: 'Please enter the fax',
postalCode: 'Postal Code',
inputPostalCode: 'Please enter the postal code',
salesProtocol: 'Sales Protocol',
inputSalesProtocol: 'Please enter the sales protocol',
noticeOne: 'After changing the company name, please refresh the browser to take effect',
noticeTwo: 'Optional',
submit: 'Submit',
updateSuccess: 'Update successful',
updateFailed: 'Update failed',
}
}
129 changes: 129 additions & 0 deletions web/src/locales/lang/zh-CN/system.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
export default {
selectData: '请选择一条数据',
modifyDataPrompt: '抱歉,只有未审核的单据才能编辑!',
role: {
title: '角色列表',
addRole: '新增角色',
editRole: '编辑角色',
menuAllocation: '菜单分配',
titleNotice: '角色列表可以给角色赋予不同的权限, 点击操作栏中的齿轮按钮',
header: {
roleName: '角色名称',
status: '状态',
viewAllData: '查看全部数据',
allData: '全部数据',
viewPersonalData: '查看个人数据',
personalData: '个人数据',
blockPurchasePrice: '屏蔽采购价',
blockSalesPrice: '屏蔽销售价',
blockRetailPrice: '屏蔽零售价',
enable: '启用',
disable: '停用',
},
table: {
roleName: '角色名称',
type: '类型',
priceBlocking: '价格屏蔽',
status: '状态',
remark: '备注',
createTime: '创建时间',
action: '操作',
},
form: {
roleName: '角色名称',
type: '类型',
priceBlocking: '价格屏蔽',
status: '状态',
remark: '备注',
}
},
department: {
title: '部门列表',
addDepartment: '新增部门',
editDepartment: '编辑部门',
header: {
name: '部门名称',
},
table: {
name: '部门名称',
number: '部门编号',
manager: '部门负责人',
status: '状态',
createTime: '创建时间',
remark: '备注',
action: '操作',
},
form: {
name: '部门名称',
number: '部门编号',
parent: '上级部门',
manager: '部门负责人',
status: '状态',
sort: '排序',
remark: '备注',
enable: '启用',
disable: '停用',
notice: '如果不填写,则默认为父级部门',
}
},
menu: {
title: '菜单列表',
addMenu: '新增菜单',
editMenu: '编辑菜单',
table: {
menuTitle: '菜单标题',
icon: '图标',
path: '路径',
component: '组件',
sort: '排序',
status: '状态',
createTime: '创建时间',
},
form:{
menuType: '菜单类型',
catalogue: '目录',
menu: '菜单',
rootMenu: '根菜单',
menuName: '菜单名称',
menuTitle: '菜单标题',
menuEnglishTitle: '菜单英文标题',
parent: '上级菜单',
sort: '排序',
icon: '图标',
routeAddress: '路由地址',
componentPath: '组件路径',
status: '状态',
enable: '启用',
disable: '停用',
isExternalLink: '是否外链',
isCached: '是否缓存',
isDisplayed: '是否显示',
yes: '是',
no: '否',
notice: '如果不填写,则默认为目录'
}
},
configure: {
title: '系统配置',
tip: '此页面功能主要对当前系统进行一些配置。',
name: '公司名称',
inputName: '请输入公司名称',
contact: '联系人',
inputContact: '请输入联系人',
address: '公司地址',
inputAddress: '请输入公司地址',
phone: '公司电话',
inputPhone: '请输入公司电话',
fax: '公司传真',
inputFax: '请输入公司传真',
postalCode: '邮编',
inputPostalCode: '请输入邮编',
salesProtocol: '销售协议',
inputSalesProtocol: '请输入销售协议',
noticeOne: '更换公司名称后,请刷新浏览器生效',
noticeTwo: '选填',
submit: '提交',
updateSuccess: '更新成功',
updateFailed: '更新失败',
}
}
35 changes: 19 additions & 16 deletions web/src/views/sys/config/config.data.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { FormSchema } from '/@/components/Form';
import {useI18n} from "@/hooks/web/useI18n";

const colProps = {
span: 12,
};

const { t } = useI18n();

export const schemas: FormSchema[] = [
{
field: 'id',
Expand All @@ -14,68 +17,68 @@ export const schemas: FormSchema[] = [
{
field: 'companyName',
component: 'Input',
label: '公司名称',
helpMessage: '更换公司名称后,请刷新浏览器生效',
label: t('system.configure.name'),
helpMessage: t('system.configure.noticeOne'),
colProps,
componentProps: {
placeholder: '请输入公司名称',
placeholder: t('system.configure.inputName'),
},
defaultValue: 'EAIRP',
required: true,
},
{
field: 'companyContact',
component: 'Input',
label: '联系人',
label: t('system.configure.contact'),
colProps,
componentProps: {
placeholder: '请输入联系人',
placeholder: t('system.configure.inputContact'),
},
},
{
field: 'companyAddress',
component: 'Input',
label: '公司地址',
label: t('system.configure.address'),
colProps,
componentProps: {
placeholder: '请输入公司地址',
placeholder: t('system.configure.inputAddress'),
},
},
{
field: 'companyPhone',
component: 'Input',
label: '公司电话',
label: t('system.configure.phone'),
colProps,
componentProps: {
placeholder: '请输入公司电话',
placeholder: t('system.configure.inputPhone'),
},
},
{
field: 'companyFax',
component: 'Input',
label: '公司传真',
label: t('system.configure.fax'),
colProps,
componentProps: {
placeholder: '请输入公司传真',
placeholder: t('system.configure.inputFax'),
},
},
{
field: 'companyPostCode',
component: 'Input',
label: '公司邮编',
label: t('system.configure.postalCode'),
colProps,
componentProps: {
placeholder: '请输入公司邮编',
placeholder: t('system.configure.inputPostalCode'),
},
},
{
field: 'saleAgreement',
component: 'InputTextArea',
label: '销售协议',
subLabel: '( 选填 )',
label: t('system.configure.salesProtocol'),
subLabel: t('system.configure.noticeTwo'),
colProps,
componentProps: {
placeholder: '请输入销售协议',
placeholder: t('system.configure.inputSalesProtocol'),
rows: 4,
},
},
Expand Down
Loading
Loading