Created
October 7, 2014 14:02
-
-
Save alikins/a0ee9c0316260714d57e to your computer and use it in GitHub Desktop.
po/pot file attributes for textconf and diff (ie, make git diff on gettext files less useless)
This file contains 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 characters
*.pot diff=msgcat | |
*.po diff=msgcat |
This file contains 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 characters
# from http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control/11291001#11291001 | |
# more verbose than my minimal version | |
[diff "msgcat"] | |
textconv = msgcat --no-location --no-wrap --sort-output | |
# these diff defs use po_diff/pot_diff from https://github.com/alikins/gitconfig | |
# change the 'diff' in .gitattributes to diff=po or diff=pot to use | |
# convert po files to a less noisy | |
# # variant for display in git log -p etc | |
# # note that textconv does not affect | |
# # git-format-patch output | |
[diff "po"] | |
textconv = po_diff | |
cachetextconv = true | |
[diff "pot"] | |
textconv = pot_diff | |
# the line's it was picking for the "funcname" | |
# context were kind of terrible for this case, so | |
# just match a blank line so it's empty | |
xfuncname = ^$ | |
cachetextconv = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment