TerenYeung / poeditor-cli

POEditor cli is the Standard Tooling for workflow of POEditor.
3 stars 7 forks source link

Does not work with key_value_json fileType #1

Closed Saschamz closed 3 years ago

Saschamz commented 5 years ago

My poeditor-config.json looks like this:

{
  "apiToken": "{API_TOKEN_HERE}",
  "projectId": {PROJECT_ID_HERE},
  "fileType": "key_value_json",
  "targetDir": "./src/i18n/languages/"
}

When I run pull it writes [object Object] to a {LANGUAGE_NAME}.key_value_json file.

Expected behaviour: Writes it like my actual file format in json with indentation and .json extension. I just wanna note that the `json format you can apply in config file is some sort of poeditor json and not what you would expect.

I have fixed this localy by changing the source code to treat key_value_json as normal jsonand added JSON.stringify(content, undefined, 3) to provide proper formatting.

I'm currently trying to fix uploading, it says success but it never actually uploads anything.

I'll do a PR with my changes if I get uploading to work.