app-platform icon indicating copy to clipboard operation
app-platform copied to clipboard

fix(deps): update i18next-scanner version to support old plurals format again [LIBS-641]

Open KaiVandivier opened this issue 7 months ago • 0 comments

See LIBS-641 and its related issue for more context (tl;dr: i18next-scanner has a dependency on i18next with * as the version, and i18next v21 broke it. Version 3.0.1+ of i18next-scanner adapts to the changes and makes it backwards-compatible, fixing the break it introduced for us)

We’re currently on v2, and the latest version is v4

  • looking at the documentation, the breaking change in v3 of i18next-scanner is just increasing the minimum node version to 10
  • as far as I can tell, there isn't really a breaking change in v4, since an error was introduced and then rolled back – either way, it works in testing
  • i18next-scanner now also seems to support the new plural format too (called "compatibilityJSON v4"), when we’re ready to migrate to that

Here are some test plurals to make sure they're extracted correctly: (I added them to the simple example app, then ran yarn start to extract the strings, generate the translation JSON files, and start the app -- the plurals also worked when viewing the app in the browser) Screenshot 2024-07-06 at 8 23 05 PM

KaiVandivier avatar Jul 06 '24 18:07 KaiVandivier