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

file download --plural-format i18next using old format #89

Open
ValentinH opened this issue Feb 10, 2022 · 4 comments · May be fixed by #147
Open

file download --plural-format i18next using old format #89

ValentinH opened this issue Feb 10, 2022 · 4 comments · May be fixed by #147

Comments

@ValentinH
Copy link

Since [email protected] (released in September 2021), the plural syntax has changed: https://www.i18next.com/misc/json-format#i-18-next-json-v4

When using lokalise2 file download --plural-format i18next, it returns plural forms using the "i18next JSON v3".

The difference is:

  • plural key in v3: message_plural
  • plural key in v4: message_other

This is preventing us to use the latest version of i18next. What can we do ?

@SimeonC
Copy link

SimeonC commented Feb 28, 2022

I wrote a post-download script to just call this library on the downloaded files https://github.com/i18next/i18next-v4-format-converter. That works as a workaround for me.

@ValentinH
Copy link
Author

Thanks for the hint, this is a good trick.

However, we are now directly using the Lokalize Github integration and the new plural option is also not available there 😞

@PetroSilenius
Copy link

There seems to be support for the new v4 syntax but you need to pass the flag --plural-format i18next_v4. This isn't currently documented in the CLI commands but can be found from the Lokalise API docs. Just opened a PR about updating the CLI docs to match that info

@sl-pierrevautherin
Copy link

Many thanks @PetroSilenius for mentionning the --plural-format i18next_v4 flag
Hope your PR will be merged soon 🤞

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