1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-07-30 19:53:27 +02:00

Added virtual environment and packages required for translations.

This commit is contained in:
Maciej Lenartowicz
2019-11-14 11:28:25 +01:00
parent 7075592f24
commit 73f4ab48c3
26 changed files with 799 additions and 193 deletions

View File

@@ -1,5 +1,9 @@
.PHONY: all install-js watch-js build-js collect-files pack publish-beta publish-latest lint test test-js-update-snapshots create-messages update-messages docs docs-watch clean
DEV_PYTHON=python3.7
VENV_NAME?=venv
VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin
all:
@echo "make install-js"
@echo " Install dependencies"
@@ -22,6 +26,12 @@ all:
@echo "make clean"
@echo " Remove python artifacts and virtualenv."
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate:
test -d $(VENV_NAME) || $(DEV_PYTHON) -m virtualenv -p $(DEV_PYTHON) $(VENV_NAME)
$(VENV_BIN)/$(DEV_PYTHON) -m pip install -r requirements.txt
touch $(VENV_NAME)/bin/activate
install-js: package.json
npm install --save-dev
@@ -47,10 +57,10 @@ test:
test-js-update-snapshots:
npm test -- -u
create-messages:
pybabel extract -F babel.cfg -o ./translations/forisjs.pot .
update-messages:
pybabel update -i translations/forisjs.pot -d translations
create-messages: venv
$(VENV_BIN)/pybabel extract -F babel.cfg -o ./translations/forisjs.pot .
update-messages: venv
$(VENV_BIN)/pybabel update -i ./translations/forisjs.pot -d ./translations -D forisjs
docs:
npm run-script docs