Install gettext during deploy if missing

This commit is contained in:
rucki
2026-08-24 11:28:39 +02:00
parent 3e1c33e3a3
commit 5b71b72224
+13
View File
@@ -39,8 +39,21 @@ if [[ "${SKIP_PIP:-0}" != "1" ]]; then
fi
if [[ -d "locale" ]]; then
if ! command -v msgfmt >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1 && [[ "$(id -u)" == "0" ]]; then
echo "==> msgfmt/gettext fehlt, installiere gettext"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gettext
else
echo "==> msgfmt/gettext fehlt und kann nicht automatisch installiert werden"
fi
fi
if command -v msgfmt >/dev/null 2>&1; then
echo "==> Übersetzungen kompilieren"
"$PY" manage.py compilemessages
else
echo "==> Übersetzungen überspringen: msgfmt/gettext ist nicht installiert"
fi
fi
echo "==> Django Checks"