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.
lkrsnik
33c6731be0
|
2 months ago | |
---|---|---|
static | 2 months ago | |
templates | 2 months ago | |
translations | 2 months ago | |
.gitignore | 6 months ago | |
Dockerfile | 3 months ago | |
LICENSE | 6 months ago | |
README.md | 3 months ago | |
app.py | 2 months ago | |
babel.cfg | 3 months ago | |
docker-compose.yml | 3 months ago | |
gui.py | 8 months ago | |
messages.pot | 2 months ago | |
requirements.txt | 3 months ago | |
setup.py | 3 months ago |
README.md
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 stark-web . docker run -p 8080:8080 stark-web