Skip to content

Commit

Permalink
Add support for internationalization.
Browse files Browse the repository at this point in the history
- Integrate Transifex resource for InaSAFE django
- Update translation source file
- Add make commands to do transifex related commands
  • Loading branch information
lucernae committed Jul 26, 2017
1 parent 16ad367 commit 1d15203
Show file tree
Hide file tree
Showing 6 changed files with 713 additions and 179 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -110,7 +110,6 @@ deployment/docker-compose.override.yml
django_project/realtime/tasks/realtime/celeryconfig.py
django_project/core/settings/custom_settings.py
django_project/core/settings/mapquest.py
django_project/locale
django_project/realtime/local_settings.py
django_project/celerybeat.pid
django_project/temp
Expand Down
9 changes: 9 additions & 0 deletions .tx/config
@@ -0,0 +1,9 @@
[main]
host = https://www.transifex.com

[inasafe-code.inasafe-django]
file_filter = django_project/locale/<lang>/LC_MESSAGES/django.po
source_file = django_project/locale/en/LC_MESSAGES/django.po
source_lang = en
type = PO

20 changes: 20 additions & 0 deletions deployment/Makefile
Expand Up @@ -81,6 +81,26 @@ compilemessages:
@echo "------------------------------------------------------------------"
@docker-compose -p $(PROJECT_ID) exec uwsgi python manage.py compilemessages -l $(LANG)

transifex-pull:
@echo
@echo "------------------------------------------------------------------"
@echo "Download translation from Transifex "
@echo "------------------------------------------------------------------"
@cd ../; tx pull

transifex-push-language:
@echo
@echo "------------------------------------------------------------------"
@echo "Push translation to Transifex for language $(LANG)"
@echo "------------------------------------------------------------------"
@cd ../; tx push -t -l id

transifex-push-source:
@echo
@echo "------------------------------------------------------------------"
@echo "Push translation source to Transifex"
@echo "------------------------------------------------------------------"
@cd ../; tx push -s

collectstatic:
@echo
Expand Down

0 comments on commit 1d15203

Please sign in to comment.