Przeglądaj źródła

add zh-CN in the application

pull/342/head
Guillaume Vincent 7 lat temu
rodzic
commit
f82168c571
6 zmienionych plików z 8 dodań i 8 usunięć
  1. +1
    -1
      package.json
  2. +3
    -3
      scripts/buildI18n.js
  3. +1
    -1
      src/i18n/fr.json
  4. +1
    -1
      src/i18n/zh-CN.json
  5. +1
    -1
      src/i18n/zh.json
  6. +1
    -1
      src/main.js

+ 1
- 1
package.json Wyświetl plik

@@ -34,7 +34,7 @@
"lesspass": "^6.0.0",
"lodash.debounce": "^4.0.8",
"vue": "^2.2.2",
"vue-polyglot": "^0.1.4",
"vue-polyglot": "^0.1.5",
"vue-router": "^2.3.0",
"vuex": "^2.2.1",
"vuex-persistedstate": "^1.3.0",


+ 3
- 3
scripts/buildI18n.js Wyświetl plik

@@ -18,7 +18,7 @@ walker.on("file", (root, fileStats, next) => {
});

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", () => {
LANGUAGES_AVAILABLE.forEach(lang => {
const localeFile = path.join(I18N_DIR, `${lang}.json`);
@@ -29,9 +29,9 @@ walker.on("end", () => {

const localeOrdered = {};
Object.keys(locale).sort().forEach(function(key) {
if(key in existingLocale){
if (key in existingLocale) {
localeOrdered[key] = existingLocale[key];
}else{
} else {
localeOrdered[key] = locale[key];
}
});


+ 1
- 1
src/i18n/fr.json Wyświetl plik

@@ -40,4 +40,4 @@
"WelcomeRegister": "Bienvenue {email}, merci pour vous être enregistré.",
"version": "version",
"versionShortcut": "v"
}
}

src/i18n/zh-cn.json → src/i18n/zh-CN.json Wyświetl plik

@@ -40,4 +40,4 @@
"WelcomeRegister": "欢迎 {email},谢谢您的注册。",
"version": "版本",
"versionShortcut": "v"
}
}

+ 1
- 1
src/i18n/zh.json Wyświetl plik

@@ -40,4 +40,4 @@
"WelcomeRegister": "歡迎 {email},謝謝您的註冊。",
"version": "版本",
"versionShortcut": "v"
}
}

+ 1
- 1
src/main.js Wyświetl plik

@@ -7,7 +7,7 @@ import Polyglot from 'vue-polyglot';

Vue.use(Polyglot, {
defaultLanguage: 'en',
languagesAvailable: ['fr', 'es', 'de']
languagesAvailable: ['fr', 'es', 'de', 'zh', 'zh-CN']
});

sync(store, router);


Ładowanie…
Anuluj
Zapisz