Updates used languages and fixes loading them.

This commit is contained in:
damencho 2019-07-22 15:56:59 +01:00 committed by Дамян Минков
parent 8ecb01ec21
commit 6d4601fe66
3 changed files with 70 additions and 30 deletions

View File

@ -1,27 +1,31 @@
{ {
"en": "English", "en": "English",
"af": "Afrikaans", "af": "Afrikaans",
"az": "Azerbaijani",
"bg": "Bulgarian", "bg": "Bulgarian",
"ca": "Catalan",
"cs": "Czech", "cs": "Czech",
"de": "German", "de": "German",
"el": "Greek", "el": "Greek",
"enGB": "English (United Kingdom)",
"eo": "Esperanto", "eo": "Esperanto",
"es": "Spanish", "es": "Spanish",
"esUS": "Spanish (Latin America)",
"fi": "Finnish",
"fr": "French", "fr": "French",
"frCA": "French (Canadian)",
"hr": "Croatian",
"hy": "Armenian", "hy": "Armenian",
"it": "Italian", "it": "Italian",
"ja": "Japanese", "ja": "Japanese",
"ko": "Korean", "ko": "Korean",
"nb": "Norwegian Bokmal", "nl": "Dutch",
"oc": "Occitan", "oc": "Occitan",
"pl": "Polish", "pl": "Polish",
"ptBR": "Portuguese (Brazil)", "ptBR": "Portuguese (Brazil)",
"ru": "Russian", "ru": "Russian",
"sk": "Slovak",
"sl": "Slovenian",
"sv": "Swedish", "sv": "Swedish",
"tr": "Turkish", "tr": "Turkish",
"vi": "Vietnamese", "vi": "Vietnamese",
"zhCN": "Chinese (China)" "zhCN": "Chinese (China)",
"zhTW": "Chinese (Taiwan)"
} }

View File

@ -7,6 +7,12 @@ import i18next from 'i18next';
*/ */
const _LANGUAGES = { const _LANGUAGES = {
// Afrikaans
'af': {
languages: require('../../../../lang/languages-af'),
main: require('../../../../lang/main-af')
},
// Bulgarian // Bulgarian
'bg': { 'bg': {
languages: require('../../../../lang/languages-bg'), languages: require('../../../../lang/languages-bg'),
@ -19,6 +25,12 @@ const _LANGUAGES = {
main: require('../../../../lang/main-de') main: require('../../../../lang/main-de')
}, },
// English (United Kingdom)
'enGB': {
languages: require('../../../../lang/languages-enGB'),
main: require('../../../../lang/main-enGB')
},
// Esperanto // Esperanto
'eo': { 'eo': {
languages: require('../../../../lang/languages-eo'), languages: require('../../../../lang/languages-eo'),
@ -31,16 +43,34 @@ const _LANGUAGES = {
main: require('../../../../lang/main-es') main: require('../../../../lang/main-es')
}, },
// Spanish (Latin America)
'esUS': {
languages: require('../../../../lang/languages-esUS'),
main: require('../../../../lang/main-esUS')
},
// Finnish
'fi': {
languages: require('../../../../lang/languages-fi'),
main: require('../../../../lang/main-fi')
},
// French // French
'fr': { 'fr': {
languages: require('../../../../lang/languages-fr'), languages: require('../../../../lang/languages-fr'),
main: require('../../../../lang/main-fr') main: require('../../../../lang/main-fr')
}, },
// Armenian // French (Canadian)
'hy': { 'frCA': {
languages: require('../../../../lang/languages-hy'), languages: require('../../../../lang/languages-frCA'),
main: require('../../../../lang/main-hy') main: require('../../../../lang/main-frCA')
},
// Croatian
'hr': {
languages: require('../../../../lang/languages-hr'),
main: require('../../../../lang/main-hr')
}, },
// Italian // Italian
@ -49,10 +79,22 @@ const _LANGUAGES = {
main: require('../../../../lang/main-it') main: require('../../../../lang/main-it')
}, },
// Norwegian Bokmal // Japanese
'nb': { 'ja': {
languages: require('../../../../lang/languages-nb'), languages: require('../../../../lang/languages-ja'),
main: require('../../../../lang/main-nb') main: require('../../../../lang/main-ja')
},
// Korean
'ko': {
languages: require('../../../../lang/languages-ko'),
main: require('../../../../lang/main-ko')
},
// Dutch
'nl': {
languages: require('../../../../lang/languages-nl'),
main: require('../../../../lang/main-nl')
}, },
// Occitan // Occitan
@ -79,34 +121,28 @@ const _LANGUAGES = {
main: require('../../../../lang/main-ru') main: require('../../../../lang/main-ru')
}, },
// Slovak
'sk': {
languages: require('../../../../lang/languages-sk'),
main: require('../../../../lang/main-sk')
},
// Slovenian
'sl': {
languages: require('../../../../lang/languages-sl'),
main: require('../../../../lang/main-sl')
},
// Swedish // Swedish
'sv': { 'sv': {
languages: require('../../../../lang/languages-sv'), languages: require('../../../../lang/languages-sv'),
main: require('../../../../lang/main-sv') main: require('../../../../lang/main-sv')
}, },
// Turkish // Vietnamese
'tr': { 'vi': {
languages: require('../../../../lang/languages-tr'), languages: require('../../../../lang/languages-vi'),
main: require('../../../../lang/main-tr') main: require('../../../../lang/main-vi')
}, },
// Chinese (China) // Chinese (China)
'zhCN': { 'zhCN': {
languages: require('../../../../lang/languages-zhCN'), languages: require('../../../../lang/languages-zhCN'),
main: require('../../../../lang/main-zhCN') main: require('../../../../lang/main-zhCN')
},
// Chinese (Taiwan)
'zhTW': {
languages: require('../../../../lang/languages-zhTW'),
main: require('../../../../lang/main-zhTW')
} }
}; };

View File

@ -41,7 +41,7 @@ const options = {
(typeof interfaceConfig !== 'undefined' && interfaceConfig.APP_NAME) (typeof interfaceConfig !== 'undefined' && interfaceConfig.APP_NAME)
|| 'Jitsi Meet', || 'Jitsi Meet',
backend: { backend: {
loadPath: 'lang/__ns__-__lng__.json' loadPath: 'lang/{{ns}}-{{lng}}.json'
}, },
defaultNS: 'main', defaultNS: 'main',
fallbackLng: DEFAULT_LANGUAGE, fallbackLng: DEFAULT_LANGUAGE,