From 1fe654e0963da8c2801561be10de3222055a2497 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 3 Apr 2020 14:55:16 +0200 Subject: [PATCH] Fix peertube interface i18n --- client/src/app/app.module.ts | 4 ++-- shared/models/i18n/i18n.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 55e929e78..ef23c9655 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -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 ] }, diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 27b911b75..9a5ea27dc 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts @@ -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' }