mirror of https://github.com/Chocobozzz/PeerTube
Add german, spanish and chinese (traditional, taiwan) languages
parent
a3d1026bf3
commit
fb9e6cb075
|
@ -31,7 +31,7 @@ post_build_hook
|
||||||
# Don't build other languages if --light arg is provided
|
# Don't build other languages if --light arg is provided
|
||||||
if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
|
if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
|
||||||
# Supported languages
|
# Supported languages
|
||||||
languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo")
|
languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo" "zh_Hant_TW" "de_DE" "es_ES")
|
||||||
|
|
||||||
for lang in "${languages[@]}"; do
|
for lang in "${languages[@]}"; do
|
||||||
# TODO: remove when the project will use runtime translations
|
# TODO: remove when the project will use runtime translations
|
||||||
|
|
|
@ -6,7 +6,10 @@ export const I18N_LOCALES = {
|
||||||
'eu-ES': 'euskara',
|
'eu-ES': 'euskara',
|
||||||
'ca-ES': 'català',
|
'ca-ES': 'català',
|
||||||
'cs-CZ': 'čeština',
|
'cs-CZ': 'čeština',
|
||||||
'eo': 'Esperanto'
|
'eo': 'Esperanto',
|
||||||
|
'de-DE': 'Deutsch',
|
||||||
|
'es-ES': 'español',
|
||||||
|
'zh-Hant-TW': '中文 (繁體, 台灣)'
|
||||||
// 'pl-PL': 'polski'
|
// 'pl-PL': 'polski'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +18,9 @@ const I18N_LOCALE_ALIAS = {
|
||||||
'fr': 'fr-FR',
|
'fr': 'fr-FR',
|
||||||
'eu': 'eu-ES',
|
'eu': 'eu-ES',
|
||||||
'ca': 'ca-ES',
|
'ca': 'ca-ES',
|
||||||
'cs': 'cs-CZ'
|
'cs': 'cs-CZ',
|
||||||
|
'de': 'de-DE',
|
||||||
|
'es': 'es-ES'
|
||||||
// 'pl': 'pl-PL'
|
// 'pl': 'pl-PL'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,5 +61,5 @@ export function getShortLocale (locale: string) {
|
||||||
export function buildFileLocale (locale: string) {
|
export function buildFileLocale (locale: string) {
|
||||||
const completeLocale = getCompleteLocale(locale)
|
const completeLocale = getCompleteLocale(locale)
|
||||||
|
|
||||||
return completeLocale.replace('-', '_')
|
return completeLocale.replace(/-/g, '_')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue