You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

754 B

Translations

Create .pot file

pybabel extract -F babel.cfg -o messages.pot .

Create language .po files

pybabel init -i messages.pot -d translations -l en pybabel init -i messages.pot -d translations -l sl

Compile changes

pybabel compile -d translations

Update commands

Install gettext (sudo apt install gettext)

pybabel extract -F babel.cfg -o messages.pot .
msgmerge translations/sl/LC_MESSAGES/messages.po messages.pot -o translations/sl/LC_MESSAGES/messages.po
msgmerge translations/en/LC_MESSAGES/messages.po messages.pot -o translations/en/LC_MESSAGES/messages.po

# check and delete fuzzy in .po files
pybabel compile -d translations

Deployment

docker build -t my-flask-app . docker run -p 8080:8080 my-flask-app