Browse Source

add zh-CN directory to the locales directory and move the code from zh-CN.js file to different files

Mandeep 4 years ago
parent
commit
77d4a9da2b
2 changed files with 11 additions and 9 deletions
  1. 3 9
      src/locales/lang/zh-CN.js
  2. 8 0
      src/locales/lang/zh-CN/menu.js

+ 3 - 9
src/locales/lang/zh-CN.js

@@ -1,5 +1,6 @@
 import antd from 'ant-design-vue/es/locale-provider/zh_CN'
 import momentCN from 'moment/locale/zh-cn'
+import menu from './zh-CN/menu'
 
 const components = {
   antLocale: antd,
@@ -7,16 +8,9 @@ const components = {
   momentLocale: momentCN
 }
 
-const locale = {
+export default {
   'message': '-',
-  'menu.home': '主页',
-  'menu.dashboard': '仪表盘',
-  'menu.dashboard.analysis': '分析页',
-  'menu.dashboard.monitor': '监控页',
-  'menu.dashboard.workplace': '工作台'
-}
 
-export default {
   ...components,
-  ...locale
+  ...menu
 }

+ 8 - 0
src/locales/lang/zh-CN/menu.js

@@ -0,0 +1,8 @@
+export default {
+    'menu.welcome': '欢迎',
+    'menu.home': '主页',
+    'menu.dashboard': '仪表盘',
+    'menu.dashboard.analysis': '分析页',
+    'menu.dashboard.monitor': '监控页',
+    'menu.dashboard.workplace': '工作台'
+}