opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
22 stars 0 forks source link

Nesting messages - Show useful error message #159

Open radiorambo opened 2 weeks ago

radiorambo commented 2 weeks ago

Here in docs it says it isn't supported, but here in an example, it is using nested messages.

But when I tried to use that example messages, then I got this error An error occured in loadMessages() caused by TypeError: u.slice is not a function, which took me some time to figure out that nesting messages isn't supported and error disappeared as soon as I removed the nesting messages from the example I copied.

So proper error message like nesting messages isn't supported and we don't plan to support in future too, due to some limitations. For more details, refer this url would be great

LorisSigrist commented 1 week ago

Thanks for reporting this. I updated the example to reflect what's currently recommended.

We will add a better error-message