phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

How to use update_description? #26

Closed sffc closed 3 years ago

sffc commented 4 years ago

Thanks for building this nice tool!

On the Working with continuous integration (CI) page in the Help Center, there is a reference to an update_description option:

Make sure to set update_translation or update_description if you intend to not only add new values but also update existing values.

However, I can't figure out how or where to use this option in the Phrase CLI. If I add a new key, then the description associated with that key is uploaded into the Phrase Web UI, but if I add or change the description of an existing key, that change is not reflected when I run phrase push.

I tried adding update_description: true in multiple places in .phrase.yml with no luck, and phrase push --update_description does not work either. Any tips?

I am using the Chrome JSON i18n format.

theSoenke commented 3 years ago

Hi @sffc, sorry for the delayed response. Using the update_description: true should indeed update existing descriptions. Could you reach out to our support at https://phrase.com/contact/ or via the embedded chat on phrase.com? Then we can take a closer look at your specific configuration. Thanks!

sffc commented 3 years ago

Can you tell me where exactly in .phrase.yml to add update_description: true?

theSoenke commented 3 years ago

Here is an example on how to update descriptions:

  push:
    sources:
    - file: ./translations.json
      params:
        file_format: json
        update_descriptions: true

The option is called update_descriptions instead of update_description. I also missed this in my initial reply. Hope this helps. Let me know if you should still run into any issues

theSoenke commented 3 years ago

I hope this already resolved your question and I'll go ahead and close this for now.