Taken from: http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control
Changes in the codebase can alter line numberings given in .po
'comments'.
While such changes should be committed they make obsecure the actual
translation changes made, and make auditing them difficult.
-
Create
/usr/local/bin/strippocomments
as given in this gist. -
Set up pre-processing of .po files by editing
.git/info/attributes
and adding:*.po diff=podiff
-
Edit
.git/config
and add the line[diff "podiff"] textconv = /usr/local/bin/strippocomments