init
This commit is contained in:
20
src/locales/dayjs.ts
Normal file
20
src/locales/dayjs.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { locale } from 'dayjs';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import 'dayjs/locale/en';
|
||||
import { localStg } from '@/utils/storage';
|
||||
|
||||
/**
|
||||
* Set dayjs locale
|
||||
*
|
||||
* @param lang
|
||||
*/
|
||||
export function setDayjsLocale(lang: App.I18n.LangType = 'zh-CN') {
|
||||
const localMap = {
|
||||
'zh-CN': 'zh-cn',
|
||||
'en-US': 'en'
|
||||
} satisfies Record<App.I18n.LangType, string>;
|
||||
|
||||
const l = lang || localStg.get('lang') || 'zh-CN';
|
||||
|
||||
locale(localMap[l]);
|
||||
}
|
||||
26
src/locales/index.ts
Normal file
26
src/locales/index.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { App } from 'vue';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import { localStg } from '@/utils/storage';
|
||||
import messages from './locale';
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: localStg.get('lang') || 'zh-CN',
|
||||
fallbackLocale: 'en',
|
||||
messages,
|
||||
legacy: false
|
||||
});
|
||||
|
||||
/**
|
||||
* Setup plugin i18n
|
||||
*
|
||||
* @param app
|
||||
*/
|
||||
export function setupI18n(app: App) {
|
||||
app.use(i18n);
|
||||
}
|
||||
|
||||
export const $t = i18n.global.t as App.I18n.$T;
|
||||
|
||||
export function setLocale(locale: App.I18n.LangType) {
|
||||
i18n.global.locale.value = locale;
|
||||
}
|
||||
367
src/locales/langs/en-us.ts
Normal file
367
src/locales/langs/en-us.ts
Normal file
@@ -0,0 +1,367 @@
|
||||
const local: App.I18n.Schema = {
|
||||
system: {
|
||||
title: 'SoybeanAdmin',
|
||||
updateTitle: 'System Version Update Notification',
|
||||
updateContent: 'A new version of the system has been detected. Do you want to refresh the page immediately?',
|
||||
updateConfirm: 'Refresh immediately',
|
||||
updateCancel: 'Later'
|
||||
},
|
||||
common: {
|
||||
action: 'Action',
|
||||
add: 'Add',
|
||||
addSuccess: 'Add Success',
|
||||
backToHome: 'Back to home',
|
||||
batchDelete: 'Batch Delete',
|
||||
cancel: 'Cancel',
|
||||
close: 'Close',
|
||||
check: 'Check',
|
||||
expandColumn: 'Expand Column',
|
||||
columnSetting: 'Column Setting',
|
||||
config: 'Config',
|
||||
confirm: 'Confirm',
|
||||
delete: 'Delete',
|
||||
deleteSuccess: 'Delete Success',
|
||||
confirmDelete: 'Are you sure you want to delete?',
|
||||
edit: 'Edit',
|
||||
warning: 'Warning',
|
||||
error: 'Error',
|
||||
index: 'Index',
|
||||
keywordSearch: 'Please enter keyword',
|
||||
logout: 'Logout',
|
||||
logoutConfirm: 'Are you sure you want to log out?',
|
||||
lookForward: 'Coming soon',
|
||||
modify: 'Modify',
|
||||
modifySuccess: 'Modify Success',
|
||||
noData: 'No Data',
|
||||
operate: 'Operate',
|
||||
pleaseCheckValue: 'Please check whether the value is valid',
|
||||
refresh: 'Refresh',
|
||||
reset: 'Reset',
|
||||
search: 'Search',
|
||||
switch: 'Switch',
|
||||
tip: 'Tip',
|
||||
trigger: 'Trigger',
|
||||
update: 'Update',
|
||||
updateSuccess: 'Update Success',
|
||||
userCenter: 'User Center',
|
||||
yesOrNo: {
|
||||
yes: 'Yes',
|
||||
no: 'No'
|
||||
}
|
||||
},
|
||||
request: {
|
||||
logout: 'Logout user after request failed',
|
||||
logoutMsg: 'User status is invalid, please log in again',
|
||||
logoutWithModal: 'Pop up modal after request failed and then log out user',
|
||||
logoutWithModalMsg: 'User status is invalid, please log in again',
|
||||
refreshToken: 'The requested token has expired, refresh the token',
|
||||
tokenExpired: 'The requested token has expired'
|
||||
},
|
||||
theme: {
|
||||
themeDrawerTitle: 'Theme Configuration',
|
||||
tabs: {
|
||||
appearance: 'Appearance',
|
||||
layout: 'Layout',
|
||||
general: 'General',
|
||||
preset: 'Preset'
|
||||
},
|
||||
appearance: {
|
||||
themeSchema: {
|
||||
title: 'Theme Schema',
|
||||
light: 'Light',
|
||||
dark: 'Dark',
|
||||
auto: 'Follow System'
|
||||
},
|
||||
grayscale: 'Grayscale',
|
||||
colourWeakness: 'Colour Weakness',
|
||||
themeColor: {
|
||||
title: 'Theme Color',
|
||||
primary: 'Primary',
|
||||
info: 'Info',
|
||||
success: 'Success',
|
||||
warning: 'Warning',
|
||||
error: 'Error',
|
||||
followPrimary: 'Follow Primary'
|
||||
},
|
||||
themeRadius: {
|
||||
title: 'Theme Radius'
|
||||
},
|
||||
recommendColor: 'Apply Recommended Color Algorithm',
|
||||
recommendColorDesc: 'The recommended color algorithm refers to',
|
||||
preset: {
|
||||
title: 'Theme Presets',
|
||||
apply: 'Apply',
|
||||
applySuccess: 'Preset applied successfully',
|
||||
default: {
|
||||
name: 'Default Preset',
|
||||
desc: 'Default theme preset with balanced settings'
|
||||
},
|
||||
dark: {
|
||||
name: 'Dark Preset',
|
||||
desc: 'Dark theme preset for night time usage'
|
||||
},
|
||||
compact: {
|
||||
name: 'Compact Preset',
|
||||
desc: 'Compact layout preset for small screens'
|
||||
},
|
||||
azir: {
|
||||
name: "Azir's Preset",
|
||||
desc: 'It is a cold and elegant preset that Azir likes'
|
||||
}
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
layoutMode: {
|
||||
title: 'Layout Mode',
|
||||
vertical: 'Vertical Mode',
|
||||
horizontal: 'Horizontal Mode',
|
||||
'vertical-mix': 'Vertical Mix Mode',
|
||||
'vertical-hybrid-header-first': 'Left Hybrid Header-First',
|
||||
'top-hybrid-sidebar-first': 'Top-Hybrid Sidebar-First',
|
||||
'top-hybrid-header-first': 'Top-Hybrid Header-First',
|
||||
vertical_detail: 'Vertical menu layout, with the menu on the left and content on the right.',
|
||||
'vertical-mix_detail':
|
||||
'Vertical mix-menu layout, with the primary menu on the dark left side and the secondary menu on the lighter left side.',
|
||||
'vertical-hybrid-header-first_detail':
|
||||
'Left hybrid layout, with the primary menu at the top, the secondary menu on the dark left side, and the tertiary menu on the lighter left side.',
|
||||
horizontal_detail: 'Horizontal menu layout, with the menu at the top and content below.',
|
||||
'top-hybrid-sidebar-first_detail':
|
||||
'Top hybrid layout, with the primary menu on the left and the secondary menu at the top.',
|
||||
'top-hybrid-header-first_detail':
|
||||
'Top hybrid layout, with the primary menu at the top and the secondary menu on the left.'
|
||||
},
|
||||
tab: {
|
||||
title: 'Tab Settings',
|
||||
visible: 'Tab Visible',
|
||||
cache: 'Tag Bar Info Cache',
|
||||
cacheTip: 'One-click to open/close global keepalive',
|
||||
height: 'Tab Height',
|
||||
mode: {
|
||||
title: 'Tab Mode',
|
||||
slider: 'Slider',
|
||||
chrome: 'Chrome',
|
||||
button: 'Button'
|
||||
},
|
||||
closeByMiddleClick: 'Close Tab by Middle Click',
|
||||
closeByMiddleClickTip: 'Enable closing tabs by clicking with the middle mouse button'
|
||||
},
|
||||
header: {
|
||||
title: 'Header Settings',
|
||||
height: 'Header Height',
|
||||
breadcrumb: {
|
||||
visible: 'Breadcrumb Visible',
|
||||
showIcon: 'Breadcrumb Icon Visible'
|
||||
}
|
||||
},
|
||||
sider: {
|
||||
title: 'Sider Settings',
|
||||
inverted: 'Dark Sider',
|
||||
width: 'Sider Width',
|
||||
collapsedWidth: 'Sider Collapsed Width',
|
||||
mixWidth: 'Mix Sider Width',
|
||||
mixCollapsedWidth: 'Mix Sider Collapse Width',
|
||||
mixChildMenuWidth: 'Mix Child Menu Width',
|
||||
autoSelectFirstMenu: 'Auto Select First Submenu',
|
||||
autoSelectFirstMenuTip:
|
||||
'When a first-level menu is clicked, the first submenu is automatically selected and navigated to the deepest level'
|
||||
},
|
||||
footer: {
|
||||
title: 'Footer Settings',
|
||||
visible: 'Footer Visible',
|
||||
fixed: 'Fixed Footer',
|
||||
height: 'Footer Height',
|
||||
right: 'Right Footer'
|
||||
},
|
||||
content: {
|
||||
title: 'Content Area Settings',
|
||||
scrollMode: {
|
||||
title: 'Scroll Mode',
|
||||
tip: 'The theme scroll only scrolls the main part, the outer scroll can carry the header and footer together',
|
||||
wrapper: 'Wrapper',
|
||||
content: 'Content'
|
||||
},
|
||||
page: {
|
||||
animate: 'Page Animate',
|
||||
mode: {
|
||||
title: 'Page Animate Mode',
|
||||
fade: 'Fade',
|
||||
'fade-slide': 'Slide',
|
||||
'fade-bottom': 'Fade Zoom',
|
||||
'fade-scale': 'Fade Scale',
|
||||
'zoom-fade': 'Zoom Fade',
|
||||
'zoom-out': 'Zoom Out',
|
||||
none: 'None'
|
||||
}
|
||||
},
|
||||
fixedHeaderAndTab: 'Fixed Header And Tab'
|
||||
}
|
||||
},
|
||||
general: {
|
||||
title: 'General Settings',
|
||||
watermark: {
|
||||
title: 'Watermark Settings',
|
||||
visible: 'Watermark Full Screen Visible',
|
||||
text: 'Custom Watermark Text',
|
||||
enableUserName: 'Enable User Name Watermark',
|
||||
enableTime: 'Show Current Time',
|
||||
timeFormat: 'Time Format'
|
||||
},
|
||||
multilingual: {
|
||||
title: 'Multilingual Settings',
|
||||
visible: 'Display multilingual button'
|
||||
},
|
||||
globalSearch: {
|
||||
title: 'Global Search Settings',
|
||||
visible: 'Display GlobalSearch button'
|
||||
}
|
||||
},
|
||||
configOperation: {
|
||||
copyConfig: 'Copy Config',
|
||||
copySuccessMsg: 'Copy Success, Please replace the variable "themeSettings" in "src/theme/settings.ts"',
|
||||
resetConfig: 'Reset Config',
|
||||
resetSuccessMsg: 'Reset Success'
|
||||
}
|
||||
},
|
||||
route: {
|
||||
login: 'Login',
|
||||
403: 'No Permission',
|
||||
404: 'Page Not Found',
|
||||
500: 'Server Error',
|
||||
'iframe-page': 'Iframe',
|
||||
home: 'Home',
|
||||
deposit: 'Deposit',
|
||||
deposit_fiat: 'Fiat Deposit',
|
||||
withdraw: 'Withdraw',
|
||||
withdraw_fiat: 'Fiat Withdraw'
|
||||
},
|
||||
page: {
|
||||
login: {
|
||||
common: {
|
||||
loginOrRegister: 'Login / Register',
|
||||
userNamePlaceholder: 'Please enter user name',
|
||||
phonePlaceholder: 'Please enter phone number',
|
||||
codePlaceholder: 'Please enter verification code',
|
||||
passwordPlaceholder: 'Please enter password',
|
||||
confirmPasswordPlaceholder: 'Please enter password again',
|
||||
codeLogin: 'Verification code login',
|
||||
confirm: 'Confirm',
|
||||
back: 'Back',
|
||||
validateSuccess: 'Verification passed',
|
||||
loginSuccess: 'Login successfully',
|
||||
welcomeBack: 'Welcome back, {userName} !'
|
||||
},
|
||||
pwdLogin: {
|
||||
title: 'Password Login',
|
||||
rememberMe: 'Remember me',
|
||||
forgetPassword: 'Forget password?',
|
||||
register: 'Register',
|
||||
otherAccountLogin: 'Other Account Login',
|
||||
otherLoginMode: 'Other Login Mode',
|
||||
superAdmin: 'Super Admin',
|
||||
admin: 'Admin',
|
||||
user: 'User'
|
||||
},
|
||||
codeLogin: {
|
||||
title: 'Verification Code Login',
|
||||
getCode: 'Get verification code',
|
||||
reGetCode: 'Reacquire after {time}s',
|
||||
sendCodeSuccess: 'Verification code sent successfully',
|
||||
imageCodePlaceholder: 'Please enter image verification code'
|
||||
},
|
||||
register: {
|
||||
title: 'Register',
|
||||
agreement: 'I have read and agree to',
|
||||
protocol: '《User Agreement》',
|
||||
policy: '《Privacy Policy》'
|
||||
},
|
||||
resetPwd: {
|
||||
title: 'Reset Password'
|
||||
},
|
||||
bindWeChat: {
|
||||
title: 'Bind WeChat'
|
||||
}
|
||||
},
|
||||
home: {
|
||||
branchDesc:
|
||||
'For the convenience of everyone in developing and updating the merge, we have streamlined the code of the main branch, only retaining the homepage menu, and the rest of the content has been moved to the example branch for maintenance. The preview address displays the content of the example branch.',
|
||||
greeting: 'Good morning, {userName}, today is another day full of vitality!',
|
||||
weatherDesc: 'Today is cloudy to clear, 20℃ - 25℃!',
|
||||
projectCount: 'Project Count',
|
||||
todo: 'Todo',
|
||||
message: 'Message',
|
||||
downloadCount: 'Download Count',
|
||||
registerCount: 'Register Count',
|
||||
schedule: 'Work and rest Schedule',
|
||||
study: 'Study',
|
||||
work: 'Work',
|
||||
rest: 'Rest',
|
||||
entertainment: 'Entertainment',
|
||||
visitCount: 'Visit Count',
|
||||
turnover: 'Turnover',
|
||||
dealCount: 'Deal Count',
|
||||
projectNews: {
|
||||
title: 'Project News',
|
||||
moreNews: 'More News',
|
||||
desc1: 'Soybean created the open source project soybean-admin on May 28, 2021!',
|
||||
desc2: 'Yanbowe submitted a bug to soybean-admin, the multi-tab bar will not adapt.',
|
||||
desc3: 'Soybean is ready to do sufficient preparation for the release of soybean-admin!',
|
||||
desc4: 'Soybean is busy writing project documentation for soybean-admin!',
|
||||
desc5: 'Soybean just wrote some of the workbench pages casually, and it was enough to see!'
|
||||
},
|
||||
creativity: 'Creativity'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
required: 'Cannot be empty',
|
||||
userName: {
|
||||
required: 'Please enter user name',
|
||||
invalid: 'User name format is incorrect'
|
||||
},
|
||||
phone: {
|
||||
required: 'Please enter phone number',
|
||||
invalid: 'Phone number format is incorrect'
|
||||
},
|
||||
pwd: {
|
||||
required: 'Please enter password',
|
||||
invalid: '6-18 characters, including letters, numbers, and underscores'
|
||||
},
|
||||
confirmPwd: {
|
||||
required: 'Please enter password again',
|
||||
invalid: 'The two passwords are inconsistent'
|
||||
},
|
||||
code: {
|
||||
required: 'Please enter verification code',
|
||||
invalid: 'Verification code format is incorrect'
|
||||
},
|
||||
email: {
|
||||
required: 'Please enter email',
|
||||
invalid: 'Email format is incorrect'
|
||||
}
|
||||
},
|
||||
dropdown: {
|
||||
closeCurrent: 'Close Current',
|
||||
closeOther: 'Close Other',
|
||||
closeLeft: 'Close Left',
|
||||
closeRight: 'Close Right',
|
||||
closeAll: 'Close All',
|
||||
pin: 'Pin Tab',
|
||||
unpin: 'Unpin Tab'
|
||||
},
|
||||
icon: {
|
||||
themeConfig: 'Theme Configuration',
|
||||
themeSchema: 'Theme Schema',
|
||||
lang: 'Switch Language',
|
||||
fullscreen: 'Fullscreen',
|
||||
fullscreenExit: 'Exit Fullscreen',
|
||||
reload: 'Reload Page',
|
||||
collapse: 'Collapse Menu',
|
||||
expand: 'Expand Menu',
|
||||
pin: 'Pin',
|
||||
unpin: 'Unpin'
|
||||
},
|
||||
datatable: {
|
||||
itemCount: 'Total {total} items'
|
||||
}
|
||||
};
|
||||
|
||||
export default local;
|
||||
363
src/locales/langs/zh-cn.ts
Normal file
363
src/locales/langs/zh-cn.ts
Normal file
@@ -0,0 +1,363 @@
|
||||
const local: App.I18n.Schema = {
|
||||
system: {
|
||||
title: 'Soybean 管理系统',
|
||||
updateTitle: '系统版本更新通知',
|
||||
updateContent: '检测到系统有新版本发布,是否立即刷新页面?',
|
||||
updateConfirm: '立即刷新',
|
||||
updateCancel: '稍后再说'
|
||||
},
|
||||
common: {
|
||||
action: '操作',
|
||||
add: '新增',
|
||||
addSuccess: '添加成功',
|
||||
backToHome: '返回首页',
|
||||
batchDelete: '批量删除',
|
||||
cancel: '取消',
|
||||
close: '关闭',
|
||||
check: '勾选',
|
||||
expandColumn: '展开列',
|
||||
columnSetting: '列设置',
|
||||
config: '配置',
|
||||
confirm: '确认',
|
||||
delete: '删除',
|
||||
deleteSuccess: '删除成功',
|
||||
confirmDelete: '确认删除吗?',
|
||||
edit: '编辑',
|
||||
warning: '警告',
|
||||
error: '错误',
|
||||
index: '序号',
|
||||
keywordSearch: '请输入关键词搜索',
|
||||
logout: '退出登录',
|
||||
logoutConfirm: '确认退出登录吗?',
|
||||
lookForward: '敬请期待',
|
||||
modify: '修改',
|
||||
modifySuccess: '修改成功',
|
||||
noData: '无数据',
|
||||
operate: '操作',
|
||||
pleaseCheckValue: '请检查输入的值是否合法',
|
||||
refresh: '刷新',
|
||||
reset: '重置',
|
||||
search: '搜索',
|
||||
switch: '切换',
|
||||
tip: '提示',
|
||||
trigger: '触发',
|
||||
update: '更新',
|
||||
updateSuccess: '更新成功',
|
||||
userCenter: '个人中心',
|
||||
yesOrNo: {
|
||||
yes: '是',
|
||||
no: '否'
|
||||
}
|
||||
},
|
||||
request: {
|
||||
logout: '请求失败后登出用户',
|
||||
logoutMsg: '用户状态失效,请重新登录',
|
||||
logoutWithModal: '请求失败后弹出模态框再登出用户',
|
||||
logoutWithModalMsg: '用户状态失效,请重新登录',
|
||||
refreshToken: '请求的token已过期,刷新token',
|
||||
tokenExpired: 'token已过期'
|
||||
},
|
||||
theme: {
|
||||
themeDrawerTitle: '主题配置',
|
||||
tabs: {
|
||||
appearance: '外观',
|
||||
layout: '布局',
|
||||
general: '通用',
|
||||
preset: '预设'
|
||||
},
|
||||
appearance: {
|
||||
themeSchema: {
|
||||
title: '主题模式',
|
||||
light: '亮色模式',
|
||||
dark: '暗黑模式',
|
||||
auto: '跟随系统'
|
||||
},
|
||||
grayscale: '灰色模式',
|
||||
colourWeakness: '色弱模式',
|
||||
themeColor: {
|
||||
title: '主题颜色',
|
||||
primary: '主色',
|
||||
info: '信息色',
|
||||
success: '成功色',
|
||||
warning: '警告色',
|
||||
error: '错误色',
|
||||
followPrimary: '跟随主色'
|
||||
},
|
||||
themeRadius: {
|
||||
title: '主题圆角'
|
||||
},
|
||||
recommendColor: '应用推荐算法的颜色',
|
||||
recommendColorDesc: '推荐颜色的算法参照',
|
||||
preset: {
|
||||
title: '主题预设',
|
||||
apply: '应用',
|
||||
applySuccess: '预设应用成功',
|
||||
default: {
|
||||
name: '默认预设',
|
||||
desc: 'Soybean 默认主题预设'
|
||||
},
|
||||
dark: {
|
||||
name: '暗色预设',
|
||||
desc: '适用于夜间使用的暗色主题预设'
|
||||
},
|
||||
compact: {
|
||||
name: '紧凑型',
|
||||
desc: '适用于小屏幕的紧凑布局预设'
|
||||
},
|
||||
azir: {
|
||||
name: 'Azir的预设',
|
||||
desc: '是 Azir 比较喜欢的莫兰迪色系冷淡风'
|
||||
}
|
||||
}
|
||||
},
|
||||
layout: {
|
||||
layoutMode: {
|
||||
title: '布局模式',
|
||||
vertical: '左侧菜单模式',
|
||||
'vertical-mix': '左侧菜单混合模式',
|
||||
'vertical-hybrid-header-first': '左侧混合-顶部优先',
|
||||
horizontal: '顶部菜单模式',
|
||||
'top-hybrid-sidebar-first': '顶部混合-侧边优先',
|
||||
'top-hybrid-header-first': '顶部混合-顶部优先',
|
||||
vertical_detail: '左侧菜单布局,菜单在左,内容在右。',
|
||||
'vertical-mix_detail': '左侧双菜单布局,一级菜单在左侧深色区域,二级菜单在左侧浅色区域。',
|
||||
'vertical-hybrid-header-first_detail':
|
||||
'左侧混合布局,一级菜单在顶部,二级菜单在左侧深色区域,三级菜单在左侧浅色区域。',
|
||||
horizontal_detail: '顶部菜单布局,菜单在顶部,内容在下方。',
|
||||
'top-hybrid-sidebar-first_detail': '顶部混合布局,一级菜单在左侧,二级菜单在顶部。',
|
||||
'top-hybrid-header-first_detail': '顶部混合布局,一级菜单在顶部,二级菜单在左侧。'
|
||||
},
|
||||
tab: {
|
||||
title: '标签栏设置',
|
||||
visible: '显示标签栏',
|
||||
cache: '标签栏信息缓存',
|
||||
cacheTip: '一键开启/关闭全局 keepalive',
|
||||
height: '标签栏高度',
|
||||
mode: {
|
||||
title: '标签栏风格',
|
||||
slider: '滑块风格',
|
||||
chrome: '谷歌风格',
|
||||
button: '按钮风格'
|
||||
},
|
||||
closeByMiddleClick: '鼠标中键关闭标签页',
|
||||
closeByMiddleClickTip: '启用后可以使用鼠标中键点击标签页进行关闭'
|
||||
},
|
||||
header: {
|
||||
title: '头部设置',
|
||||
height: '头部高度',
|
||||
breadcrumb: {
|
||||
visible: '显示面包屑',
|
||||
showIcon: '显示面包屑图标'
|
||||
}
|
||||
},
|
||||
sider: {
|
||||
title: '侧边栏设置',
|
||||
inverted: '深色侧边栏',
|
||||
width: '侧边栏宽度',
|
||||
collapsedWidth: '侧边栏折叠宽度',
|
||||
mixWidth: '混合布局侧边栏宽度',
|
||||
mixCollapsedWidth: '混合布局侧边栏折叠宽度',
|
||||
mixChildMenuWidth: '混合布局子菜单宽度',
|
||||
autoSelectFirstMenu: '自动选择第一个子菜单',
|
||||
autoSelectFirstMenuTip: '点击一级菜单时,自动选择并导航到第一个子菜单的最深层级'
|
||||
},
|
||||
footer: {
|
||||
title: '底部设置',
|
||||
visible: '显示底部',
|
||||
fixed: '固定底部',
|
||||
height: '底部高度',
|
||||
right: '底部居右'
|
||||
},
|
||||
content: {
|
||||
title: '内容区域设置',
|
||||
scrollMode: {
|
||||
title: '滚动模式',
|
||||
tip: '主题滚动仅 main 部分滚动,外层滚动可携带头部底部一起滚动',
|
||||
wrapper: '外层滚动',
|
||||
content: '主体滚动'
|
||||
},
|
||||
page: {
|
||||
animate: '页面切换动画',
|
||||
mode: {
|
||||
title: '页面切换动画类型',
|
||||
'fade-slide': '滑动',
|
||||
fade: '淡入淡出',
|
||||
'fade-bottom': '底部消退',
|
||||
'fade-scale': '缩放消退',
|
||||
'zoom-fade': '渐变',
|
||||
'zoom-out': '闪现',
|
||||
none: '无'
|
||||
}
|
||||
},
|
||||
fixedHeaderAndTab: '固定头部和标签栏'
|
||||
}
|
||||
},
|
||||
general: {
|
||||
title: '通用设置',
|
||||
watermark: {
|
||||
title: '水印设置',
|
||||
visible: '显示全屏水印',
|
||||
text: '自定义水印文本',
|
||||
enableUserName: '启用用户名水印',
|
||||
enableTime: '显示当前时间',
|
||||
timeFormat: '时间格式'
|
||||
},
|
||||
multilingual: {
|
||||
title: '多语言设置',
|
||||
visible: '显示多语言按钮'
|
||||
},
|
||||
globalSearch: {
|
||||
title: '全局搜索设置',
|
||||
visible: '显示全局搜索按钮'
|
||||
}
|
||||
},
|
||||
configOperation: {
|
||||
copyConfig: '复制配置',
|
||||
copySuccessMsg: '复制成功,请替换 src/theme/settings.ts 中的变量 themeSettings',
|
||||
resetConfig: '重置配置',
|
||||
resetSuccessMsg: '重置成功'
|
||||
}
|
||||
},
|
||||
route: {
|
||||
login: '登录',
|
||||
403: '无权限',
|
||||
404: '页面不存在',
|
||||
500: '服务器错误',
|
||||
'iframe-page': '外链页面',
|
||||
home: '首页',
|
||||
deposit: '充值管理',
|
||||
deposit_fiat: '法币充值',
|
||||
withdraw: '提现管理',
|
||||
withdraw_fiat: '法币提现'
|
||||
},
|
||||
page: {
|
||||
login: {
|
||||
common: {
|
||||
loginOrRegister: '登录 / 注册',
|
||||
userNamePlaceholder: '请输入用户名',
|
||||
phonePlaceholder: '请输入手机号',
|
||||
codePlaceholder: '请输入验证码',
|
||||
passwordPlaceholder: '请输入密码',
|
||||
confirmPasswordPlaceholder: '请再次输入密码',
|
||||
codeLogin: '验证码登录',
|
||||
confirm: '确定',
|
||||
back: '返回',
|
||||
validateSuccess: '验证成功',
|
||||
loginSuccess: '登录成功',
|
||||
welcomeBack: '欢迎回来,{userName} !'
|
||||
},
|
||||
pwdLogin: {
|
||||
title: '密码登录',
|
||||
rememberMe: '记住我',
|
||||
forgetPassword: '忘记密码?',
|
||||
register: '注册账号',
|
||||
otherAccountLogin: '其他账号登录',
|
||||
otherLoginMode: '其他登录方式',
|
||||
superAdmin: '超级管理员',
|
||||
admin: '管理员',
|
||||
user: '普通用户'
|
||||
},
|
||||
codeLogin: {
|
||||
title: '验证码登录',
|
||||
getCode: '获取验证码',
|
||||
reGetCode: '{time}秒后重新获取',
|
||||
sendCodeSuccess: '验证码发送成功',
|
||||
imageCodePlaceholder: '请输入图片验证码'
|
||||
},
|
||||
register: {
|
||||
title: '注册账号',
|
||||
agreement: '我已经仔细阅读并接受',
|
||||
protocol: '《用户协议》',
|
||||
policy: '《隐私权政策》'
|
||||
},
|
||||
resetPwd: {
|
||||
title: '重置密码'
|
||||
},
|
||||
bindWeChat: {
|
||||
title: '绑定微信'
|
||||
}
|
||||
},
|
||||
home: {
|
||||
branchDesc:
|
||||
'为了方便大家开发和更新合并,我们对main分支的代码进行了精简,只保留了首页菜单,其余内容已移至example分支进行维护。预览地址显示的内容即为example分支的内容。',
|
||||
greeting: '早安,{userName}, 今天又是充满活力的一天!',
|
||||
weatherDesc: '今日多云转晴,20℃ - 25℃!',
|
||||
projectCount: '项目数',
|
||||
todo: '待办',
|
||||
message: '消息',
|
||||
downloadCount: '下载量',
|
||||
registerCount: '注册量',
|
||||
schedule: '作息安排',
|
||||
study: '学习',
|
||||
work: '工作',
|
||||
rest: '休息',
|
||||
entertainment: '娱乐',
|
||||
visitCount: '访问量',
|
||||
turnover: '成交额',
|
||||
dealCount: '成交量',
|
||||
projectNews: {
|
||||
title: '项目动态',
|
||||
moreNews: '更多动态',
|
||||
desc1: 'Soybean 在2021年5月28日创建了开源项目 soybean-admin!',
|
||||
desc2: 'Yanbowe 向 soybean-admin 提交了一个bug,多标签栏不会自适应。',
|
||||
desc3: 'Soybean 准备为 soybean-admin 的发布做充分的准备工作!',
|
||||
desc4: 'Soybean 正在忙于为soybean-admin写项目说明文档!',
|
||||
desc5: 'Soybean 刚才把工作台页面随便写了一些,凑合能看了!'
|
||||
},
|
||||
creativity: '创意'
|
||||
}
|
||||
},
|
||||
form: {
|
||||
required: '不能为空',
|
||||
userName: {
|
||||
required: '请输入用户名',
|
||||
invalid: '用户名格式不正确'
|
||||
},
|
||||
phone: {
|
||||
required: '请输入手机号',
|
||||
invalid: '手机号格式不正确'
|
||||
},
|
||||
pwd: {
|
||||
required: '请输入密码',
|
||||
invalid: '密码格式不正确,6-18位字符,包含字母、数字、下划线'
|
||||
},
|
||||
confirmPwd: {
|
||||
required: '请输入确认密码',
|
||||
invalid: '两次输入密码不一致'
|
||||
},
|
||||
code: {
|
||||
required: '请输入验证码',
|
||||
invalid: '验证码格式不正确'
|
||||
},
|
||||
email: {
|
||||
required: '请输入邮箱',
|
||||
invalid: '邮箱格式不正确'
|
||||
}
|
||||
},
|
||||
dropdown: {
|
||||
closeCurrent: '关闭',
|
||||
closeOther: '关闭其它',
|
||||
closeLeft: '关闭左侧',
|
||||
closeRight: '关闭右侧',
|
||||
closeAll: '关闭所有',
|
||||
pin: '固定标签',
|
||||
unpin: '取消固定'
|
||||
},
|
||||
icon: {
|
||||
themeConfig: '主题配置',
|
||||
themeSchema: '主题模式',
|
||||
lang: '切换语言',
|
||||
fullscreen: '全屏',
|
||||
fullscreenExit: '退出全屏',
|
||||
reload: '刷新页面',
|
||||
collapse: '折叠菜单',
|
||||
expand: '展开菜单',
|
||||
pin: '固定',
|
||||
unpin: '取消固定'
|
||||
},
|
||||
datatable: {
|
||||
itemCount: '共 {total} 条'
|
||||
}
|
||||
};
|
||||
|
||||
export default local;
|
||||
9
src/locales/locale.ts
Normal file
9
src/locales/locale.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import zhCN from './langs/zh-cn';
|
||||
import enUS from './langs/en-us';
|
||||
|
||||
const locales: Record<App.I18n.LangType, App.I18n.Schema> = {
|
||||
'zh-CN': zhCN,
|
||||
'en-US': enUS
|
||||
};
|
||||
|
||||
export default locales;
|
||||
12
src/locales/naive.ts
Normal file
12
src/locales/naive.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { dateEnUS, dateZhCN, enUS, zhCN } from 'naive-ui';
|
||||
import type { NDateLocale, NLocale } from 'naive-ui';
|
||||
|
||||
export const naiveLocales: Record<App.I18n.LangType, NLocale> = {
|
||||
'zh-CN': zhCN,
|
||||
'en-US': enUS
|
||||
};
|
||||
|
||||
export const naiveDateLocales: Record<App.I18n.LangType, NDateLocale> = {
|
||||
'zh-CN': dateZhCN,
|
||||
'en-US': dateEnUS
|
||||
};
|
||||
Reference in New Issue
Block a user