---初始化后台管理web页面项目

This commit is contained in:
2025-08-20 14:39:30 +08:00
parent ad49711a7e
commit 87545a8baf
2057 changed files with 282864 additions and 213 deletions

View File

@ -0,0 +1,19 @@
export default function customTranslate(translations) {
return function (template, replacements) {
replacements = replacements || {};
// Translate
template = translations[template] || template;
// Replace
return template.replace(/{([^}]+)}/g, function (_, key) {
let str = replacements[key];
if (
translations[replacements[key]] !== null &&
translations[replacements[key]] !== undefined
) {
str = translations[replacements[key]];
}
return str || '{' + key + '}';
});
};
}

234
src/locales/bpmn/zh.ts Normal file
View File

@ -0,0 +1,234 @@
export default {
// 添加部分
'Append EndEvent': '追加结束事件',
'Append Gateway': '追加网关',
'Append Task': '追加任务',
'Append Intermediate/Boundary Event': '追加中间抛出事件/边界事件',
'Activate the global connect tool': '激活全局连接工具',
'Append {type}': '添加 {type}',
'Add Lane above': '在上面添加道',
'Divide into two Lanes': '分割成两个道',
'Divide into three Lanes': '分割成三个道',
'Add Lane below': '在下面添加道',
'Append compensation activity': '追加补偿活动',
'Change type': '修改类型',
'Connect using Association': '使用关联连接',
'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接',
'Connect using DataInputAssociation': '使用数据输入关联连接',
Remove: '移除',
'Activate the hand tool': '激活抓手工具',
'Activate the lasso tool': '激活套索工具',
'Activate the create/remove space tool': '激活创建/删除空间工具',
'Create expanded SubProcess': '创建扩展子过程',
'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件',
'Create Pool/Participant': '创建池/参与者',
'Parallel Multi Instance': '并行多重事件',
'Sequential Multi Instance': '时序多重事件',
DataObjectReference: '数据对象参考',
DataStoreReference: '数据存储参考',
Loop: '循环',
'Ad-hoc': '即席',
'Create {type}': '创建 {type}',
Task: '任务',
'Send Task': '发送任务',
'Receive Task': '接收任务',
'User Task': '用户任务',
'Manual Task': '手工任务',
'Business Rule Task': '业务规则任务',
'Service Task': '服务任务',
'Script Task': '脚本任务',
'Call Activity': '调用活动',
'Sub Process (collapsed)': '子流程(折叠的)',
'Sub Process (expanded)': '子流程(展开的)',
'Start Event': '开始事件',
StartEvent: '开始事件',
'Intermediate Throw Event': '中间事件',
'End Event': '结束事件',
EndEvent: '结束事件',
'Create StartEvent': '创建开始事件',
'Create EndEvent': '创建结束事件',
'Create Task': '创建任务',
'Create User Task': '创建用户任务',
'Create Gateway': '创建网关',
'Create DataObjectReference': '创建数据对象',
'Create DataStoreReference': '创建数据存储',
'Create Group': '创建分组',
'Create Intermediate/Boundary Event': '创建中间/边界事件',
'Message Start Event': '消息开始事件',
'Timer Start Event': '定时开始事件',
'Conditional Start Event': '条件开始事件',
'Signal Start Event': '信号开始事件',
'Error Start Event': '错误开始事件',
'Escalation Start Event': '升级开始事件',
'Compensation Start Event': '补偿开始事件',
'Message Start Event (non-interrupting)': '消息开始事件(非中断)',
'Timer Start Event (non-interrupting)': '定时开始事件(非中断)',
'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)',
'Signal Start Event (non-interrupting)': '信号开始事件(非中断)',
'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)',
'Message Intermediate Catch Event': '消息中间捕获事件',
'Message Intermediate Throw Event': '消息中间抛出事件',
'Timer Intermediate Catch Event': '定时中间捕获事件',
'Escalation Intermediate Throw Event': '升级中间抛出事件',
'Conditional Intermediate Catch Event': '条件中间捕获事件',
'Link Intermediate Catch Event': '链接中间捕获事件',
'Link Intermediate Throw Event': '链接中间抛出事件',
'Compensation Intermediate Throw Event': '补偿中间抛出事件',
'Signal Intermediate Catch Event': '信号中间捕获事件',
'Signal Intermediate Throw Event': '信号中间抛出事件',
'Message End Event': '消息结束事件',
'Escalation End Event': '定时结束事件',
'Error End Event': '错误结束事件',
'Cancel End Event': '取消结束事件',
'Compensation End Event': '补偿结束事件',
'Signal End Event': '信号结束事件',
'Terminate End Event': '终止结束事件',
'Message Boundary Event': '消息边界事件',
'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)',
'Timer Boundary Event': '定时边界事件',
'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)',
'Escalation Boundary Event': '升级边界事件',
'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)',
'Conditional Boundary Event': '条件边界事件',
'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)',
'Error Boundary Event': '错误边界事件',
'Cancel Boundary Event': '取消边界事件',
'Signal Boundary Event': '信号边界事件',
'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)',
'Compensation Boundary Event': '补偿边界事件',
'Exclusive Gateway': '互斥网关',
'Parallel Gateway': '并行网关',
'Inclusive Gateway': '相容网关',
'Complex Gateway': '复杂网关',
'Event based Gateway': '事件网关',
Transaction: '转运',
'Sub Process': '子流程',
'Event Sub Process': '事件子流程',
'Collapsed Pool': '折叠池',
'Expanded Pool': '展开池',
// Errors
'no parent for {element} in {parent}': '在{parent}里,{element}没有父类',
'no shape type specified': '没有指定的形状类型',
'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类',
'out of bounds release': 'out of bounds release',
'more than {count} child lanes': '子道大于{count} ',
'element required': '元素不能为空',
'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范',
'no diagram to display': '没有可展示的流程图',
'no process or collaboration to display': '没有可展示的流程/协作',
'element {element} referenced by {referenced}#{property} not yet drawn':
'由{referenced}#{property}引用的{element}元素仍未绘制',
'already rendered {element}': '{element} 已被渲染',
'failed to import {element}': '导入{element}失败',
//属性面板的参数
Id: '编号',
Name: '名称',
General: '常规',
Details: '详情',
'Message Name': '消息名称',
Message: '消息',
Initiator: '创建者',
'Asynchronous Continuations': '持续异步',
'Asynchronous Before': '异步前',
'Asynchronous After': '异步后',
'Job Configuration': '工作配置',
Exclusive: '排除',
'Job Priority': '工作优先级',
'Retry Time Cycle': '重试时间周期',
Documentation: '文档',
'Element Documentation': '元素文档',
'History Configuration': '历史配置',
'History Time To Live': '历史的生存时间',
Forms: '表单',
'Form Key': '表单key',
'Form Fields': '表单字段',
'Business Key': '业务key',
'Form Field': '表单字段',
ID: '编号',
Type: '类型',
Label: '名称',
'Default Value': '默认值',
'Default Flow': '默认流转路径',
'Conditional Flow': '条件流转路径',
'Sequence Flow': '普通流转路径',
Validation: '校验',
'Add Constraint': '添加约束',
Config: '配置',
Properties: '属性',
'Add Property': '添加属性',
Value: '值',
Listeners: '监听器',
'Execution Listener': '执行监听',
'Event Type': '事件类型',
'Listener Type': '监听器类型',
'Java Class': 'Java类',
Expression: '表达式',
'Must provide a value': '必须提供一个值',
'Delegate Expression': '代理表达式',
Script: '脚本',
'Script Format': '脚本格式',
'Script Type': '脚本类型',
'Inline Script': '内联脚本',
'External Script': '外部脚本',
Resource: '资源',
'Field Injection': '字段注入',
Extensions: '扩展',
'Input/Output': '输入/输出',
'Input Parameters': '输入参数',
'Output Parameters': '输出参数',
Parameters: '参数',
'Output Parameter': '输出参数',
'Timer Definition Type': '定时器定义类型',
'Timer Definition': '定时器定义',
Date: '日期',
Duration: '持续',
Cycle: '循环',
Signal: '信号',
'Signal Name': '信号名称',
Escalation: '升级',
Error: '错误',
'Link Name': '链接名称',
Condition: '条件名称',
'Variable Name': '变量名称',
'Variable Event': '变量事件',
'Specify more than one variable change event as a comma separated list.':
'多个变量事件以逗号隔开',
'Wait for Completion': '等待完成',
'Activity Ref': '活动参考',
'Version Tag': '版本标签',
Executable: '可执行文件',
'External Task Configuration': '扩展任务配置',
'Task Priority': '任务优先级',
External: '外部',
Connector: '连接器',
'Must configure Connector': '必须配置连接器',
'Connector Id': '连接器编号',
Implementation: '实现方式',
'Field Injections': '字段注入',
Fields: '字段',
'Result Variable': '结果变量',
Topic: '主题',
'Configure Connector': '配置连接器',
'Input Parameter': '输入参数',
Assignee: '代理人',
'Candidate Users': '候选用户',
'Candidate Groups': '候选组',
'Due Date': '到期时间',
'Follow Up Date': '跟踪日期',
Priority: '优先级',
'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
'跟踪日期必须符合EL表达式 ${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00',
'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
'跟踪日期必须符合EL表达式 ${someDate} ,或者一个ISO标准日期2015-06-26T09:54:00',
Variables: '变量',
'Candidate Starter Configuration': '候选人起动器配置',
'Candidate Starter Groups': '候选人起动器组',
'This maps to the process definition key.': '这映射到流程定义键。',
'Candidate Starter Users': '候选人起动器的用户',
'Specify more than one user as a comma separated list.': '指定多个用户作为逗号分隔的列表。',
'Tasklist Configuration': 'Tasklist配置',
Startable: '启动',
'Specify more than one group as a comma separated list.': '指定多个组作为逗号分隔的列表。',
};

