poeditor-build
v1.0.3
Published
Push and pull translations from POEditor project.
Downloads
5
Readme
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 = { ... };