File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ module.exports = function(grunt) {
23
23
language : false ,
24
24
encoding : false ,
25
25
text_domain : 'messages' ,
26
+ add_location : false ,
26
27
package_version : pkg . version ,
27
28
package_name : pkg . name ,
28
29
msgid_bugs_address : false ,
@@ -57,6 +58,9 @@ module.exports = function(grunt) {
57
58
58
59
//Set input files encoding, if required
59
60
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 : "" ) ;
60
64
61
65
//Generate header
62
66
if ( options . package_version ) {
@@ -92,7 +96,7 @@ module.exports = function(grunt) {
92
96
93
97
//Compile and run command
94
98
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 ;
96
100
var done = grunt . task . current . async ( ) ;
97
101
98
102
grunt . verbose . writeln ( 'Executing: ' + command ) ;
You can’t perform that action at this time.
0 commit comments