Fix peertube interface i18n

This commit is contained in:
Chocobozzz 2020-04-03 14:55:16 +02:00
parent a7d3671dc3
commit 1fe654e096
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 8 additions and 3 deletions

View File

@ -81,12 +81,12 @@ export function metaFactory (serverService: ServerService): MetaLoader {
{
provide: TRANSLATIONS,
useFactory: (locale: string) => {
// Default locale, nothing to translate
// Default locale, nothing to translate
const completeLocale = getCompleteLocale(locale)
if (isDefaultLocale(completeLocale)) return ''
const fileLocale = buildFileLocale(locale)
return require(`raw-loader!../locale/angular.${fileLocale}.xlf`)
return require(`raw-loader!../locale/angular.${fileLocale}.xlf`).default
},
deps: [ LOCALE_ID ]
},

View File

@ -33,20 +33,25 @@ const I18N_LOCALE_ALIAS = {
'ca': 'ca-ES',
'cs': 'cs-CZ',
'de': 'de-DE',
'el': 'el-GR',
'en': 'en-US',
'es': 'es-ES',
'eu': 'eu-ES',
'fi': 'fi-FI',
'fr': 'fr-FR',
'ja': 'ja-JP',
'it': 'it-IT',
'hu': 'hu-HU',
'nl': 'nl-NL',
'pl': 'pl-PL',
'pt': 'pt-PT',
'pt': 'pt-BR',
'ru': 'ru-RU',
'sv': 'sv-SE',
'th': 'th-TH',
'zh': 'zh-Hans-CN',
'zh-Hans': 'zh-Hans-CN',
'zh-CN': 'zh-Hans-CN',
'zh-Hant': 'zh-Hant-TW',
'zh-TW': 'zh-Hant-TW'
}