1.0.3 • Published 5 years ago

poeditor-build v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

POEditor-Build

Push and pull translations from POEditor project.

Installation

npm

npm install poeditor-build --save-dev

Usage

Set up the builder.

var poeditorBuild 	= require('poeditor-build');
var poeditorClient 	= require('poeditor-node-client');

var client 	= new poeditorClient('api_token');
var build 	= new poeditorBuild(client, 'project_id', 'src_path', 'dest_path', 'dest_file_format(js|json)');

Push

Upload terms and trasnlations to POEditor.

build.push();

This will join all JSON files from the destination folder and send them to POEditor. The default configurations are:

  • Language: English
  • Update: Terms and translations
  • Overwrite: Yes
  • Sync: Yes

Push

Download all terms and trasnlations from POEditor and save them to the destination folder.

build.pull();

For example:

/path/to/destination/folder
	en.js
	en.min.js
	fr.js
	fr.min.js

The JavaScript files will be built according to the i18n-js specification. For example:

I18n.translations.en = { ... };
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago