Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The download command fails with an error when using the android format #80

Closed
selindho opened this issue Nov 23, 2022 · 4 comments
Closed

Comments

@selindho
Copy link

🐛 Bug Report

The download command fails with an error when using the android format.

To Reproduce

Run the following:

locize download --project-id {omitted} --api-key {omitted} --format android

This results in the following error:

Invalid content for "android" format!
Cannot read properties of undefined (reading 'type')

The primary namespace I'm using contains some 900 translation keys, so haven't figured out which key that causes this yet. Tried testing some different cases in an otherwise empty namespace, but they have all worked so far.

Expected behavior

When omitting the --format android flag, the download succeeds, resulting in the following directory structure:

.
|-- en
|   `-- strings.json
|-- et
|   `-- strings.json
|-- fi
|   `-- strings.json
|-- lt
|   `-- strings.json
|-- lv
|   `-- strings.json
|-- ru
|   `-- strings.json
`-- sv
    `-- strings.json

I expect the download to work in the same way when using the --format android option, but resulting in Android string resources files instead of JSON.

Your Environment

  • runtime version: node v18.12.1
  • module version: 7.12.9
  • os: Mac
@adrai
Copy link
Collaborator

adrai commented Nov 23, 2022

Can you please send an email to support@locize.com with the project-id so we can check?
I suspect the translation content is not compatible to the android format.

@selindho
Copy link
Author

Can you please send an email to support@locize.com with the project-id so we can check?
I suspect the translation content is not compatible to the android format.

Will do.

@selindho
Copy link
Author

Another noteworthy thing which I forgot to mention: all translations were created using the sync command with the --format android option.

@adrai adrai closed this as completed in cab0a8c Nov 23, 2022
@adrai
Copy link
Collaborator

adrai commented Nov 23, 2022

v7.12.10 should fallback without crashing, when there are missing string-array elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants