]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client.sh
d95bb95745974507eedad2e0761c4f7f99b99365
6 mkdir "./src/pending_locale" > /dev
/null
|| true
7 mv .
/src
/locale
/angular.
*.xlf
"./src/pending_locale"
9 if [ ! -z ${1+x} ]; then
10 mv "./src/pending_locale/angular.$1.xlf" "./src/locale"
15 mv .
/src
/pending_locale
/* "./src/locale"
16 rmdir "./src/pending_locale/"
19 # Previous build failed
20 if [ ! -f "client/src/locale/angular.fr-FR.xlf" ]; then
21 git checkout
-- client
/src
/locale
/
22 rm -r client
/src
/pending_locale
27 rm -rf .
/dist .
/compiled
31 defaultLanguage
="en-US"
32 npm run ng build
-- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json
33 mv "./dist/$defaultLanguage/assets" "./dist"
34 mv "./dist/$defaultLanguage/manifest.webmanifest" "./dist/manifest.webmanifest"
38 # Don't build other languages if --light arg is provided
39 if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
40 if [ ! -z ${1+x} ] && [ "$1" == "--light-fr" ]; then
45 "fi-FI" "nl-NL" "gd" "el-GR" "es-ES" "oc" "pt-BR" "pt-PT" "sv-SE" "pl-PL" "ru-RU" "zh-Hans-CN" "zh-Hant-TW"
46 "fr-FR" "ja-JP" "eu-ES" "ca-ES" "cs-CZ" "eo" "de-DE" "it-IT"
50 for lang
in "${languages[@]}"; do
51 # TODO: remove when the project will use runtime translations
52 pre_build_hook
"$lang"
54 npm run ng build
-- --prod --i18n-file "./src/locale/angular.$lang.xlf" --i18n-format xlf
--i18n-locale "$lang" \
55 --output-path "dist/$lang/" --deploy-url "/client/$lang/"
57 # Do not duplicate assets
58 rm -r "./dist/$lang/assets"
60 # TODO: remove when the project will use runtime translations
65 cd ..
/ && npm run build
:embed
&& cd client
/
67 # Copy runtime locales
68 cp -r "./src/locale" "./dist/locale"