This commit is contained in:
dap
2024-10-19 21:29:20 +08:00
105 changed files with 1512 additions and 1559 deletions

View File

@@ -4,7 +4,11 @@ import type { Locale } from 'ant-design-vue/es/locale';
import type { App } from 'vue';
import { ref } from 'vue';
import { $t, setupI18n as coreSetup, loadLocalesMap } from '@vben/locales';
import {
$t,
setupI18n as coreSetup,
loadLocalesMapFromDir,
} from '@vben/locales';
import { preferences } from '@vben/preferences';
import antdEnLocale from 'ant-design-vue/es/locale/en_US';
@@ -13,10 +17,12 @@ import dayjs from 'dayjs';
const antdLocale = ref<Locale>(antdDefaultLocale);
const modules = import.meta.glob('./langs/*.json');
const localesMap = loadLocalesMap(modules);
const modules = import.meta.glob('./langs/**/*.json');
const localesMap = loadLocalesMapFromDir(
/\.\/langs\/([^/]+)\/(.*)\.json$/,
modules,
);
/**
* 加载应用特有的语言包
* 这里也可以改造为从服务端获取翻译数据

View File

@@ -1,141 +0,0 @@
{
"page": {
"demos": {
"title": "Demos",
"antd": "Ant Design Vue"
}
},
"component": {
"cropper": {
"selectImage": "Select Image",
"uploadSuccess": "Uploaded success!",
"imageTooBig": "Image too big",
"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": "Preview"
},
"tenantToggle": {
"placeholder": "Please select a tenant",
"switch": "Switch to tenant: ",
"reset": "Reset to default tenant"
},
"notice": {
"title": "Notice",
"received": "You have received a new message"
},
"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",
"pending": "Pending",
"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"
}
},
"pages": {
"common": {
"add": "Add",
"edit": "Edit",
"delete": "Delete",
"more": "More",
"search": "Search",
"reset": "Reset",
"import": "Import",
"export": "Export",
"expand": "Expand",
"collapse": "Collapse",
"info": "Info",
"clear": "Clear",
"unlock": "Unlock",
"download": "Download",
"sync": "Sync",
"refresh": "Refresh",
"generate": "Generate",
"downloadLoading": "Downloading... Please wait.",
"preview": "Preview"
}
},
"menu": {
"root": "Root",
"system": {
"root": "System",
"user": "User",
"role": "Role",
"menu": "Menu",
"dept": "Department",
"post": "Post",
"dict": "Dictionary",
"config": "Parameter Settings",
"notice": "Notifications",
"log": {
"root": "Log",
"operation": "Operation Log",
"login": "Login Log"
},
"oss": "File",
"client": "Client"
},
"tenant": {
"root": "Tenant",
"package": "Package"
},
"monitor": {
"root": "System Monitoring",
"online": "Online Users",
"cache": "Cache Monitoring",
"admin": "Admin Monitoring",
"job": "Task Scheduling Center"
},
"tool": {
"root": "System Tools",
"gen": "Code Generation"
},
"workflow": {
"root": "Workflow",
"category": "Process Category",
"model": "Model",
"define": "Process Definition",
"monitor": {
"root": "Process Monitoring",
"instance": "Process Instance",
"todo": "Pending Tasks"
},
"form": "Form"
},
"task": {
"root": "My Tasks",
"apply": "My Initiated Tasks",
"todo": "My Pending Tasks",
"done": "My Completed Tasks",
"cc": "My CC"
}
}
}

View File

@@ -0,0 +1,12 @@
{
"title": "Demos",
"antd": "Ant Design Vue",
"vben": {
"title": "Project",
"about": "About",
"document": "Document",
"antdv": "Ant Design Vue Version",
"naive-ui": "Naive UI Version",
"element-plus": "Element Plus Version"
}
}

View File

@@ -0,0 +1,14 @@
{
"auth": {
"login": "Login",
"register": "Register",
"codeLogin": "Code Login",
"qrcodeLogin": "Qr Code Login",
"forgetPassword": "Forget Password"
},
"dashboard": {
"title": "Dashboard",
"analytics": "Analytics",
"workspace": "Workspace"
}
}

View File

@@ -1,141 +0,0 @@
{
"page": {
"demos": {
"title": "演示",
"antd": "Ant Design Vue"
}
},
"component": {
"cropper": {
"selectImage": "选择图片",
"uploadSuccess": "上传成功",
"imageTooBig": "图片超限",
"modalTitle": "头像上传",
"okText": "确认并上传",
"btn_reset": "重置",
"btn_rotate_left": "逆时针旋转",
"btn_rotate_right": "顺时针旋转",
"btn_scale_x": "水平翻转",
"btn_scale_y": "垂直翻转",
"btn_zoom_in": "放大",
"btn_zoom_out": "缩小",
"preview": "预览"
},
"tenantToggle": {
"placeholder": "选择租户",
"switch": "切换当前租户为: ",
"reset": "还原为默认租户"
},
"notice": {
"title": "消息",
"received": "收到新消息"
},
"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": "状态",
"pending": "待上传",
"startUpload": "开始上传",
"uploadSuccess": "上传成功",
"uploadError": "上传失败",
"uploading": "上传中",
"uploadWait": "请等待文件上传结束后操作",
"reUploadFailed": "重新上传失败文件"
}
},
"pages": {
"common": {
"add": "新增",
"edit": "编辑",
"delete": "删除",
"more": "更多",
"search": "搜索",
"reset": "重置",
"import": "导入",
"export": "导出",
"expand": "展开",
"collapse": "收起",
"info": "详情",
"clear": "清空",
"unlock": "解锁",
"download": "下载",
"sync": "同步",
"refresh": "刷新",
"generate": "生成",
"downloadLoading": "下载中, 请稍后...",
"preview": "预览"
}
},
"menu": {
"root": "根目录",
"system": {
"root": "系统管理",
"user": "用户管理",
"role": "角色管理",
"menu": "菜单管理",
"dept": "部门管理",
"post": "岗位管理",
"dict": "字典管理",
"config": "参数设置",
"notice": "通知公告",
"log": {
"root": "日志管理",
"operation": "操作日志",
"login": "登录日志"
},
"oss": "文件管理",
"client": "客户端管理"
},
"tenant": {
"root": "租户管理",
"package": "套餐管理"
},
"monitor": {
"root": "系统监控",
"online": "在线用户",
"cache": "缓存监控",
"admin": "Admin监控",
"job": "任务调度中心"
},
"tool": {
"root": "系统工具",
"gen": "代码生成"
},
"workflow": {
"root": "工作流",
"category": "流程分类",
"model": "模型管理",
"define": "流程定义",
"monitor": {
"root": "流程监控",
"instance": "流程实例",
"todo": "待办任务"
},
"form": "表单管理"
},
"task": {
"root": "我的任务",
"apply": "我发起的",
"todo": "我的待办",
"done": "我的已办",
"cc": "我的抄送"
}
}
}

View File

@@ -0,0 +1,12 @@
{
"title": "演示",
"antd": "Ant Design Vue",
"vben": {
"title": "项目",
"about": "关于",
"document": "文档",
"antdv": "Ant Design Vue 版本",
"naive-ui": "Naive UI 版本",
"element-plus": "Element Plus 版本"
}
}

View File

@@ -0,0 +1,14 @@
{
"auth": {
"login": "登陆",
"register": "注册",
"codeLogin": "验证码登陆",
"qrcodeLogin": "二维码登陆",
"forgetPassword": "忘记密码"
},
"dashboard": {
"title": "概览",
"analytics": "分析页",
"workspace": "工作台"
}
}