Page MenuHomec4science

Makefile
No OneTemporary

File Metadata

Created
Mon, May 6, 02:34

Makefile

SHELL := /bin/bash
OS := $(shell uname)
all: clean init mo
@echo " ===> Done"
init:
@echo " ===> Initialize."
@if test -d venv; then \
echo "init has been done early. You can remove directory venv to recreate environment."; \
else \
mkdir -p venv && \
virtualenv venv --system-site-packages && \
source venv/bin/activate && \
pip install -r requirements.txt && \
rm -Rf .tx && \
tx init --user=api --token='1/d4eb01906f12e288e33733b098b3a1b45220e572' --host=www.transifex.com && \
echo '[open-edx-releases.release-ginkgo]' >> .tx/config && \
echo 'source_file = <lang>_translation' >> .tx/config && \
echo 'source_lang = en_US' >> .tx/config && \
echo 'type = PO' >> .tx/config; \
fi;
mo:
@echo " ===> Download FR translation file(conf/locale/fr/LC_MESSAGES/django.po)/merge/compile"
@source venv/bin/activate && \
tx pull -l fr && \
mv .tx/open-edx-releases.release-ginkgo/fr_translation conf/locale/fr/LC_MESSAGES/django.po && \
msgcat conf/locale/fr/LC_MESSAGES/extra.po conf/locale/fr/LC_MESSAGES/django.po -o conf/locale/fr/LC_MESSAGES/merge.po --use-first && \
msgfmt conf/locale/fr/LC_MESSAGES/merge.po --output-file conf/locale/fr/LC_MESSAGES/django.mo && \
rm conf/locale/fr/LC_MESSAGES/merge.po
clean:
@echo " ===> Clean working directories."
@rm -Rf .tx venv

Event Timeline