Skip to content

Commit

Permalink
add Chinese language from @vannel
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonEAX committed Jan 29, 2020
1 parent cc52212 commit 5450cc5
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 13 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ Understanding and learning this knowledge in advance will greatly help the use o
- Page permission [expected]
- Directive permission [expected]
- Permission configuration page [expected]
- Two-step login
- Two-step login [expected]
- Multi-environment build
- dev sit stage prod [expected]
- Global Features
- I18n
- I18n (supports en_US | zh_CN | ru_RU)
- Multiple dynamic themes
- Dynamic sidebar (supports multi-level routing)
- Dynamic breadcrumb
Expand All @@ -87,9 +87,9 @@ Understanding and learning this knowledge in advance will greatly help the use o
- Responsive Sidebar
- Editor
- Rich Text Editor [expected]
- Markdown Editor [expected]
- JSON Editor [expected]
- Rich Text Editor
- Markdown Editor
- JSON Editor
- Excel
- Export Excel [expected]
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions src/demo/locale/zh_CN/components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
thisBaseOn: '这是基于',
baseOnL18n: '该项目的国际化基于',
baseOn: '是根据',
documentation: '文献资料',
palette: '您可以在上生成调色板',
theme: '选择配色方案:',
dropHere: '将文件拖放到此处进行上传',
tinymceTips: '在线富文本编辑器作为LGPL下的开源软件发布。',
imageUploadTips: '改性。 如果要使用它,最好使用正式版本。',
dropzoneTips: '',
stickyTips: '当页面滚动到预设位置时,将在顶部粘贴。',
backToTop: '当页面滚动到指定位置时,“返回顶部”按钮将显示在右下角',
draggable: '允许您在其中拖动面板和项目',
};
2 changes: 1 addition & 1 deletion src/locale/en/index.js → src/locale/en_US/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import route from './route';
import components from '@/demo/locale/en/components';
import components from '@/demo/locale/en_US/components';

export default {
route,
Expand Down
File renamed without changes.
16 changes: 13 additions & 3 deletions src/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import VueI18n from 'vue-i18n';

import { settings } from '@/config';
import vuetify from '@/locale/vuetify';
import en from './en';
import ru from './ru';
import en from './en_US';
import zh from './zh_CN';
import ru from './ru_RU';

Vue.use(VueI18n);

Expand All @@ -19,6 +20,10 @@ const messages = {
...en,
$vuetify: vuetify.en,
},
zh: {
...zh,
$vuetify: vuetify.zh,
},
ru: {
...ru,
$vuetify: vuetify.ru,
Expand All @@ -34,6 +39,11 @@ export const locales = [
locale: 'en',
abbr: 'ENG',
},
{
title: '中文',
locale: 'zh',
abbr: 'CHN',
},
{
title: 'Русский',
locale: 'ru',
Expand All @@ -45,7 +55,7 @@ export const locales = [
* VueI18n instance
*/
const i18n = new VueI18n({
// set locale options: en | ru
// set locale options: en_US | zh_CN | ru_RU
locale: settings.locale,
// set locale messages
messages,
Expand Down
2 changes: 1 addition & 1 deletion src/locale/ru/index.js → src/locale/ru_RU/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import route from './route';
import components from '@/demo/locale/ru/components';
import components from '@/demo/locale/ru_RU/components';

export default {
route,
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/locale/vuetify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import en from 'vuetify/es5/locale/en';
import ru from 'vuetify/es5/locale/ru';
import zh from 'vuetify/es5/locale/zh-Hans';

const locales = { en, ru };
const locales = { en, ru, zh };

export default locales;
3 changes: 2 additions & 1 deletion src/locale/zh_CN/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import route from './route';
import components from '@/demo/locale/en/components';
import components from '@/demo/locale/zh_CN/components';

export default {
route,
Expand All @@ -13,6 +13,7 @@ export default {
settings: {
title: '主题设置',
default: '设为默认',
version: '版本',
position: '元素位置',
theme: '主题',
dark: '暗黑主题',
Expand Down
3 changes: 2 additions & 1 deletion src/locale/zh_CN/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export default {
},
vuetify: 'Vuetify UI',
vuetifyComponents: {
/* There might be some different names of each component in this section, so the original English name of each component is reserved. */
/* There might be some different names of each component in this section,
so the original English name of each component is reserved. */
components: '组件/Components',
alert: '警告/Alert',
avatar: '头像/Avatars',
Expand Down

0 comments on commit 5450cc5

Please sign in to comment.