Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make extract_translations to use i18n_tool #613

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

NODE_BIN=$(CURDIR)/node_modules/.bin

THEME_NAME := edx_credentials_themes

# Generates a help message. Borrowed from https://github.com/pydanny/cookiecutter-djangopackage.
help: ## display this help message
@echo "Please use \`make <target>\` where <target> is one of"
Expand All @@ -18,16 +20,16 @@ build.watch:
$(NODE_BIN)/webpack --config webpack.config.js --progress --watch

compile_translations:
cd edx_credentials_themes && django-admin.py compilemessages
cd $(THEME_NAME) && i18n_tool generate

detect_changed_source_translations:
cd edx_credentials_themes && i18n_tool changed
cd $(THEME_NAME) && i18n_tool changed

dummy_translations:
cd edx_credentials_themes && i18n_tool dummy
cd $(THEME_NAME) && i18n_tool dummy

extract_translations:
cd edx_credentials_themes && django-admin.py makemessages -l en -d django
extract_translations: ## extract strings to be translated, outputting .po files
cd $(THEME_NAME) && i18n_tool extract --no-segment

generate_translations: extract_translations dummy_translations compile_translations

Expand All @@ -47,7 +49,7 @@ requirements: base_requirements

test:
# Confirm compiled assets have not changed, indicating SASS matches CSS.
git diff --exit-code edx_credentials_themes/
git diff --exit-code $(THEME_NAME)/ ":(exclude)$(THEME_NAME)/conf"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
Expand Down
1 change: 1 addition & 0 deletions edx_credentials_themes/locale
Loading