From 511a4b362641f6b5fb3cf83c4be9340d638d48df Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 26 Jan 2024 19:32:22 +0100 Subject: [PATCH] Add automatic translations compilation --- make.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index 8aa925d..7f22af3 100755 --- a/make.sh +++ b/make.sh @@ -34,10 +34,12 @@ translations () { } start () { + pybabel compile -d partitioncloud/translations/ flask run --port=$PORT } production () { + pybabel compile -d partitioncloud/translations/ FLASK_APP=partitioncloud /usr/bin/gunicorn \ wsgi:app \ --bind 0.0.0.0:$PORT @@ -56,9 +58,9 @@ usage () { echo -e "\t$0 start" echo -e "\t$0 production" echo -e "\t$0 translations" - } + RESULT=$(type "$1") if [[ $1 && $RESULT = *"is a"*"function"* || $RESULT == *"est une fonction"* ]]; then # Import config