Open tomivirkki opened 7 months ago
It would be nice if the default translation file was used by default.
I don't see how that could be done consistently since we wouldn't want to load it eagerly and it's too late to lazy load it when translate
is called (unless we do nasty things with throwing a promise as an exception and expecting the infrastructure around React's <Suspense>
to catch it).
For this reason, I think a helpful error would be the best course of action.
Describe your motivation
If you use the
translate
API from@vaadin/hilla-react-i18n
without having calledi18n.configure()
before, the given key is passed as such as a result, even if you have the default translation file in place.Describe the solution you'd like
It would be nice if the default translation file was used by default. If this isn't an option, a console error with additional instructions would be helpful for the user.
Describe alternatives you've considered
No response
Additional context
No response