Skip to content

Commit bc53e72

Browse files
Merge pull request #16 from TimVevida/master
Add support for --add-location parameter. Thanks to @TimVevida
2 parents 76a4b38 + c4b3379 commit bc53e72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tasks/pot.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = function(grunt) {
2323
language: false,
2424
encoding: false,
2525
text_domain: 'messages',
26+
add_location: false,
2627
package_version: pkg.version,
2728
package_name: pkg.name,
2829
msgid_bugs_address: false,
@@ -57,6 +58,9 @@ module.exports = function(grunt) {
5758

5859
//Set input files encoding, if required
5960
var encoding = ( options.encoding ? " --from-code="+options.encoding : "" );
61+
62+
// Set location format (default: full)
63+
var add_location = ( options.add_location ? " --add-location="+options.add_location : "" );
6064

6165
//Generate header
6266
if( options.package_version ){
@@ -92,7 +96,7 @@ module.exports = function(grunt) {
9296

9397
//Compile and run command
9498
var exec = require('child_process').exec;
95-
var command = 'xgettext' + join + ' --default-domain=' + options.text_domain + ' -o '+potFile + language + encoding + keywords + headerOptions + inputFiles;
99+
var command = 'xgettext' + join + ' --default-domain=' + options.text_domain + ' -o '+potFile + language + encoding + keywords + add_location + headerOptions + inputFiles;
96100
var done = grunt.task.current.async();
97101

98102
grunt.verbose.writeln('Executing: ' + command);

0 commit comments

Comments
 (0)