vendredi 23 janvier 2015

Detecting changes to django translations (PO) files in TravisCI

I am using Django (1.7) translations for a project, and would like to ensure, on TravisCI, that translations are not left behind when changes are made to translatable strings.


This is a simplified snippet of my .travis.yml:



script:
- ...
- python manage.py makemessages -l ja --no-wrap --no-location
- git diff --exit-code


That recreates the PO files, and fails when the file changes. So far so good.


Unfortunately, django updates the POT-Creation-Date every time the script is run, and I can't see any flags to makemessages that would disable that, so even if there are no changes, the file changes on every run.


Am I on the right lines, or is there a better way to detect that there has been a change?


Aucun commentaire:

Enregistrer un commentaire