Socket
Socket
Sign inDemoInstall

gulp-po

Package Overview
Dependencies
106
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-po

Gulp extension for synchronizing translates from POEditor.


Version published
Maintainers
2
Install size
6.03 MB
Created

Readme

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

FAQs

Last updated on 08 Oct 2015

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc