lokalise / lokalise-cli-2-go

Lokalise CLI v2
Other
108 stars 52 forks source link

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

Open ValentinH opened 2 years ago

ValentinH commented 2 years ago

Since i18next@21.0.0 (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:

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

SimeonC commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

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