Last active
April 10, 2023 06:53
-
-
Save stephenharris/3c3792568494b2a7cf48 to your computer and use it in GitHub Desktop.
Revisions
-
stephenharris revised this gist
Sep 5, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ grep -vE '^#:|POT-Creation-Date' $1 -
stephenharris created this gist
Aug 10, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # How to suppress comments when performing `git diff` on `.po` files. *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. 1. Create `/usr/local/bin/strippocomments` as given in this gist. 2. Set up pre-processing of .po files by editing `.git/info/attributes` and adding: *.po diff=podiff 3. Edit `.git/config` and add the line [diff "podiff"] textconv = /usr/local/bin/strippocomments This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ grep -v '^#:' $1