diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-06 18:17:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-06 18:17:24 +0200 |
commit | 96bb360d9f4ad410ad753cb0c4d8d0a7bfd033f4 (patch) | |
tree | e3568d2660e5aac1de34fa71de965b721551359c | |
parent | 9f16472264b74345cb8c13dde98a5950253854ad (diff) | |
download | PeerTube-96bb360d9f4ad410ad753cb0c4d8d0a7bfd033f4.tar.gz PeerTube-96bb360d9f4ad410ad753cb0c4d8d0a7bfd033f4.tar.zst PeerTube-96bb360d9f4ad410ad753cb0c4d8d0a7bfd033f4.zip |
Update build with i18n
-rwxr-xr-x | scripts/build/client.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 61ba4ea99..d3da7cfcf 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh | |||
@@ -6,14 +6,15 @@ cd client | |||
6 | 6 | ||
7 | rm -rf ./dist ./compiled | 7 | rm -rf ./dist ./compiled |
8 | 8 | ||
9 | defaultLanguage="en-US" | 9 | defaultLanguage="en_US" |
10 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json | 10 | npm run ng build -- --output-path "dist/$defaultLanguage/" --deploy-url "/client/$defaultLanguage/" --prod --stats-json |
11 | mv "./dist/$defaultLanguage/assets" "./dist" | 11 | mv "./dist/$defaultLanguage/assets" "./dist" |
12 | 12 | ||
13 | languages="fr" | 13 | # Supported languages |
14 | languages="fr_FR" | ||
14 | 15 | ||
15 | for lang in "$languages"; do | 16 | for lang in "$languages"; do |
16 | npm run ng build -- --prod --i18n-file "./src/locale/target/messages_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ | 17 | npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ |
17 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" | 18 | --output-path "dist/$lang/" --deploy-url "/client/$lang/" |
18 | 19 | ||
19 | # Do no duplicate assets | 20 | # Do no duplicate assets |
@@ -22,3 +23,5 @@ done | |||
22 | 23 | ||
23 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production | 24 | NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production |
24 | 25 | ||
26 | # Copy runtime locales | ||
27 | cp -r "./src/locale/target" "./dist/locale" \ No newline at end of file | ||