37
src/locales/helper.ts Normal file
View File

@ -0,0 +1,37 @@
import type { LocaleType } from '/#/config';
import { set } from 'lodash-es';
export const loadLocalePool: LocaleType[] = [];
export function setHtmlPageLang(locale: LocaleType) {
document.querySelector('html')?.setAttribute('lang', locale);
}
export function setLoadLocalePool(cb: (loadLocalePool: LocaleType[]) => void) {
cb(loadLocalePool);
}
export function genMessage(langs: Record<string, Record<string, any>>, prefix = 'lang') {
const obj: Recordable = {};
Object.keys(langs).forEach((key) => {
const langFileModule = langs[key].default;
let fileName = key.replace(`./${prefix}/`, '').replace(/^\.\//, '');
const lastIndex = fileName.lastIndexOf('.');
fileName = fileName.substring(0, lastIndex);
const keyList = fileName.split('/');
const moduleName = keyList.shift();
const objKey = keyList.join('.');
if (moduleName) {
if (objKey) {
set(obj, moduleName, obj[moduleName] || {});
set(obj[moduleName], objKey, langFileModule);
} else {
set(obj, moduleName, langFileModule || {});
}
}
});
return obj;
}

12
src/locales/lang/en.ts Normal file
View File

@ -0,0 +1,12 @@
import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/en_US';
const modules = import.meta.glob('./en/**/*.ts', { eager: true });
export default {
message: {
...genMessage(modules, 'en'),
antdLocale,
},
dateLocale: null,
dateLocaleName: 'en',
};

View File

@ -0,0 +1,20 @@
export default {
okText: 'OK',
closeText: 'Close',
cancelText: 'Cancel',
loadingText: 'Loading...',
saveText: 'Save',
delText: 'Delete',
resetText: 'Reset',
searchText: 'Search',
queryText: 'Search',
inputText: 'Please enter',
chooseText: 'Please choose',
redo: 'Refresh',
back: 'Back',
light: 'Light',
dark: 'Dark',
};

View File

@ -0,0 +1,129 @@
export default {
app: {
searchNotData: 'No search results yet',
toSearch: 'to search',
toNavigate: 'to navigate',
},
countdown: {
normalText: 'Get SMS code',
sendText: 'Reacquire in {0}s',
},
cropper: {
selectImage: 'Select Image',
uploadSuccess: 'Uploaded success!',
modalTitle: 'Avatar upload',
okText: 'Confirm and upload',
btn_reset: 'Reset',
btn_rotate_left: 'Counterclockwise rotation',
btn_rotate_right: 'Clockwise rotation',
btn_scale_x: 'Flip horizontal',
btn_scale_y: 'Flip vertical',
btn_zoom_in: 'Zoom in',
btn_zoom_out: 'Zoom out',
preview: 'Preivew',
},
drawer: {
loadingText: 'Loading...',
cancelText: 'Close',
okText: 'Confirm',
},
excel: {
exportModalTitle: 'Export data',
fileType: 'File type',
fileName: 'File name',
},
form: {
putAway: 'Put away',
unfold: 'Unfold',
maxTip: 'The number of characters should be less than {0}',
apiSelectNotFound: 'Wait for data loading to complete...',
},
icon: {
placeholder: 'Click the select icon',
search: 'Search icon',
copy: 'Copy icon successfully!',
},
menu: {
search: 'Menu search',
},
modal: {
cancelText: 'Close',
okText: 'Confirm',
close: 'Close',
maximize: 'Maximize',
restore: 'Restore',
},
table: {
settingDens: 'Density',
settingDensDefault: 'Default',
settingDensMiddle: 'Middle',
settingDensSmall: 'Compact',
settingColumn: 'Column settings',
settingColumnShow: 'Column display',
settingIndexColumnShow: 'Index Column',
settingSelectColumnShow: 'Selection Column',
settingFixedLeft: 'Fixed Left',
settingFixedRight: 'Fixed Right',
settingFullScreen: 'Full Screen',
index: 'Index',
total: 'total of {total}',
},
time: {
before: ' ago',
after: ' after',
just: 'just now',
seconds: ' seconds',
minutes: ' minutes',
hours: ' hours',
days: ' days',
},
tree: {
selectAll: 'Select All',
unSelectAll: 'Cancel Select',
expandAll: 'Expand All',
unExpandAll: 'Collapse all',
checkStrictly: 'Hierarchical association',
checkUnStrictly: 'Hierarchical independence',
},
upload: {
save: 'Save',
upload: 'Upload',
imgUpload: 'ImageUpload',
uploaded: 'Uploaded',
operating: 'Operating',
del: 'Delete',
download: 'download',
saveWarn: 'Please wait for the file to upload and save!',
saveError: 'There is no file successfully uploaded and cannot be saved!',
preview: 'Preview',
choose: 'Select the file',
accept: 'Support {0} format',
acceptUpload: 'Only upload files in {0} format',
maxSize: 'A single file does not exceed {0}MB ',
maxSizeMultiple: 'Only upload files up to {0}MB!',
maxNumber: 'Only upload up to {0} files',
legend: 'Legend',
fileName: 'File name',
fileSize: 'File size',
fileStatue: 'File status',
startUpload: 'Start upload',
uploadSuccess: 'Upload successfully',
uploadError: 'Upload failed',
uploading: 'Uploading',
uploadWait: 'Please wait for the file upload to finish',
reUploadFailed: 'Re-upload failed files',
},
verify: {
error: 'verification failed',
time: 'The verification is successful and it takes {time} seconds',
redoTip: 'Click the picture to refresh',
dragText: 'Hold down the slider and drag',
successText: 'Verified',
},
};

View File

@ -0,0 +1,116 @@
export default {
footer: { onlinePreview: 'Preview', onlineDocument: 'Document' },
header: {
// user dropdown
userCenter: 'User Center',
dropdownItemDoc: 'Document',
dropdownItemLoginOut: 'Login Out',
tooltipErrorLog: 'Error log',
tooltipLock: 'Lock screen',
tooltipNotify: 'Notification',
tooltipEntryFull: 'Full Screen',
tooltipExitFull: 'Exit Full Screen',
// lock
lockScreenPassword: 'Lock screen password',
lockScreen: 'Lock screen',
lockScreenBtn: 'Locking',
home: 'Home',
},
multipleTab: {
reload: 'Refresh current',
close: 'Close current',
closeLeft: 'Close Left',
closeRight: 'Close Right',
closeOther: 'Close Other',
closeAll: 'Close All',
},
setting: {
// content mode
contentModeFull: 'Full',
contentModeFixed: 'Fixed width',
// topMenu align
topMenuAlignLeft: 'Left',
topMenuAlignRight: 'Center',
topMenuAlignCenter: 'Right',
// menu trigger
menuTriggerNone: 'Not Show',
menuTriggerBottom: 'Bottom',
menuTriggerTop: 'Top',
// menu type
menuTypeSidebar: 'Left menu mode',
menuTypeMixSidebar: 'Left menu mixed mode',
menuTypeMix: 'Top Menu Mix mode',
menuTypeTopMenu: 'Top menu mode',
on: 'On',
off: 'Off',
minute: 'Minute',
operatingTitle: 'Successful!',
operatingContent:
'The copy is successful, please go to src/settings/projectSetting.ts to modify the configuration!',
resetSuccess: 'Successfully reset!',
copyBtn: 'Copy',
clearBtn: 'Clear cache and to the login page',
drawerTitle: 'Configuration',
darkMode: 'Dark mode',
navMode: 'Navigation mode',
interfaceFunction: 'Interface function',
interfaceDisplay: 'Interface display',
animation: 'Animation',
splitMenu: 'Split menu',
closeMixSidebarOnChange: 'Switch page to close menu',
sysTheme: 'System theme',
headerTheme: 'Header theme',
sidebarTheme: 'Menu theme',
menuDrag: 'Drag Sidebar',
menuSearch: 'Menu search',
menuAccordion: 'Sidebar accordion',
menuCollapse: 'Collapse menu',
collapseMenuDisplayName: 'Collapse menu display name',
topMenuLayout: 'Top menu layout',
menuCollapseButton: 'Menu collapse button',
contentMode: 'Content area width',
expandedMenuWidth: 'Expanded menu width',
breadcrumb: 'Breadcrumbs',
breadcrumbIcon: 'Breadcrumbs Icon',
tabs: 'Tabs',
tabDetail: 'Tab Detail',
tabsQuickBtn: 'Tabs quick button',
tabsRedoBtn: 'Tabs redo button',
tabsFoldBtn: 'Tabs flod button',
sidebar: 'Sidebar',
header: 'Header',
footer: 'Footer',
fullContent: 'Full content',
grayMode: 'Gray mode',
colorWeak: 'Color Weak Mode',
progress: 'Progress',
switchLoading: 'Switch Loading',
switchAnimation: 'Switch animation',
animationType: 'Animation type',
autoScreenLock: 'Auto screen lock',
notAutoScreenLock: 'Not auto lock',
fixedHeader: 'Fixed header',
fixedSideBar: 'Fixed Sidebar',
mixSidebarTrigger: 'Mixed menu Trigger',
triggerHover: 'Hover',
triggerClick: 'Click',
mixSidebarFixed: 'Fixed expanded menu',
},
};

View File

@ -0,0 +1,4 @@
export default {
login: 'Login',
errorLogList: 'Error Log',
};

View File

@ -0,0 +1,6 @@
export default {
dashboard: 'Dashboard',
about: 'About',
workbench: 'Workbench',
analysis: 'Analysis',
};

View File

@ -0,0 +1,202 @@
export default {
charts: {
baiduMap: 'Baidu map',
aMap: 'A map',
googleMap: 'Google map',
charts: 'Chart',
map: 'Map',
line: 'Line',
pie: 'Pie',
},
comp: {
comp: 'Component',
basic: 'Basic',
transition: 'Animation',
countTo: 'Count To',
scroll: 'Scroll',
scrollBasic: 'Basic',
scrollAction: 'Scroll Function',
virtualScroll: 'Virtual Scroll',
tree: 'Tree',
treeBasic: 'Basic',
editTree: 'Searchable/toolbar',
actionTree: 'Function operation',
modal: 'Modal',
drawer: 'Drawer',
desc: 'Desc',
lazy: 'Lazy',
lazyBasic: 'Basic',
lazyTransition: 'Animation',
verify: 'Verify',
verifyDrag: 'Drag ',
verifyRotate: 'Picture Restore',
qrcode: 'QR code',
strength: 'Password strength',
upload: 'Upload',
loading: 'Loading',
time: 'Relative Time',
cropperImage: 'Cropper Image',
cardList: 'Card List',
},
editor: {
editor: 'Editor',
jsonEditor: 'Json editor',
markdown: 'Markdown editor',
tinymce: 'Rich text',
tinymceBasic: 'Basic',
tinymceForm: 'embedded form',
},
excel: {
excel: 'Excel',
customExport: 'Select export format',
jsonExport: 'JSON data export',
arrayExport: 'Array data export',
importExcel: 'Import',
},
feat: {
feat: 'Page Function',
icon: 'Icon',
tabs: 'Tabs',
tabDetail: 'Tab Detail',
sessionTimeout: 'Session Timeout',
print: 'Print',
contextMenu: 'Context Menu',
download: 'Download',
clickOutSide: 'ClickOutSide',
imgPreview: 'Picture Preview',
copy: 'Clipboard',
msg: 'Message prompt',
watermark: 'Watermark',
ripple: 'Ripple',
fullScreen: 'Full Screen',
errorLog: 'Error Log',
tab: 'Tab with parameters',
tab1: 'Tab with parameter 1',
tab2: 'Tab with parameter 2',
menu: 'Menu with parameters',
menu1: 'Menu with parameters 1',
menu2: 'Menu with parameters 2',
ws: 'Websocket test',
breadcrumb: 'Breadcrumbs',
breadcrumbFlat: 'Flat Mode',
breadcrumbFlatDetail: 'Flat mode details',
requestDemo: 'Retry request demo',
breadcrumbChildren: 'Level mode',
breadcrumbChildrenDetail: 'Level mode detail',
},
flow: {
name: 'Graphics editor',
flowChart: 'FlowChart',
},
form: {
form: 'Form',
basic: 'Basic',
useForm: 'useForm',
refForm: 'RefForm',
advancedForm: 'Shrinkable',
ruleForm: 'Form validation',
dynamicForm: 'Dynamic',
customerForm: 'Custom',
appendForm: 'Append',
tabsForm: 'TabsForm',
},
iframe: {
frame: 'External',
antv: 'antVue doc (embedded)',
doc: 'Project doc (embedded)',
docExternal: 'Project doc (external)',
},
level: { level: 'MultiMenu' },
page: {
page: 'Page',
form: 'Form',
formBasic: 'Basic Form',
formStep: 'Step Form',
formHigh: 'Advanced Form',
desc: 'Details',
descBasic: 'Basic Details',
descHigh: 'Advanced Details',
result: 'Result',
resultSuccess: 'Success',
resultFail: 'Failed',
account: 'Personal',
accountCenter: 'Personal Center',
accountSetting: 'Personal Settings',
exception: 'Exception',
netWorkError: 'Network Error',
notData: 'No data',
list: 'List page',
listCard: 'Card list',
basic: 'Basic list',
listBasic: 'Basic list',
listSearch: 'Search list',
},
permission: {
permission: 'Permission',
front: 'front-end',
frontPage: 'Page',
frontBtn: 'Button',
frontTestA: 'Test page A',
frontTestB: 'Test page B',
back: 'background',
backPage: 'Page',
backBtn: 'Button',
},
setup: {
page: 'Intro page',
},
system: {
moduleName: 'System management',
account: 'Account management',
account_detail: 'Account detail',
password: 'Change password',
dept: 'Department management',
menu: 'Menu management',
role: 'Role management',
},
table: {
table: 'Table',
basic: 'Basic',
treeTable: 'Tree',
fetchTable: 'Remote loading',
fixedColumn: 'Fixed column',
customerCell: 'Custom column',
formTable: 'Open search',
useTable: 'UseTable',
refTable: 'RefTable',
multipleHeader: 'MultiLevel header',
mergeHeader: 'Merge cells',
expandTable: 'Expandable table',
fixedHeight: 'Fixed height',
footerTable: 'Footer',
editCellTable: 'Editable cell',
editRowTable: 'Editable row',
authColumn: 'Auth column',
resizeParentHeightTable: 'resizeParentHeightTable',
},
};

104
src/locales/lang/en/sys.ts Normal file
View File

@ -0,0 +1,104 @@
export default {
api: {
operationFailed: 'Operation failed',
errorTip: 'Error Tip',
errorMessage: 'The operation failed, the system is abnormal!',
timeoutMessage: 'Login timed out, please log in again!',
apiTimeoutMessage: 'The interface request timed out, please refresh the page and try again!',
apiRequestFailed: 'The interface request failed, please try again later!',
networkException: 'network anomaly',
networkExceptionMsg:
'Please check if your network connection is normal! The network is abnormal',
errMsg401: 'The user does not have permission (token, user name, password error)!',
errMsg403: 'The user is authorized, but access is forbidden!',
errMsg404: 'Network request error, the resource was not found!',
errMsg405: 'Network request error, request method not allowed!',
errMsg408: 'Network request timed out!',
errMsg500: 'Server error, please contact the administrator!',
errMsg501: 'The network is not implemented!',
errMsg502: 'Network Error!',
errMsg503: 'The service is unavailable, the server is temporarily overloaded or maintained!',
errMsg504: 'Network timeout!',
errMsg505: 'The http version does not support the request!',
},
app: {
logoutTip: 'Reminder',
logoutMessage: 'Confirm to exit the system?',
menuLoading: 'Menu loading...',
},
errorLog: {
tableTitle: 'Error log list',
tableColumnType: 'Type',
tableColumnDate: 'Time',
tableColumnFile: 'File',
tableColumnMsg: 'Error message',
tableColumnStackMsg: 'Stack info',
tableActionDesc: 'Details',
modalTitle: 'Error details',
fireVueError: 'Fire vue error',
fireResourceError: 'Fire resource error',
fireAjaxError: 'Fire ajax error',
enableMessage: 'Only effective when useErrorHandle=true in `/src/settings/projectSetting.ts`.',
},
exception: {
backLogin: 'Back Login',
backHome: 'Back Home',
subTitle403: "Sorry, you don't have access to this page.",
subTitle404: 'Sorry, the page you visited does not exist.',
subTitle500: 'Sorry, the server is reporting an error.',
noDataTitle: 'No data on the current page.',
networkErrorTitle: 'Network Error',
networkErrorSubTitle:
'SorryYour network connection has been disconnected, please check your network!',
},
lock: {
unlock: 'Click to unlock',
alert: 'Lock screen password error',
backToLogin: 'Back to login',
entry: 'Enter the system',
placeholder: 'Please enter the lock screen password or user password',
},
login: {
backSignIn: 'Back sign in',
mobileSignInFormTitle: 'Mobile sign in',
qrSignInFormTitle: 'Qr code sign in',
signInFormTitle: 'Sign in',
signUpFormTitle: 'Sign up',
forgetFormTitle: 'Reset password',
signInTitle: 'Backstage management system',
signInDesc: 'Enter your personal details and get started!',
policy: 'I agree to the xxx Privacy Policy',
scanSign: `scanning the code to complete the login`,
loginButton: 'Sign in',
registerButton: 'Sign up',
rememberMe: 'Remember me',
forgetPassword: 'Forget Password?',
otherSignIn: 'Sign in with',
// notify
loginSuccessTitle: 'Login successful',
loginSuccessDesc: 'Welcome back',
// placeholder
accountPlaceholder: 'Please input username',
passwordPlaceholder: 'Please input password',
smsPlaceholder: 'Please input sms code',
mobilePlaceholder: 'Please input mobile',
policyPlaceholder: 'Register after checking',
diffPwd: 'The two passwords are inconsistent',
userName: 'Username',
password: 'Password',
confirmPassword: 'Confirm Password',
email: 'Email',
smsCode: 'SMS code',
mobile: 'Mobile',
},
};

View File

@ -0,0 +1,20 @@
export default {
okText: '确认',
closeText: '关闭',
cancelText: '取消',
loadingText: '加载中...',
saveText: '保存',
delText: '删除',
resetText: '重置',
searchText: '搜索',
queryText: '查询',
inputText: '请输入',
chooseText: '请选择',
redo: '刷新',
back: '返回',
light: '亮色主题',
dark: '黑暗主题',
};

View File

@ -0,0 +1,135 @@
export default {
app: {
searchNotData: '暂无搜索结果',
toSearch: '确认',
toNavigate: '切换',
},
countdown: {
normalText: '获取验证码',
sendText: '{0}秒后重新获取',
},
cropper: {
selectImage: '选择图片',
uploadSuccess: '上传成功',
modalTitle: '头像上传',
okText: '确认并上传',
btn_reset: '重置',
btn_rotate_left: '逆时针旋转',
btn_rotate_right: '顺时针旋转',
btn_scale_x: '水平翻转',
btn_scale_y: '垂直翻转',
btn_zoom_in: '放大',
btn_zoom_out: '缩小',
preview: '预览',
},
drawer: {
loadingText: '加载中...',
cancelText: '关闭',
okText: '确认',
},
excel: {
exportModalTitle: '导出数据',
fileType: '文件类型',
fileName: '文件名',
},
form: {
putAway: '收起',
unfold: '展开',
maxTip: '字符数应小于{0}位',
apiSelectNotFound: '请等待数据加载完成...',
},
icon: {
placeholder: '点击选择图标',
search: '搜索图标',
copy: '复制图标成功!',
},
menu: {
search: '菜单搜索',
},
modal: {
cancelText: '关闭',
okText: '确认',
close: '关闭',
maximize: '最大化',
restore: '还原',
},
table: {
settingDens: '密度',
settingDensDefault: '默认',
settingDensMiddle: '中等',
settingDensSmall: '紧凑',
settingColumn: '列设置',
settingColumnShow: '列展示',
settingIndexColumnShow: '序号列',
settingSelectColumnShow: '勾选列',
settingFixedLeft: '固定到左侧',
settingFixedRight: '固定到右侧',
settingFullScreen: '全屏',
index: '序号',
// index: '#',
total: '共 {total} 条数据',
},
time: {
before: '前',
after: '后',
just: '刚刚',
seconds: '秒',
minutes: '分钟',
hours: '小时',
days: '天',
},
tree: {
selectAll: '选择全部',
unSelectAll: '取消选择',
expandAll: '展开全部',
unExpandAll: '折叠全部',
checkStrictly: '层级关联',
checkUnStrictly: '层级独立',
},
upload: {
save: '保存',
upload: '上传',
imgUpload: '图片上传',
uploaded: '已上传',
operating: '操作',
del: '删除',
download: '下载',
saveWarn: '请等待文件上传后,保存!',
saveError: '没有上传成功的文件,无法保存!',
preview: '预览',
choose: '选择文件',
accept: '支持{0}格式',
acceptUpload: '只能上传{0}格式文件',
maxSize: '单个文件不超过{0}MB',
maxSizeMultiple: '只能上传不超过{0}MB的文件!',
maxNumber: '最多只能上传{0}个文件',
legend: '略缩图',
fileName: '文件名',
fileSize: '文件大小',
fileStatue: '状态',
startUpload: '开始上传',
uploadSuccess: '上传成功',
uploadError: '上传失败',
uploading: '上传中',
uploadWait: '请等待文件上传结束后操作',
reUploadFailed: '重新上传失败文件',
},
verify: {
error: '验证失败!',
time: '验证校验成功,耗时{time}秒!',
redoTip: '点击图片可刷新',
dragText: '请按住滑块拖动',
successText: '验证通过',
},
};

View File

@ -0,0 +1,116 @@
export default {
footer: { onlinePreview: '在线预览', onlineDocument: '在线文档' },
header: {
// user dropdown
userCenter: '用户中心',
dropdownItemDoc: '文档',
dropdownItemLoginOut: '退出系统',
// tooltip
tooltipErrorLog: '错误日志',
tooltipLock: '锁定屏幕',
tooltipNotify: '消息通知',
tooltipEntryFull: '全屏',
tooltipExitFull: '退出全屏',
// lock
lockScreenPassword: '锁屏密码',
lockScreen: '锁定屏幕',
lockScreenBtn: '锁定',
home: '首页',
},
multipleTab: {
reload: '重新加载',
close: '关闭标签页',
closeLeft: '关闭左侧标签页',
closeRight: '关闭右侧标签页',
closeOther: '关闭其它标签页',
closeAll: '关闭全部标签页',
},
setting: {
// content mode
contentModeFull: '流式',
contentModeFixed: '定宽',
// topMenu align
topMenuAlignLeft: '居左',
topMenuAlignRight: '居中',
topMenuAlignCenter: '居右',
// menu trigger
menuTriggerNone: '不显示',
menuTriggerBottom: '底部',
menuTriggerTop: '顶部',
// menu type
menuTypeSidebar: '左侧菜单模式',
menuTypeMixSidebar: '左侧菜单混合模式',
menuTypeMix: '顶部菜单混合模式',
menuTypeTopMenu: '顶部菜单模式',
on: '开',
off: '关',
minute: '分钟',
operatingTitle: '操作成功',
operatingContent: '复制成功,请到 src/settings/projectSetting.ts 中修改配置!',
resetSuccess: '重置成功!',
copyBtn: '拷贝',
clearBtn: '清空缓存并返回登录页',
drawerTitle: '项目配置',
darkMode: '主题',
navMode: '导航栏模式',
interfaceFunction: '界面功能',
interfaceDisplay: '界面显示',
animation: '动画',
splitMenu: '分割菜单',
closeMixSidebarOnChange: '切换页面关闭菜单',
sysTheme: '系统主题',
headerTheme: '顶栏主题',
sidebarTheme: '菜单主题',
menuDrag: '侧边菜单拖拽',
menuSearch: '菜单搜索',
menuAccordion: '侧边菜单手风琴模式',
menuCollapse: '折叠菜单',
collapseMenuDisplayName: '折叠菜单显示名称',
topMenuLayout: '顶部菜单布局',
menuCollapseButton: '菜单折叠按钮',
contentMode: '内容区域宽度',
expandedMenuWidth: '菜单展开宽度',
breadcrumb: '面包屑',
breadcrumbIcon: '面包屑图标',
tabs: '标签页',
tabDetail: '标签详情页',
tabsQuickBtn: '标签页快捷按钮',
tabsRedoBtn: '标签页刷新按钮',
tabsFoldBtn: '标签页折叠按钮',
sidebar: '左侧菜单',
header: '顶栏',
footer: '页脚',
fullContent: '全屏内容',
grayMode: '灰色模式',
colorWeak: '色弱模式',
progress: '顶部进度条',
switchLoading: '切换loading',
switchAnimation: '切换动画',
animationType: '动画类型',
autoScreenLock: '自动锁屏',
notAutoScreenLock: '不自动锁屏',
fixedHeader: '固定header',
fixedSideBar: '固定Sidebar',
mixSidebarTrigger: '混合菜单触发方式',
triggerHover: '悬停',
triggerClick: '点击',
mixSidebarFixed: '固定展开菜单',
},
};

View File

@ -0,0 +1,4 @@
export default {
login: '登录',
errorLogList: '错误日志列表',
};

View File

@ -0,0 +1,6 @@
export default {
dashboard: 'Dashboard',
about: '关于',
workbench: '工作台',
analysis: '分析页',
};

View File

@ -0,0 +1,193 @@
export default {
charts: {
baiduMap: '百度地图',
aMap: '高德地图',
googleMap: '谷歌地图',
charts: '图表',
map: '地图',
line: '折线图',
pie: '饼图',
},
comp: {
comp: '组件',
basic: '基础组件',
transition: '动画组件',
countTo: '数字动画',
scroll: '滚动组件',
scrollBasic: '基础滚动',
scrollAction: '滚动函数',
virtualScroll: '虚拟滚动',
tree: 'Tree',
treeBasic: '基础树',
editTree: '可搜索/工具栏',
actionTree: '函数操作示例',
modal: '弹窗扩展',
drawer: '抽屉扩展',
desc: '详情组件',
lazy: '懒加载组件',
lazyBasic: '基础示例',
lazyTransition: '动画效果',
verify: '验证组件',
verifyDrag: '拖拽校验',
verifyRotate: '图片还原',
qrcode: '二维码组件',
strength: '密码强度组件',
upload: '上传组件',
loading: 'Loading',
time: '相对时间',
cropperImage: '图片裁剪',
cardList: '卡片列表',
},
editor: {
editor: '编辑器',
jsonEditor: 'Json编辑器',
markdown: 'markdown编辑器',
tinymce: '富文本',
tinymceBasic: '基础使用',
tinymceForm: '嵌入form',
},
excel: {
excel: 'Excel',
customExport: '选择导出格式',
jsonExport: 'JSON数据导出',
arrayExport: 'Array数据导出',
importExcel: '导入',
},
feat: {
feat: '功能',
icon: '图标',
sessionTimeout: '登录过期',
tabs: '标签页操作',
tabDetail: '标签详情页',
print: '打印',
contextMenu: '右键菜单',
download: '文件下载',
clickOutSide: 'ClickOutSide组件',
imgPreview: '图片预览',
copy: '剪切板',
msg: '消息提示',
watermark: '水印',
ripple: '水波纹',
fullScreen: '全屏',
errorLog: '错误日志',
tab: 'Tab带参',
tab1: 'Tab带参1',
tab2: 'Tab带参2',
menu: 'Menu带参',
menu1: 'Menu带参1',
menu2: 'Menu带参2',
ws: 'websocket测试',
breadcrumb: '面包屑导航',
breadcrumbFlat: '平级模式',
requestDemo: '测试请求重试',
breadcrumbFlatDetail: '平级详情',
breadcrumbChildren: '层级模式',
breadcrumbChildrenDetail: '层级详情',
},
flow: {
name: '图形编辑器',
flowChart: '流程图',
},
form: {
form: 'Form',
basic: '基础表单',
useForm: 'useForm',
refForm: 'RefForm',
advancedForm: '可收缩表单',
ruleForm: '表单验证',
dynamicForm: '动态表单',
customerForm: '自定义组件',
appendForm: '表单增删示例',
tabsForm: '标签页+多级field',
},
iframe: {
frame: '外部页面',
antv: 'antVue文档(内嵌)',
doc: '项目文档(内嵌)',
docExternal: '项目文档(外链)',
},
level: { level: '多级菜单' },
page: {
page: '页面',
form: '表单页',
formBasic: '基础表单',
formStep: '分步表单',
formHigh: '高级表单',
desc: '详情页',
descBasic: '基础详情页',
descHigh: '高级详情页',
result: '结果页',
resultSuccess: '成功页',
resultFail: '失败页',
account: '个人页',
accountCenter: '个人中心',
accountSetting: '个人设置',
exception: '异常页',
netWorkError: '网络错误',
notData: '无数据',
list: '列表页',
listCard: '卡片列表',
listBasic: '标准列表',
listSearch: '搜索列表',
},
permission: {
permission: '权限管理',
front: '基于前端权限',
frontPage: '页面权限',
frontBtn: '按钮权限',
frontTestA: '权限测试页A',
frontTestB: '权限测试页B',
back: '基于后台权限',
backPage: '页面权限',
backBtn: '按钮权限',
},
setup: {
page: '引导页',
},
system: {
moduleName: '系统管理',
account: '账号管理',
account_detail: '账号详情',
password: '修改密码',
dept: '部门管理',
menu: '菜单管理',
role: '角色管理',
},
table: {
table: 'Table',
basic: '基础表格',
treeTable: '树形表格',
fetchTable: '远程加载示例',
fixedColumn: '固定列',
customerCell: '自定义列',
formTable: '开启搜索区域',
useTable: 'UseTable',
refTable: 'RefTable',
multipleHeader: '多级表头',
mergeHeader: '合并单元格',
expandTable: '可展开表格',
fixedHeight: '定高/头部自定义',
footerTable: '表尾行合计',
editCellTable: '可编辑单元格',
editRowTable: '可编辑行',
authColumn: '权限列',
resizeParentHeightTable: '继承父元素高度',
},
};

View File

@ -0,0 +1,98 @@
export default {
api: {
operationFailed: '操作失败',
errorTip: '错误提示',
errorMessage: '操作失败,系统异常!',
timeoutMessage: '登录超时,请重新登录!',
apiTimeoutMessage: '接口请求超时,请刷新页面重试!',
apiRequestFailed: '请求出错,请稍候重试',
networkException: '网络异常',
networkExceptionMsg: '网络异常,请检查您的网络连接是否正常!',
errMsg401: '用户没有权限(令牌、用户名、密码错误)!',
errMsg403: '用户得到授权,但是访问是被禁止的。!',
errMsg404: '网络请求错误,未找到该资源!',
errMsg405: '网络请求错误,请求方法未允许!',
errMsg408: '网络请求超时!',
errMsg500: '服务器错误,请联系管理员!',
errMsg501: '网络未实现!',
errMsg502: '网络错误!',
errMsg503: '服务不可用,服务器暂时过载或维护!',
errMsg504: '网络超时!',
errMsg505: 'http版本不支持该请求!',
},
app: { logoutTip: '温馨提醒', logoutMessage: '是否确认退出系统?', menuLoading: '菜单加载中...' },
errorLog: {
tableTitle: '错误日志列表',
tableColumnType: '类型',
tableColumnDate: '时间',
tableColumnFile: '文件',
tableColumnMsg: '错误信息',
tableColumnStackMsg: 'stack信息',
tableActionDesc: '详情',
modalTitle: '错误详情',
fireVueError: '点击触发vue错误',
fireResourceError: '点击触发资源加载错误',
fireAjaxError: '点击触发ajax错误',
enableMessage: '只在`/src/settings/projectSetting.ts` 内的useErrorHandle=true时生效.',
},
exception: {
backLogin: '返回登录',
backHome: '返回首页',
subTitle403: '抱歉,您无权访问此页面。',
subTitle404: '抱歉,您访问的页面不存在。',
subTitle500: '抱歉,服务器报告错误。',
noDataTitle: '当前页无数据',
networkErrorTitle: '网络错误',
networkErrorSubTitle: '抱歉,您的网络连接已断开,请检查您的网络!',
},
lock: {
unlock: '点击解锁',
alert: '锁屏密码错误',
backToLogin: '返回登录',
entry: '进入系统',
placeholder: '请输入锁屏密码或者用户密码',
},
login: {
backSignIn: '返回',
signInFormTitle: '登录',
mobileSignInFormTitle: '手机登录',
qrSignInFormTitle: '二维码登录',
signUpFormTitle: '注册',
forgetFormTitle: '重置密码',
signInTitle: '开箱即用的中后台管理系统',
signInDesc: '输入您的个人详细信息开始使用!',
policy: '我同意xxx隐私政策',
scanSign: `扫码后点击"确认",即可完成登录`,
loginButton: '登录',
registerButton: '注册',
rememberMe: '记住我',
forgetPassword: '忘记密码?',
otherSignIn: '其他登录方式',
// notify
loginSuccessTitle: '登录成功',
loginSuccessDesc: '欢迎回来',
// placeholder
accountPlaceholder: '请输入账号',
passwordPlaceholder: '请输入密码',
smsPlaceholder: '请输入验证码',
mobilePlaceholder: '请输入手机号码',
policyPlaceholder: '勾选后才能注册',
diffPwd: '两次输入密码不一致',
userName: '账号',
password: '密码',
confirmPassword: '确认密码',
email: '邮箱',
smsCode: '短信验证码',
mobile: '手机号码',
},
};

10
src/locales/lang/zh_CN.ts Normal file
View File

@ -0,0 +1,10 @@
import { genMessage } from '../helper';
import antdLocale from 'ant-design-vue/es/locale/zh_CN';
const modules = import.meta.glob('./zh-CN/**/*.ts', { eager: true });
export default {
message: {
...genMessage(modules, 'zh-CN'),
antdLocale,
},
};

60
src/locales/setupI18n.ts Normal file
View File

@ -0,0 +1,60 @@
import type { App } from 'vue';
import type { I18n, I18nOptions } from 'vue-i18n';
import { createI18n } from 'vue-i18n';
import { setHtmlPageLang, setLoadLocalePool } from './helper';
import { localeSetting } from '/@/settings/localeSetting';
import { useLocaleStoreWithOut } from '/@/store/modules/locale';
import { useGlobSetting } from '../hooks/setting';
const { fallback, availableLocales } = localeSetting;
const globSetting = useGlobSetting();
export let i18n: ReturnType<typeof createI18n>;
async function createI18nOptions(): Promise<I18nOptions> {
const localeStore = useLocaleStoreWithOut();
const locale = localeStore.getLocale;
// const defaultLocal = await import(`./lang/${locale}.ts`);
// const message = defaultLocal.default?.message ?? {};
let message = {};
try {
const responseStream = await fetch(globSetting.apiUrl + '/language/main-language-json');
const { data } = await responseStream.json();
localeStore.setLanguageJson(data);
message = data[locale];
} catch {
console.error('从服务器获取翻译数据出错,请联系管理员!');
// throw new Error('从服务器获取翻译数据出错,请联系管理员!');
}
setHtmlPageLang(locale);
setLoadLocalePool((loadLocalePool) => {
loadLocalePool.push(locale);
});
return {
legacy: false,
locale,
fallbackLocale: fallback,
messages: {
[locale]: message,
},
availableLocales: availableLocales,
sync: true, //If you dont want to inherit locale from global scope, you need to set sync of i18n component option to false.
silentTranslationWarn: true, // true - warning off
missingWarn: false, //missign flag waring
silentFallbackWarn: true,
};
}
// setup i18n instance with glob
export async function setupI18n(app: App) {
const options = await createI18nOptions();
i18n = createI18n(options) as I18n;
app.use(i18n);
}

71
src/locales/useLocale.ts Normal file
View File

@ -0,0 +1,71 @@
/**
* Multi-language related operations
*/
import type { LocaleType } from '/#/config';
import { i18n } from './setupI18n';
import { useLocaleStoreWithOut } from '/@/store/modules/locale';
import { unref, computed } from 'vue';
import { loadLocalePool, setHtmlPageLang } from './helper';
// interface LangModule {
// message: Recordable;
// dateLocale: Recordable;
// dateLocaleName: string;
// }
function setI18nLanguage(locale: LocaleType) {
const localeStore = useLocaleStoreWithOut();
if (i18n.mode === 'legacy') {
i18n.global.locale = locale;
} else {
(i18n.global.locale as any).value = locale;
}
localeStore.setLocaleInfo({ locale });
setHtmlPageLang(locale);
}
export function useLocale() {
const localeStore = useLocaleStoreWithOut();
const getLocale = computed(() => localeStore.getLocale);
const getShowLocalePicker = computed(() => localeStore.getShowPicker);
const getAntdLocale = computed((): any => {
return i18n.global.getLocaleMessage(unref(getLocale))?.antdLocale ?? {};
});
// Switching the language will change the locale of useI18n
// And submit to configuration modification
async function changeLocale(locale: LocaleType) {
const globalI18n = i18n.global;
const currentLocale = unref(globalI18n.locale);
if (currentLocale === locale) {
return locale;
}
if (loadLocalePool.includes(locale)) {
setI18nLanguage(locale);
return locale;
}
// const langModule = ((await import(`./lang/${locale}.ts`)) as any).default as LangModule;
// if (!langModule) return;
// const { message } = langModule;
const message = localeStore.getLanguageJson[locale];
globalI18n.setLocaleMessage(locale, message);
loadLocalePool.push(locale);
setI18nLanguage(locale);
return locale;
}
return {
getLocale,
getShowLocalePicker,
changeLocale,
getAntdLocale,
};
}