How to use gulp-wp-pot - 4 common examples

To help you get started, we’ve selected a few gulp-wp-pot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wp-papi / papi / gulpfile.babel.js View on Github external
gulp.task('pot', () => {
  gulp.src(config.php.src)
    .pipe(sort())
    .pipe(wpPot( {
        domain: 'papi',
        destFile:'papi.pot',
        package: 'papi'
    } ))
    .pipe(gulp.dest('languages'));
});
github allenmoore / wp-svg-helpers / gulp-tasks / translate.js View on Github external
gulp.task('translate', () => {
  const opts = {
    dest: './languages',
    src: './**/*.php'
  };

  log(chalk.blue('--- Generating the translation file ---'));

  return gulp.src(opts.src)
    .pipe(
      wpPot({
        domain: 'wp-svg-helpers',
        package:'WP SVG Helpers',
        bugReport: 'https://github.com/allenmoore/wp-svg-helpers/issues',
        lastTranslator: 'Allen Moore ',
        team: 'Allen Moore '
      })
    )
    .pipe(gulp.dest(`${opts.dest}/wp-svg-helpers.pot`))
    .pipe(notify({message: '\n\n✅  ===> TRANSLATE — completed!\n', onLast: true}));
});
github kickstarts / kickstarts / init / templates / general / wordpress / src / gulpfile.babel.js View on Github external
gulp.task('i18n:makepot', () => {

  let options = {
    destFile: `${pkg.name}.pot`,
    package: pkg.name,
    bugReport: pkg.author.url,
    lastTranslator: `${pkg.author.name}<${pkg.author.email}>`,
    team: `${pkg.author.name}<${pkg.author.email}>`
  };

  gulp.src('../**/*.php')
    .pipe(sort())
    .pipe(makepot(options))
    .pipe(gulp.dest(paths.locales));

});
github sheabunge / code-snippets / gulpfile.babel.js View on Github external
gulp.task('makepot', () =>
	gulp.src(src_files.php)
		.pipe(makepot({
			domain: pkg.name,
			package: 'Code Snippets',
			bugReport: 'https://github.com/sheabunge/code-snippets/issues',
			metadataFile: 'code-snippets.php',
		}))
		.pipe(gulp.dest(`languages/${pkg.name}.pot`)));

gulp-wp-pot

Generate pot-files for WordPress localization via gulp

MIT
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis

Popular gulp-wp-pot functions