From: Chocobozzz Date: Thu, 28 Jun 2018 12:56:46 +0000 (+0200) Subject: Add Basque and Catalan languages X-Git-Tag: v1.0.0-beta.10.pre.1~120 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=10e63b6850710a0a6fc35fe029b2efb133654c74;p=oweals%2Fpeertube.git Add Basque and Catalan languages --- diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 58aca437b..a2a4a554d 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -eu @@ -11,9 +11,9 @@ npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client mv "./dist/$defaultLanguage/assets" "./dist" # Supported languages -languages="fr_FR" +languages=("fr_FR" "eu_ES" "ca_ES") -for lang in "$languages"; do +for lang in "${languages[@]}"; do npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ --output-path "dist/$lang/" --deploy-url "/client/$lang/" diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 14b02a01d..0c79c431e 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts @@ -2,12 +2,18 @@ export const LOCALE_FILES = [ 'player', 'server' ] export const I18N_LOCALES = { 'en-US': 'English', - 'fr-FR': 'Français' + 'fr-FR': 'Français', + 'eu-ES': 'euskara', + 'ca-ES': 'català' + // 'pl-PL': 'polski' } const I18N_LOCALE_ALIAS = { 'en': 'en-US', - 'fr': 'fr-FR' + 'fr': 'fr-FR', + 'eu': 'eu-ES', + 'ca': 'ca-ES' + // 'pl': 'pl-PL' } export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES)