weblate/scripts/update-locales
Michal Čihař 6edc9557e2 Use standard location for locales
Having it inside package makes them install properly on the system.

Fixes #945

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 18:24:24 +01:00

21 lines
694 B
Bash
Executable file
Vendored

#!/bin/sh
# Renerates .po files used for translating Weblate
# Exit on failure
set -e
# 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]"