]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/build/client.sh
Update translations from zanata and add cs and eo
[github/Chocobozzz/PeerTube.git] / scripts / build / client.sh
CommitLineData
10e63b68 1#!/bin/bash
b20b5fed 2
0e4ffb4b
LA
3set -eu
4
5cd client
b20b5fed 6
94edfc3b 7rm -rf ./dist ./compiled
d61e8153 8
96bb360d 9defaultLanguage="en_US"
989e526a
C
10npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json
11mv "./dist/$defaultLanguage/assets" "./dist"
12
96bb360d 13# Supported languages
a55e5579 14languages=("fr_FR" "eu_ES" "ca_ES" "cs_CZ" "eo")
989e526a 15
10e63b68 16for lang in "${languages[@]}"; do
96bb360d 17 npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \
989e526a
C
18 --output-path "dist/$lang/" --deploy-url "/client/$lang/"
19
20 # Do no duplicate assets
21 rm -r "./dist/$lang/assets"
22done
23
6cca7360 24NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/embed-stats.json"
989e526a 25
96bb360d
C
26# Copy runtime locales
27cp -r "./src/locale/target" "./dist/locale"