|
From: | Tommy |
Subject: | [bug-gettext] [PATCH] xgettext: new option --no-linenumbers omits line numbers |
Date: | Fri, 16 Aug 2013 13:57:39 +1200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
Hello.We recently had the problem that line numbers in comments in our .pot file were causing a lot of noise in our git repository. Every time a source file changed, the next .pot file update would be full of changes to line numbers, obscuring the actual changes to translatable strings.
At the same time, the file name in the comments is very helpful for our translators, so if possible we would prefer not to disable location comments entirely.
Disabling the line number portion but leaving the file name seems like a very good solution. In our case, the file name almost always provides the necessary context to the translator, and when it doesn't it is easy enough to grep or text search in the indicated file to find the exact usage.
There appear to be a number of other people with the same problem, and the popular but unsatisfactory solution seems to be to filter "#:" comments out of the git-diff output. See http://stackoverflow.com/questions/2006351/gettext-po-files-under-version-control
The gettext code already handles the case where a line number is unavailable, so patching in an option to disable line numbers was trivial.
I used "--no-linenumbers" as the option name, because that was the first thing I tried.
What do you think? -- Tommy
0001-xgettext-new-option-no-linenumbers-omits-line-number.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |