@@ -34,7 +34,7 @@ | |||||
"lesspass": "^6.0.0", | "lesspass": "^6.0.0", | ||||
"lodash.debounce": "^4.0.8", | "lodash.debounce": "^4.0.8", | ||||
"vue": "^2.2.2", | "vue": "^2.2.2", | ||||
"vue-polyglot": "^0.1.4", | |||||
"vue-polyglot": "^0.1.5", | |||||
"vue-router": "^2.3.0", | "vue-router": "^2.3.0", | ||||
"vuex": "^2.2.1", | "vuex": "^2.2.1", | ||||
"vuex-persistedstate": "^1.3.0", | "vuex-persistedstate": "^1.3.0", | ||||
@@ -18,7 +18,7 @@ walker.on("file", (root, fileStats, next) => { | |||||
}); | }); | ||||
const I18N_DIR = '../src/i18n'; | const I18N_DIR = '../src/i18n'; | ||||
const LANGUAGES_AVAILABLE = ['zh', 'fr', 'es', 'uk', 'de', 'it', 'en']; | |||||
const LANGUAGES_AVAILABLE = ['zh', 'zh-CN', 'fr', 'es', 'uk', 'de', 'it', 'en']; | |||||
walker.on("end", () => { | walker.on("end", () => { | ||||
LANGUAGES_AVAILABLE.forEach(lang => { | LANGUAGES_AVAILABLE.forEach(lang => { | ||||
const localeFile = path.join(I18N_DIR, `${lang}.json`); | const localeFile = path.join(I18N_DIR, `${lang}.json`); | ||||
@@ -29,9 +29,9 @@ walker.on("end", () => { | |||||
const localeOrdered = {}; | const localeOrdered = {}; | ||||
Object.keys(locale).sort().forEach(function(key) { | Object.keys(locale).sort().forEach(function(key) { | ||||
if(key in existingLocale){ | |||||
if (key in existingLocale) { | |||||
localeOrdered[key] = existingLocale[key]; | localeOrdered[key] = existingLocale[key]; | ||||
}else{ | |||||
} else { | |||||
localeOrdered[key] = locale[key]; | localeOrdered[key] = locale[key]; | ||||
} | } | ||||
}); | }); | ||||
@@ -40,4 +40,4 @@ | |||||
"WelcomeRegister": "Bienvenue {email}, merci pour vous être enregistré.", | "WelcomeRegister": "Bienvenue {email}, merci pour vous être enregistré.", | ||||
"version": "version", | "version": "version", | ||||
"versionShortcut": "v" | "versionShortcut": "v" | ||||
} | |||||
} |
@@ -40,4 +40,4 @@ | |||||
"WelcomeRegister": "欢迎 {email},谢谢您的注册。", | "WelcomeRegister": "欢迎 {email},谢谢您的注册。", | ||||
"version": "版本", | "version": "版本", | ||||
"versionShortcut": "v" | "versionShortcut": "v" | ||||
} | |||||
} |
@@ -40,4 +40,4 @@ | |||||
"WelcomeRegister": "歡迎 {email},謝謝您的註冊。", | "WelcomeRegister": "歡迎 {email},謝謝您的註冊。", | ||||
"version": "版本", | "version": "版本", | ||||
"versionShortcut": "v" | "versionShortcut": "v" | ||||
} | |||||
} |
@@ -7,7 +7,7 @@ import Polyglot from 'vue-polyglot'; | |||||
Vue.use(Polyglot, { | Vue.use(Polyglot, { | ||||
defaultLanguage: 'en', | defaultLanguage: 'en', | ||||
languagesAvailable: ['fr', 'es', 'de'] | |||||
languagesAvailable: ['fr', 'es', 'de', 'zh', 'zh-CN'] | |||||
}); | }); | ||||
sync(store, router); | sync(store, router); | ||||