lokalise / lokalise-cli-2-go

Lokalise CLI v2
Other
108 stars 52 forks source link

API error on file donwload --export-empty-as string #96

Closed ASafaeirad closed 1 year ago

ASafaeirad commented 2 years ago

The --export-empty-as string throws an error.

file download \
    --export-empty-as NOT_TRANSLATED \
    --format json \
    --replace-breaks=false \
    --json-unescaped-slashes \
    --plural-format i18next \
    --placeholder-format i18n \
    --unzip-to /opt/dest

Error message

Error: API request error 400 Unknown 'export_empty_as' value
API request error 400 Unknown 'export_empty_as' value

Environemnt

lokalise/lokalise-cli-2:v2.6.8 docker image

PetroSilenius commented 1 year ago

You're currently trying to pass an invalid value to the --export-empty-as flag as the error message suggests. The allowed values are empty, base and skip.

Here's the help text that you can access with lokalise2 file download --help

Select how you would like empty translations to be exported. Allowed values are empty to keep empty, base to replace with the base language value, or skip to omit.

According to the Lokalise API docs it should also support null for yaml exports but didn't look more into that as I expect it's not what you're looking for

ASafaeirad commented 1 year ago

Thanks :+1: