You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After upgrading the Lingui version, I suddenly get the following error:
Error: Lingui: Attempted to call a translation function without setting a locale.
Make sure to call `i18n.activate(locale)` before using Lingui functions.
This issue may also occur due to a race condition in your initialization logic.
To Reproduce
In entry.server.tsx and entry.client.tsx, I do call:
Right, I should've looked in the release notes... The error was purposefully introduced in #2131.
This is a huge breaking change for me, I have not noticed any issues with my usage of Lingui.
Maybe they could be a way to disable it using a compiler flag?
Describe the bug
After upgrading the Lingui version, I suddenly get the following error:
To Reproduce
In entry.server.tsx and entry.client.tsx, I do call:
In my routes I have several "top level" variables (not defined in loader/action or the react component) that use macros, like:
They might be the cause of this. I have 100s of those in the app and they worked fine with a previous lingui version.
In case you're clueless about this, I'm happy to tinker together a reproducible example.
Expected behavior
Same behaviour in 5.2 as in 5.1.2.
Additional context
React Router 7 + Vite app with
vite-plugin-babel-macros
&@lingui/vite-plugin
The text was updated successfully, but these errors were encountered: