feat: added zh-CN translations to the UI (#448)

This commit is contained in:
JackyChan
2020-04-02 15:07:56 +08:00
committed by GitHub
parent 6552f4c13f
commit 03114a842b
3 changed files with 149 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import translationEN from './translations/en-US.json';
import translationPT from './translations/pt-BR.json';
import translationES from './translations/es-ES.json';
import translationDE from './translations/de-DE.json';
import translationCN from './translations/zh-CN.json';
i18n
// pass the i18n instance to react-i18next.
@@ -15,7 +16,7 @@ i18n
// in case window.VEDACCIO_LANGUAGE is undefined,it will fall back to 'en-US'
lng: window?.__VERDACCIO_BASENAME_UI_OPTIONS?.language,
fallbackLng: 'en-US',
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE'],
whitelist: ['en-US', 'pt-BR', 'es-ES', 'de-DE', 'zh-CN'],
load: 'currentOnly',
resources: {
'en-US': {
@@ -30,6 +31,9 @@ i18n
'de-DE': {
translation: translationDE,
},
'zh-CN': {
translation: translationCN,
},
},
debug: false,
interpolation: {