| Package | gulp-wp-pot |
| Description | Generate pot files for WordPress plugins and themes. |
| Node Version | >= 0.10 |
The package gulp-sort is recommended to prevent unnecessary changes in pot-file
$ npm install --save-dev gulp-sort gulp-wp-pot
Example usage with Gulp
var gulp = require('gulp');
var wpPot = require('gulp-wp-pot');
var sort = require('gulp-sort');
gulp.task('default', function () {
return gulp.src('src/*.php')
.pipe(sort())
.pipe(wpPot( {
domain: 'domain',
destFile:'file.pot',
package: 'package_name',
bugReport: 'http://example.com',
lastTranslator: 'John Doe <[email protected]>',
team: 'Team Team <[email protected]>'
} ))
.pipe(gulp.dest('dist'));
});-
domainType:
stringDomain to retrieve the translated text. All textdomains is included if missing.
-
destFileType:
string
Default: domain.pot or translations.pot if domain is missingFilename for template file
-
packageType:
string
Default: domain or unnamed project if domain is missingPackage name
-
bugReportType:
URLURL translatation support
-
lastTranslatorType:
stringName and email address of the last translator (ex:
John Doe <[email protected]>) -
teamType:
stringName and email address of the translation team (ex:
Team <[email protected]>) -
headersType:
object|bool
Default: Headers used by PoeditObject containing extra POT-file headers. Set to false to not generate the default extra headers for Poedit.
MIT © Rasmus Bengtsson | Initial work by Willy Bahuaud