We are using Django and git. We have i18n enabled and run periodically compilemessages
and makemessages
. Everybody works in a separate branch and periodically we merge them in master
. The problem is when two people need to add translations in their branches. Since compilemessages
effectively changes the .po
file, git cannot merge them and the second person have to manually resolve conflicts in the translations. We can't ignore .po
files because translations are important to be in version control system. For now there are two possible ways to deal with the problem:
To accumulate translations first and running
compilemessages
andmakemessages
only at certain times.To make translations only before merge and be sure to merge the PR with master before running
compilemessages
.
So there are two questions involved:
- How to manage Django translations in git?
- And the more general - how to manage machine generated files which should stay in version control?