2022-12-11 19:05:05 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd "$(dirname "$0")"
|
2023-02-04 06:24:21 +00:00
|
|
|
|
|
|
|
# Create the venv if it doesn't exist
|
2022-12-11 19:05:05 +00:00
|
|
|
if ! test -e venv; then
|
2023-02-04 06:24:21 +00:00
|
|
|
echo "Creating python venv for PiSCSI-Web"
|
|
|
|
python3 -m venv venv
|
|
|
|
echo "Activating venv"
|
|
|
|
source venv/bin/activate
|
|
|
|
echo "Installing requirements.txt"
|
|
|
|
pip3 install wheel
|
|
|
|
pip3 install -r requirements.txt
|
2022-12-11 19:05:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
source venv/bin/activate
|
|
|
|
|
2022-12-11 22:17:14 +00:00
|
|
|
pybabel extract -F babel.cfg -o messages.pot src
|
2022-12-11 19:05:05 +00:00
|
|
|
pybabel update -i messages.pot -d src/translations
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Translation stats:"
|
|
|
|
find . -name \*.po -print -execdir msgfmt --statistics messages.po \;
|