gulp-wp-pot
Information
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
Install
$ npm install --save-dev gulp-sort gulp-wp-pot
Gulp
Example usage withvar 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 <mail@example.com>',
team: 'Team Team <mail@example.com>'
} ))
.pipe(gulp.dest('dist'));
});
wpPot({options})
-
domain
Type:
string
Domain to retrieve the translated text. All textdomains is included if missing.
-
destFile
Type:
string
Default: domain.pot or translations.pot if domain is missingFilename for template file
-
package
Type:
string
Default: domain or unnamed project if domain is missingPackage name
-
bugReport
Type:
URL
URL translatation support
-
lastTranslator
Type:
string
Name and email address of the last translator (ex:
John Doe <me@example.com>
) -
team
Type:
string
Name and email address of the translation team (ex:
Team <team@example.com>
) -
headers
Type:
object|bool
Default: Headers used by PoeditObject containing extra POT-file headers. Set to false to not generate the default extra headers for Poedit.
License
MIT © Rasmus Bengtsson | Initial work by Willy Bahuaud