mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-07 11:49:14 +08:00
38 lines
948 B
Bash
Executable file
38 lines
948 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Renerates .po files used for translating Weblate
|
|
|
|
# Exit on failure
|
|
set -e
|
|
|
|
# Lock Weblate
|
|
wlc lock weblate/master
|
|
wlc lock weblate/javascript
|
|
|
|
# Push changes from Weblate to GitHub
|
|
wlc commit
|
|
|
|
# Pull changes from GitHub
|
|
git pull
|
|
|
|
# Update po files itself
|
|
./manage.py makemessages --keep-pot -a -i 'data/*' -i 'docs/*' -i 'examples/*' -i 'build/*' --settings=weblate.settings_test
|
|
./manage.py makemessages --keep-pot -a -i 'data/*' -i 'docs/*' -i 'examples/*' -i 'build/*' -d djangojs --settings=weblate.settings_test
|
|
|
|
# Fix Report-Msgid-Bugs-To as it gets removed
|
|
sed -i 's/"Report-Msgid-Bugs-To:.*/"Report-Msgid-Bugs-To: weblate@lists.cihar.com\\n"/' weblate/locale/*/*/*.po
|
|
|
|
# Commit changes
|
|
git add weblate/locale/*/*/*.po
|
|
git add weblate/locale/django.pot weblate/locale/djangojs.pot
|
|
|
|
git commit -s -m "Update po files
|
|
|
|
[CI skip]"
|
|
|
|
# Push changes
|
|
git push
|
|
|
|
# Unlock Weblate
|
|
wlc unlock weblate/master
|
|
wlc unlock weblate/javascript
|