RASCSI/python/web/translation_update.sh
Daniel Markstedt 66a905f1d6
Script for updating translations (#1030)
Script for updating translation strings and print stats
2022-12-11 11:05:05 -08:00

19 lines
439 B
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
# Check for the existence of a python venv in the current dir
if ! test -e venv; then
echo "No python venv detected. Please run start.sh first."
exit 1
fi
source venv/bin/activate
pybabel extract -F babel.cfg -o messages.pot .
pybabel update -i messages.pot -d src/translations
echo
echo "Translation stats:"
find . -name \*.po -print -execdir msgfmt --statistics messages.po \;