| 1 |
module.exports = function (grunt, wpmudev) { |
| 2 |
'use strict'; |
| 3 |
|
| 4 |
grunt.registerTask('wpmudev_makepot', function () { |
| 5 |
var exclusions = wpmudev.files.not_meta(), |
| 6 |
files = [], |
| 7 |
filename = grunt.template.process('<%= pkg.textdomain %>') || grunt.template.process('<%= pkg.name %>') |
| 8 |
; |
| 9 |
grunt.file.expand({filter: 'isFile' }, wpmudev.files.get('all').concat(exclusions)).forEach(function (path) { |
| 10 |
files.push(path); |
| 11 |
}); |
| 12 |
|
| 13 |
grunt.config.set('makepot', { |
| 14 |
wpmudev: { |
| 15 |
options: { |
| 16 |
domainPath: 'languages/', |
| 17 |
type: 'wp-plugin', |
| 18 |
include: files, |
| 19 |
potFilename: filename + '.pot' |
| 20 |
}, |
| 21 |
dest: filename |
| 22 |
} |
| 23 |
}); |
| 24 |
|
| 25 |
grunt.task.run('makepot:wpmudev'); |
| 26 |
}); |
| 27 |
}; |
| 28 |
|