Skip to content

Commit

Permalink
use global pybabel in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jokester committed Dec 15, 2024
1 parent 8f7c09e commit 7516caf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ WORKDIR /app

EXPOSE 5000

RUN make babel-update-mo
RUN BIN_PREFIX=/usr/local/bin make babel-update-mo
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PYTEST_COV_ARGS =

BIN_PREFIX ?= venv/bin

FORCE: ;

create-venv:
Expand Down Expand Up @@ -44,11 +46,11 @@ test_logging:
venv/bin/pytest --capture=sys --log-cli-level=DEBUG tests/base/test_logging.py

babel-update-po:
venv/bin/pybabel extract -F babel.cfg -k lazy_gettext -k hardcode_text -o messages.pot app
venv/bin/pybabel update -i messages.pot -d app/translations
$(BIN_PREFIX)/pybabel extract -F babel.cfg -k lazy_gettext -k hardcode_text -o messages.pot app
$(BIN_PREFIX)/pybabel update -i messages.pot -d app/translations

babel-update-mo: babel-update-po
venv/bin/pybabel compile -d app/translations
$(BIN_PREFIX)/pybabel compile -d app/translations

babel-translate-po:
venv/bin/python app/scripts/fill_zh_translations.py
Expand Down

0 comments on commit 7516caf

Please sign in to comment.