node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

gulp-wp-pot

gulp-wp-pot

Information

npm version Build Status Dependency Status Scrutinizer Code Quality Code Coverage

Package gulp-wp-pot
Description Gulp wrapper for wp-pot. Generates pot files for WordPress plugins and themes.

Install

$ npm install --save-dev gulp-wp-pot

Example usage with Gulp

var gulp = require('gulp');
var wpPot = require('gulp-wp-pot');
 
gulp.task('default', function () {
    return gulp.src('src/*.php')
        .pipe(wpPot( {
            domain: 'domain',
            package: 'Example project'
        } ))
        .pipe(gulp.dest('file.pot'));
});

wpPot({options})

All options is optional

  • bugReport
    Description: Header with URL for reporting translation bugs
    Type: string
    Default: undefined
  • commentKeyword
    Description: Keyword to trigger translator comment.
    Type: string
    Default: translators:
  • domain
    Description: Domain to retrieve the translated text. All textdomains is included if undefined.
    Type: string
    Default: undefined
  • headers
    Description: Object containing extra POT-file headers. Set to false to not generate the default extra headers for Poedit.
    Type: object|bool
    Default: Headers used by Poedit
  • gettextFunctions
    Description: Gettext functions used for finding translations.
    Type: object
    Default: WordPress translation functions
  • lastTranslator
    Description: Name and email address of the last translator (ex: John Doe <me@example.com>)
    Type: string
    Default: undefined
  • metadataFile
    Description: Path to file containing plugin/theme metadata header relative to relativeTo
    Type: string
  • package
    Description: Package name
    Type: string
    Default: domain or unnamed project if domain is undefined
  • relativeTo
    Description: Path to folder that file comments should be relative to
    Type: string
    Default: Current working directory
  • team
    Description: Name and email address of the translation team (ex: Team <team@example.com>)
    Type: string
    Default: undefined

Related

License

MIT © Rasmus Bengtsson | Initial work by Willy Bahuaud