Skip to content

POEditor cli is the Standard Tooling for workflow of POEditor.

Notifications You must be signed in to change notification settings

ov3rk1ll/poeditor-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POEditor cli is the Standard Tooling for workflow of POEditor.

language npm package NPM downloads

✨ Features

  • Upload pre-translated file(s) to POEditor
  • Download translated files(s) to local directory

📦 Install

If you haven't installed Node.js, please install it first, here.

$ npm install poeditor-ci -g

🔨 Configuration

Create a poeditor-config.json in the root directory, and config information as follows:

{
  "apiToken": "",                     // POEditor api token
  "projectId": 0,                     // project id
  "fileType": "",                     // fileType to upload or download, supports files format (po, pot, mo, xls, csv, resw, resx, android_strings, apple_strings, xliff, properties, key_value_json, json, xmb, xtb)
  "targetDir": "",                    // directory where translated files live
  "syncTerms": true,                  // (optional) set it to true if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added)
  "sourceLang": "en-US",              // (optional, required when syncTerms set to true) language to sync the terms from
  "pullParams": {},                   // (optional) allows to pass any parameters available on the POEditor's export endpoint, full list here: https://poeditor.com/docs/api#projects_export
  "pushParams": {}                    // (optional) allows to pass any parameters available on the POEditor's upload endpoint, full list here: https://poeditor.com/docs/api#projects_upload
}

You can also provide the API token as a environment variable by setting PO_APITOKEN

🤜🏼 Usage

Pull all translated files from upstream of POEditor.

$ poeditor pull

Push all pre-translated files from downloadstream of targetDir in poeditor-config.json.

$ poeditor push

About

POEditor cli is the Standard Tooling for workflow of POEditor.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%