Skip to content

Commit

Permalink
Merge pull request #374 from edx/iivic/SOL-2053b
Browse files Browse the repository at this point in the history
Updated i18n-tool version, .travis.yml and Makefile files
  • Loading branch information
Ivan Ivic authored Oct 17, 2016
2 parents 3c9dcc8 + 7b9a295 commit 823f2de
Show file tree
Hide file tree
Showing 11 changed files with 2,512 additions and 185 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ before_script:

script:
# Ensure documentation can be compiled
- cd docs && make html
- cd ..
- cd docs && make html && cd ..

# Check if translation files are up-to-date
- make validate_translations

# Compile static assets and validate the code
- make static -e DJANGO_SETTINGS_MODULE="course_discovery.settings.test"
Expand Down
53 changes: 30 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@ NODE_BIN=./node_modules/.bin

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " help display this help message"
@echo " make accept run acceptance tests"
@echo " clean delete generated byte code and coverage reports"
@echo " compile_translations compile translation files, outputting .po files for each supported language"
@echo " dummy_translations generate dummy translation (.po) files"
@echo " extract_translations extract strings to be translated, outputting .mo files"
@echo " fake_translations generate and compile dummy translation files"
@echo " html_coverage generate and view HTML coverage report"
@echo " migrate apply database migrations"
@echo " pull_translations pull translations from Transifex"
@echo " push_translations push source translation files (.po) from Transifex"
@echo " quality run PEP8 and Pylint"
@echo " production-requirements install requirements for production"
@echo " requirements install requirements for local development"
@echo " requirements.js install JS requirements for local development and production"
@echo " test run tests and generate coverage report"
@echo " validate run tests and quality checks"
@echo " static gather all static assets for production"
@echo " clean_static remove all generated static files"
@echo " start-devstack run a local development copy of the server"
@echo " open-devstack open a shell on the server started by start-devstack"
@echo " help display this help message"
@echo " make accept run acceptance tests"
@echo " clean delete generated byte code and coverage reports"
@echo " compile_translations compile translation files, outputting .po files for each supported language"
@echo " dummy_translations generate dummy translation (.po) files"
@echo " extract_translations extract strings to be translated, outputting .mo files"
@echo " fake_translations generate and compile dummy translation files"
@echo " html_coverage generate and view HTML coverage report"
@echo " migrate apply database migrations"
@echo " pull_translations pull translations from Transifex"
@echo " push_translations push source translation files (.po) from Transifex"
@echo " quality run PEP8 and Pylint"
@echo " production-requirements install requirements for production"
@echo " requirements install requirements for local development"
@echo " requirements.js install JS requirements for local development and production"
@echo " test run tests and generate coverage report"
@echo " validate run tests and quality checks"
@echo " static gather all static assets for production"
@echo " clean_static remove all generated static files"
@echo " start-devstack run a local development copy of the server"
@echo " open-devstack open a shell on the server started by start-devstack"
@echo " detect_changed_source_translations check if translation files are up-to-date"
@echo " validate_translations install fake translations and check if translation files are up-to-date"
@echo ""

static:
Expand Down Expand Up @@ -71,8 +73,8 @@ html_coverage:
coverage html && open htmlcov/index.html

extract_translations:
python manage.py makemessages -l en -v1 -d django
python manage.py makemessages -l en -v1 -d djangojs
python manage.py makemessages -l en -v1 -d django --ignore="docs/*" --ignore="course_discovery/assets/*" --ignore="node_modules/*" --ignore="course_discovery/static/bower_components/*" --ignore="course_discovery/static/build/*"
python manage.py makemessages -l en -v1 -d djangojs --ignore="docs/*" --ignore="course_discovery/assets/*" --ignore="node_modules/*" --ignore="course_discovery/static/bower_components/*" --ignore="course_discovery/static/build/*"

dummy_translations:
cd course_discovery && i18n_tool dummy
Expand Down Expand Up @@ -101,3 +103,8 @@ accept:
make dev.test:
coverage run ./manage.py test course_discovery --settings=course_discovery.settings.devstack_test --keepdb
coverage report

detect_changed_source_translations:
cd course_discovery && i18n_tool changed

validate_translations: fake_translations detect_changed_source_translations
Binary file modified course_discovery/conf/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 823f2de

Please sign in to comment.