diff --git a/Makefile b/Makefile index 652273f..28390a3 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,36 @@ SHELL := /bin/bash OS := $(shell uname) -all: clean init download +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 = _translation' >> .tx/config && \ echo 'source_lang = en_US' >> .tx/config && \ echo 'type = PO' >> .tx/config; \ fi; -download: - @echo " ===> Download FR translation file(conf/locale/fr/LC_MESSAGES/django.po)." - @tx pull -l fr - @mv .tx/open-edx-releases.release-ginkgo/fr_translation conf/locale/fr/LC_MESSAGES/django.po + +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 diff --git a/conf/locale/fr/LC_MESSAGES/django.mo b/conf/locale/fr/LC_MESSAGES/django.mo index ff0cf36..5439552 100644 Binary files a/conf/locale/fr/LC_MESSAGES/django.mo and b/conf/locale/fr/LC_MESSAGES/django.mo differ diff --git a/conf/locale/fr/LC_MESSAGES/extra.po b/conf/locale/fr/LC_MESSAGES/extra.po new file mode 100644 index 0000000..4426e01 --- /dev/null +++ b/conf/locale/fr/LC_MESSAGES/extra.po @@ -0,0 +1,3 @@ +#: common/djangoapps/student/forms.py +msgid "Email address {email} is unauthorized." +msgstr ""