mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
27 lines
613 B
Bash
Executable file
27 lines
613 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
git fetch weblate && git merge weblate/develop
|
|
|
|
npm run build:embed
|
|
|
|
cd client
|
|
npm run ng -- extract-i18n --out-file src/locale/angular.xlf
|
|
|
|
locales=$(find src/locale -type f | grep -e 'angular\.[^.]\+\.xlf' | sed 's#^src/locale/angular.##' | sed 's/\.xlf$//' | sort -u | tr '\n' ' ')
|
|
|
|
# Merge new translations in other language files
|
|
node ./node_modules/.bin/xliffmerge -p ./.xliffmerge.json $locales
|
|
|
|
(
|
|
cd src/locale
|
|
|
|
for file in angular.*.xlf; do
|
|
xmllint --format $file > "$file.tmp" && mv "$file.tmp" "$file"
|
|
done
|
|
)
|
|
|
|
# Add our strings too
|
|
cd ../
|
|
npm run i18n:create-custom-files
|