Skip to content

JSON downloaded files are not nested with WRITE_NESTED download option in config file #83

@amine1803

Description

@amine1803

Describe the bug
When downloading JSON files for translation (any path, any format), the keys are not nested with WRITE_NESTED download option in config file. The nesting works when using the script directly in the terminal.

This works in the terminal:

simplelocalize download \
 --apiKey MY_API_KEY \
 --downloadPath ./translations.json \
 --downloadFormat multi-language-json \
 --downloadOptions WRITE_NESTED,INCLUDE_DESCRIPTIONS

This does not work using the simplelocalize.yml config

simplelocalize download
###################################
# 'simplelocalize download' command
###################################

# Download path is a path to a file(s) with translations. Use {lang} placeholder to specify language or locale and {ns} placeholder to specify namespace.
# For example, if you have translations in 2 languages and 2 namespaces, you can use the following path: ./src/translations/{lang}/{ns}.json
downloadPath: ./public/locales/{lang}/{ns}.json

# Download format is a format of the file(s) with translations.
# Supported formats: https://simplelocalize.io/docs/general/file-formats/
downloadFormat: single-language-json

# Download options are options that are passed to the download command.
# Supported options: https://simplelocalize.io/docs/general/options/
downloadOptions:
  - WRITE_NESTED # write nested JSON

FYI, the quotes around WRITE_NESTED does not change the outcome.

Thank you.

CLI Version

Operating system (please complete the following information):

  • OS: Mac OS
  • OS Version: 13.4.1 (c)
  • CPU Architecture: Silicon M1

Screenshots
If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions