Socket
Book a DemoInstallSign in
Socket

gulp-po

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-po

Gulp extension for synchronizing translates from POEditor.

1.0.8
latest
npmnpm
Version published
Maintainers
2
Created
Source

Gulp-PO

Gulp extension for synchronizing translates from POEditor.

Installation

npm install gulp-po

Usage

Allowed actions:

  • push: Pushes all terms and translates to the POEditor server
  • pull: Pulls all translates from the POEditor server and replace changed ones in files
  • sync: Pushes all terms to the POEditor server

You can provide translate files in following formats: JSON, YAML, NEON

var poConnector = require('gulp-po');

createTranslatesPlumber: function() {
    return plumber(function(error) {
        gutil.log(gutil.colors.red(error));
        gutil.beep();
        this.emit('end');
    });
}

gulp.task('translates-push', function() {
	return gulp.src('./translates/**/*.json')
		.pipe(pipes.createTranslatesPlumber())
		.pipe(poConnector('push', options))
		.pipe(gulp.dest('./translates/'))
});

Options

Required parameters:

  • apiToken: Token generated on POEditor website
  • project: Name of the project

Optional parameters:

  • langs: Object of language mapping. You can map key to val, where key is original POEditor code, e.g. zh-TW to zh

Example:

var options = {
	apiToken: '19xf1dfbfy36b96f0ba9f7zd94a83d9e',
	project: 'ExampleProject',
	langs: {
	    'zh-TW': 'zh'
	}
};

Keywords

gulpplugin

FAQs

Package last updated on 08 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.