aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/i18n/generate.sh
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /scripts/i18n/generate.sh
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst
PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip
Migrate to $localize
* Remove i18n polyfill to translate things in components * Reduce bundle sizes * Improve runtime perf * Reduce a lot the time to make a full client build * Reduce client build complexity * We don't need a service to translate things anymore (so we will be able to translate title pages etc) Unfortunately we may loose some translations in the migration process. I'll put a message on weblate to notify translators
Diffstat (limited to 'scripts/i18n/generate.sh')
-rwxr-xr-xscripts/i18n/generate.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/i18n/generate.sh b/scripts/i18n/generate.sh
index f9c2f0613..0d1cd35c0 100755
--- a/scripts/i18n/generate.sh
+++ b/scripts/i18n/generate.sh
@@ -2,9 +2,13 @@
2 2
3set -eu 3set -eu
4 4
5npm run build -- --i18n
6
5cd client 7cd client
6npm run ng -- xi18n --i18n-locale "en-US" --output-path src/locale --out-file angular.xlf 8./node_modules/.bin/localize-extract -r . -f xliff --locale "en-US" -s 'dist/en-US/*.js' -o src/locale/angular.xlf
7npm run ngx-extractor -- --locale "en-US" -i 'src/**/*.ts' -f xlf -o src/locale/angular.xlf 9
10# Workaround of https://github.com/angular/angular/issues/38437
11sed -i 's/other {{INTERPOLATION}/other {<x id="INTERPOLATION"\/>/g' src/locale/angular.xlf
8 12
9# Merge new translations in other language files 13# Merge new translations in other language files
10npm run ng run -- PeerTube:xliffmerge 14npm run ng run -- PeerTube:xliffmerge