2024-02-19 14:33:19 +00:00
|
|
|
# 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)
|
|
|
|
|
|
|
|
```shell
|
|
|
|
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
|
2024-02-20 09:59:58 +00:00
|
|
|
docker build -t stark-web .
|
|
|
|
docker run -p 8080:8080 stark-web
|