diff --git a/src/i18n/index.js b/src/i18n/index.js index 4bd4a4c..e2afb6f 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -13,6 +13,10 @@ import pageLangSetCn from './pages/langSet/zh-cn' import pageLangSetEn from './pages/langSet/en' import pageLangSetTw from './pages/langSet/zh-tw' +import pagemenuCn from './pages/menu/zh-cn' +import pagemenuEn from './pages/menu/en' +import pagemenuTw from './pages/menu/zh-tw' + const i18n = createI18n({ // 全局注入 $t 函数 globalInjection: true, @@ -20,9 +24,9 @@ const i18n = createI18n({ locale: store.getters.language, //默认选择的语言 legacy: false, // 使用 Composition API 模式,则需要将其设置为false messages: { - 'zh-cn': { ...zhCn, ...pageLoginCn, ...pageLangSetCn }, - 'zh-tw': { ...zhTw, ...pageLoginTw, ...pageLangSetTw }, - 'en': { ...en, ...pageLoginEn, ...pageLangSetEn } + 'zh-cn': { ...zhCn, ...pageLoginCn, ...pageLangSetCn, ...pagemenuCn }, + 'zh-tw': { ...zhTw, ...pageLoginTw, ...pageLangSetTw, ...pagemenuTw }, + 'en': { ...en, ...pageLoginEn, ...pageLangSetEn, ...pagemenuEn } } }) console.log('lang=' + store.getters.language) diff --git a/src/i18n/lang/en.js b/src/i18n/lang/en.js index ba9525a..b610703 100644 --- a/src/i18n/lang/en.js +++ b/src/i18n/lang/en.js @@ -6,7 +6,7 @@ export default { system: 'System', monitoring: 'Monitoring', systemTools: 'Tools', - externalOpen: 'ExternalOpen', + externalOpen: 'External open', icon: 'Icon', systemMenu: 'Menu', systemRole: 'Role', @@ -20,33 +20,34 @@ export default { loginLog: 'Login log', systemNotice: 'Notice', systemLang: 'Language set', - timedTask: 'TimedTask', - serviceMonitor: 'ServiceMonitor', - codeGeneration: 'CodeGeneration', - systemInterface: 'SystemInterface', + timedTask: 'Timed task', + serviceMonitor: 'Service monitoring', + codeGeneration: 'Code generation', + systemInterface: 'System interface', sendEmail: 'Email', systemArticle: 'Article', articleList: 'Article list', formBuild: 'Form building', officialWebsite: 'Official website', - fileStorage: 'File Storage', + fileStorage: 'File storage', personalCenter: 'Personal', - menuPermi: 'Menu permi', - assignUsers: 'Assign users', - cacheMonitor: 'Cache monitor', + menuPermi: 'Menu permissions', + assignUsers: 'Authorized user', + cacheMonitor: 'Cache monitoring', }, tagsView: { refresh: 'refresh', close: 'close', - closeOther: 'closeOther', - closeLeft: 'closeLeft', - closeRight: 'closeRight', - closeAll: 'closeAll', + closeOther: 'close other', + closeLeft: 'close left', + closeRight: 'close right', + closeAll: 'close all', fullscreen: 'fullscreen', - closeFullscreen: 'closeFullscreen', + closeFullscreen: 'close fullscreen', }, layout: { tip1: 'If you feel good, welcome to ⭐ Star ⭐ Collect it so that the author can continue to be free. Thank you!', + rewardUser: 'Reward the author with a cup of coffee to express encouragement', contactUs: 'contact us', donationSupport: 'donation support', officialWebsite: 'Official website', @@ -73,7 +74,17 @@ export default { logOutConfirm: 'Are you sure you want to exit the current login?', large: 'Large', default: 'Default', - small: 'Small' + small: 'Small', + myWorkbench: 'My workbench', + onlineUsers: 'Online user', + message: 'Message', + amount: 'Amount', + order: 'Order', + modifyInformation: 'Modify information', + technicalSelection: 'Technical selection', + frontendTechnology: 'Front-end technology', + backendTechnology: 'Backend technology', + BackstageManagement: 'Backstage management', }, common: { ok: 'Ok', @@ -84,7 +95,11 @@ export default { traditionalChinese: 'TraditionalChinese', name: 'Name', content: 'Content', - addTime: 'AddTime' + addTime: 'AddTime', + nickName: 'NickName', + time: 'Time', + yes: '是', + no: '否', }, btn: { add: 'Add', diff --git a/src/i18n/lang/zh-cn.js b/src/i18n/lang/zh-cn.js index 9d37d50..4b6baed 100644 --- a/src/i18n/lang/zh-cn.js +++ b/src/i18n/lang/zh-cn.js @@ -47,6 +47,7 @@ export default { }, layout: { tip1: '如果觉得不错欢迎给个⭐Star⭐收藏一下,这样作者才有继续免费下去的动力,谢谢!', + rewardUser: '打赏作者喝杯咖啡表示鼓励', contactUs: '联系信息', donationSupport: '捐贈支持', officialWebsite: '官网', @@ -73,7 +74,17 @@ export default { logOutConfirm: '你確定要退出当前登录吗?', large: '较大', default: '默认', - small: '较小' + small: '较小', + myWorkbench: '我的工作台', + onlineUsers: '在线用户', + message: '消息', + amount: '金额', + order: '订单', + modifyInformation: '修改信息', + technicalSelection: '技术选型', + frontendTechnology: '前端技术', + backendTechnology: '后端技术', + BackstageManagement: '后台管理', }, common: { ok: '确定', @@ -84,7 +95,11 @@ export default { traditionalChinese: '繁体', name: '名称', content: '内容', - addTime: '添加时间' + addTime: '添加时间', + nickName: '昵称', + time: '时间', + yes: '是', + no: '否', }, btn: { add: '新增', diff --git a/src/i18n/lang/zh-tw.js b/src/i18n/lang/zh-tw.js index db49bc4..a63f229 100644 --- a/src/i18n/lang/zh-tw.js +++ b/src/i18n/lang/zh-tw.js @@ -73,7 +73,17 @@ export default { logOutConfirm: '你確定要退出当前登录吗?', large: '較大', default: '默認', - small: '較小' + small: '較小', + myWorkbench: '我的工作台', + onlineUsers: '在線用戶', + message: '消息', + amount: '金額', + order: '訂單', + modifyInformation: '修改信息', + technicalSelection: '技術選型', + frontendTechnology: '前端技術', + backendTechnology: '後端技術', + BackstageManagement: '後台管理', }, common: { ok: '確定', @@ -84,7 +94,11 @@ export default { traditionalChinese: '繁體', name: '名稱', content: '內容', - addTime: '添加時間' + addTime: '添加時間', + nickName: '暱稱', + time: '時間', + yes: '是', + no: '否', }, btn: { add: '新增', diff --git a/src/i18n/pages/menu/en.js b/src/i18n/pages/menu/en.js new file mode 100644 index 0000000..a3fe483 --- /dev/null +++ b/src/i18n/pages/menu/en.js @@ -0,0 +1,22 @@ +export default { + m: { + menuName: 'menuName', + menuState: 'menuState', + icon: 'icon', + menuid: 'menuid', + menuType: 'menuType', + sort: 'sort', + authorityID: 'authorityID', + componentPath: 'componentPath', + isShow: 'isShow', + parentMenu: 'parentMenu', + directory: 'directory', + menu: 'menu', + button: 'button', + link: 'link', + isFrame: 'isFrame', + routePath: 'routePath', + permissionStr: 'permission', + isCache: 'isCache', + } +} \ No newline at end of file diff --git a/src/i18n/pages/menu/zh-cn.js b/src/i18n/pages/menu/zh-cn.js new file mode 100644 index 0000000..fda46ca --- /dev/null +++ b/src/i18n/pages/menu/zh-cn.js @@ -0,0 +1,22 @@ +export default { + m: { + menuName: '菜单名称', + menuState: '菜单状态', + icon: '图标', + menuid: '菜单id', + menuType: '菜单类型', + sort: '排序', + authorityID: '权限标识', + componentPath: '组件路径', + isShow: '是否显示', + parentMenu: '上级菜单', + directory: '目录', + menu: '菜单', + button: '按钮', + link: '链接', + isFrame: '是否外链', + routePath: '路由地址', + permissionStr: '权限字符', + isCache: '是否缓存', + } +} \ No newline at end of file diff --git a/src/i18n/pages/menu/zh-tw.js b/src/i18n/pages/menu/zh-tw.js new file mode 100644 index 0000000..d51793d --- /dev/null +++ b/src/i18n/pages/menu/zh-tw.js @@ -0,0 +1,22 @@ +export default { + m: { + menuName: '菜單名稱', + menuState: '菜單狀態', + icon: '圖標', + menuid: '菜單id', + menuType: '菜單類型', + sort: '排序', + authorityID: '權限標識', + componentPath: '組件路徑', + isShow: '是否顯示', + parentMenu: '上級菜單', + directory: '目錄', + menu: '菜單', + button: '按鈕', + link: '鏈接', + isFrame: '是否外鏈', + routePath: '路由地址', + permissionStr: '權限字符', + isCache: '是否緩存', + } +} \ No newline at end of file diff --git a/src/views/dashboard/PanelGroup.vue b/src/views/dashboard/PanelGroup.vue index 8d3c38e..ac390e3 100644 --- a/src/views/dashboard/PanelGroup.vue +++ b/src/views/dashboard/PanelGroup.vue @@ -6,7 +6,7 @@
-
在线用户
+
{{$t('layout.onlineUsers')}}
{{ state.onlineUserNum }}
@@ -17,7 +17,7 @@
-
消息
+
{{$t('layout.message')}}
{{ state.chatNum }}
@@ -28,7 +28,7 @@
-
金额
+
{{$t('layout.amount')}}
{{ state.amount }}
@@ -39,7 +39,7 @@
-
订单
+
{{$t('layout.order')}}
{{ state.order }}
diff --git a/src/views/index.vue b/src/views/index.vue index 7c4fec9..03a3e0d 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -34,7 +34,7 @@ -

ZRAdmin.NET后台管理框架

+

ZRAdmin.NET {{ $t('layout.BackstageManagement') }}

ZRAdmin.NET借鉴了很多开源项目的优点,让你开发Web管理系统更简单,所以我也把它给开源了(前端 vue页面主要参考若依,在此表示感谢.) @@ -53,9 +53,7 @@

- 访问码云 - + Gitee Github @@ -64,9 +62,9 @@

{{ $t('layout.tip1') }}

-

技术选型

+

{{ $t('layout.technicalSelection') }}

-

后端技术

+

{{ $t('layout.backendTechnology') }}

  • NET6
  • JWT
  • @@ -81,7 +79,7 @@
-

前端技术

+

{{ $t('layout.frontendTechnology') }}

  • Vue3
  • Vuex
  • @@ -106,7 +104,7 @@
    -
    打赏作者喝杯咖啡表示鼓励
    +
    {{ $t('layout.rewardUser') }}
    donate
    @@ -122,7 +120,7 @@ http://www.izhaorui.cn/doc

    - QQ群: + {{ $t('layout.qqGroup') }}: diff --git a/src/views/index_v1.vue b/src/views/index_v1.vue index a8682fa..16ecc14 100644 --- a/src/views/index_v1.vue +++ b/src/views/index_v1.vue @@ -5,7 +5,7 @@

    @@ -20,7 +20,7 @@ -
    昵称:
    +
    {{$t('common.nickName')}}:
    {{ userInfo.nickName }}
    @@ -42,7 +42,7 @@
    -
    时间:
    +
    {{$t('common.time')}}:
    {{ currentTime }}
    @@ -51,7 +51,7 @@
    - 修改信息 + {{$t('layout.modifyInformation')}} @@ -64,8 +64,8 @@
    @@ -75,6 +75,7 @@
    • +
      {{v.userIP}}
    .home { - width: 97%; overflow: hidden; .home-card-more { float: right; @@ -198,7 +198,7 @@ function onOpenGitee() {} display: flex; .right-label { color: gray; - width: 40px; + width: 75px; } .right-value { flex: 1; diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 70ab8e8..e7f93fb 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,10 +1,10 @@ @@ -191,7 +191,7 @@ - 组件路径 + {{ $t('m.componentPath') }} @@ -205,7 +205,7 @@ - 权限字符 + {{ $t('m.permissionStr') }} @@ -230,11 +230,11 @@ - 是否缓存 + {{ $t('m.isCache') }} - 缓存 - 不缓存 + {{ $t('common.yes') }} + {{ $t('common.no') }} @@ -246,7 +246,7 @@ - 显示状态 + {{ $t('m.isShow') }} {{ dict.dictLabel }} @@ -261,7 +261,7 @@ - 菜单状态 + {{ $t('m.menuState') }} {{ dict.dictLabel }} @@ -393,7 +393,7 @@ function handleAdd(row) { form.value.parentId = 0 } open.value = true - title.value = '添加菜单' + title.value = proxy.$t('btn.add') } /** 展开/折叠操作 */ function toggleExpandAll() { @@ -410,7 +410,7 @@ async function handleUpdate(row) { getMenu(row.menuId).then((response) => { form.value = response.data open.value = true - title.value = '修改菜单' + title.value = proxy.$t('btn.edit') }) } /** 提交按钮 */