diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-31 18:04:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-31 18:04:54 +0200 |
commit | fb9e6cb075197d54f9a39dc4b0f9c45038e900d5 (patch) | |
tree | 5139e5381f17f4823edb7df3d5ed18ba3c6bec16 | |
parent | a3d1026bf300a8bd7a95e9a25822cfa52adc4208 (diff) | |
download | PeerTube-fb9e6cb075197d54f9a39dc4b0f9c45038e900d5.tar.gz PeerTube-fb9e6cb075197d54f9a39dc4b0f9c45038e900d5.tar.zst PeerTube-fb9e6cb075197d54f9a39dc4b0f9c45038e900d5.zip |
Add german, spanish and chinese (traditional, taiwan) languages
-rwxr-xr-x | scripts/build/client.sh | 2 | ||||
-rw-r--r-- | shared/models/i18n/i18n.ts | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 567a6e5e0..5b70b6045 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -31,7 +31,7 @@ post_build_hook | |||
31 | # Don't build other languages if --light arg is provided | 31 | # Don't build other languages if --light arg is provided |
32 | if [ -z ${1+x} ] || [ "$1" != "--light" ]; then | 32 | if [ -z ${1+x} ] || [ "$1" != "--light" ]; then |
33 | # Supported languages | 33 | # Supported languages |
34 | languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo") | 34 | languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo" "zh_Hant_TW" "de_DE" "es_ES") |
35 | 35 | ||
36 | for lang in "${languages[@]}"; do | 36 | for lang in "${languages[@]}"; do |
37 | # TODO: remove when the project will use runtime translations | 37 | # TODO: remove when the project will use runtime translations |
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index 3f2ca4eaf..baf3fa0f4 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -6,7 +6,10 @@ export const I18N_LOCALES = { | |||
6 | 'eu-ES': 'euskara', | 6 | 'eu-ES': 'euskara', |
7 | 'ca-ES': 'català', | 7 | 'ca-ES': 'català', |
8 | 'cs-CZ': 'čeština', | 8 | 'cs-CZ': 'čeština', |
9 | 'eo': 'Esperanto' | 9 | 'eo': 'Esperanto', |
10 | 'de-DE': 'Deutsch', | ||
11 | 'es-ES': 'español', | ||
12 | 'zh-Hant-TW': '中文 (繁體, 台灣)' | ||
10 | // 'pl-PL': 'polski' | 13 | // 'pl-PL': 'polski' |
11 | } | 14 | } |
12 | 15 | ||
@@ -15,7 +18,9 @@ const I18N_LOCALE_ALIAS = { | |||
15 | 'fr': 'fr-FR', | 18 | 'fr': 'fr-FR', |
16 | 'eu': 'eu-ES', | 19 | 'eu': 'eu-ES', |
17 | 'ca': 'ca-ES', | 20 | 'ca': 'ca-ES', |
18 | 'cs': 'cs-CZ' | 21 | 'cs': 'cs-CZ', |
22 | 'de': 'de-DE', | ||
23 | 'es': 'es-ES' | ||
19 | // 'pl': 'pl-PL' | 24 | // 'pl': 'pl-PL' |
20 | } | 25 | } |
21 | 26 | ||
@@ -56,5 +61,5 @@ export function getShortLocale (locale: string) { | |||
56 | export function buildFileLocale (locale: string) { | 61 | export function buildFileLocale (locale: string) { |
57 | const completeLocale = getCompleteLocale(locale) | 62 | const completeLocale = getCompleteLocale(locale) |
58 | 63 | ||
59 | return completeLocale.replace('-', '_') | 64 | return completeLocale.replace(/-/g, '_') |
60 | } | 65 | } |