polyglot-cli

Infinum Polyglot CLI

Usage no npm install needed!

<script type="module">
  import polyglotCli from 'https://cdn.skypack.dev/polyglot-cli';
</script>

README

Polyglot JS CLI

JavaScript Team Polyglot CLI

Requirements

  • Node v6+

Instalation

npm install -g polyglot-cli

Usage

To login

polyglot login

or you can set the POLYGLOT_AUTH_TOKEN.

To initialize the project

polyglot init

To pull the translations

polyglot pull

Changelog

2.0.1

  • Fixed import command issue where translations and translation keys local values were not initialized
  • Import translations for each project language
  • Fixed push command issue where translation keys were saved twice

2.0.0

  • Add the push command
  • Add support for multiple projects
  • Add progress bar to the push and pull commands
  • Show help if no option is specified

Breaking changes:

  • Config file expects list of projects with id, name and path.

Old:

//.polyglot.json
{
  "id": "projectId",
  "name": "Project name",
  "path": "path/to/",
  "lastUpdatedAt": 0,
 ...
}

New:

//.polyglot.json
{
  "projects": [
    {
      "id": "projectId",
      "name": "Project name",
      "path": "path/to/",
      "lastUpdatedAt": 0
    },
  ...
  ],
 ...
}

1.7.0

  • Add skipConfigUpdates flag to config - if set to true, it won't update the lastUpdatedAt property in config

1.6.0

  • Add support for specifying the project configuration path

1.5.0

  • Add support for auth via env variable

1.4.4

  • Fix nested import issue

1.4.3

  • Implemented object denesting algorithm

1.4.2

  • Fix nested translation import issue

1.4.1

  • Fix locale format initialization

1.4.0

  • Support for language only format
  • Create the folder structure automatically

1.3.1

  • Fix Node 6 issue

1.3.0

  • Translation import

1.2.1

  • Logout bugfix
  • Added some debug info

1.2.0

  • polyglot status
  • lastUpdatedAt property in the project file
  • Updated API endpoint for production

1.1.0

  • Support for nested pulling
  • Sorted pulled translations
  • Pretty-print JSON

License

Copyright 2017 Infinum

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.