stephenharris / grunt-pot

Scan files and creates a .pot file using xgettext
MIT License
53 stars 13 forks source link

Allow --add-location parameter #16

Closed TimVevida closed 8 years ago

TimVevida commented 8 years ago

Allow usage of the --add-location parameter. By default, the location consists of a hash, colon, file name and line number. In more recent versions of xgettext, this can be altered to 'none' or 'file'. The default value is 'full', but this is implied when the parameter is missing.

I want to remove the line numbers from the .pot-file, because they change frequently and this causes differences in the .pot-file that are not really changes, but do show op in the versioning system each time.

TimVevida commented 8 years ago

@stephenharris Please accept this PR or comment on it.

TimVevida commented 8 years ago

Hello Stephen, thanks for responding.

To answer your first question: By default, the --add-location argument will not be added to the xgettext call. This ensures compatibility with existing configurations.

I know that the --add-location argument was added at some point, but cannot find a changelog of xgettext. So I could not tell you what would happen for older versions of xgettext. I presume they will give an error.

stephenharris commented 8 years ago

Ah, of course, not sure how I missed that. Thanks for the PR!