useflyyer / next-rosetta

Next.js + Rosetta + TypeScript with native i18n support | Lightweight, simple, easy to integrate, no custom server required and efficient because will only download the locale you need.
https://next-rosetta.vercel.app
MIT License
64 stars 4 forks source link

API is incompatible between Minor versions #5

Closed jupardo closed 3 years ago

jupardo commented 3 years ago

I've found that 1.2.3 t method is incompatible with previous signatures, as version 1.1 supports using an array as key but 1.2 doesn't support that. Is there any plan to implement support for using array as key in future versions? Or shall we stop using t([]) signature?

lopezjurip commented 3 years ago

Hi @jupardo, sorry we forgot about the [] signature. I just updated the typings to not display it as an error but the returned type will be unknown.

yarn add next-rosetta@1.2.2

We are still trying to make dot and array path notation work with type inference.

If you have type issues when rendering with react cast them as any

jupardo commented 3 years ago

Thank you!