Closed jhubbardsf closed 2 years ago
Keys with dots should work. In fact is the style I use and it has been working for me. Can you share a bit more about your setup?
Huh, that's odd, because until I made the change in precompile-intl-runtime and used it locally, my stuff was saying it couldn't find the keys. Let me try to recreate it in a fresh repository.
So darnedest thing. I've been working on our international refactor for a while and now I can't reproduce it. I'll close this and the PR. If I end up being able to reproduce it I'll reopen!
I'm migrating my project over from svelte-i18n to here and noticed that any key with a dot is not found. So if I had
the values are not found by this library, although they're valid JSON and work with svelte-i18n. This library would want it in this format.
But $_('title.1') only finds the second example in this library, not the first. Wouldn't be a huge issue to refactor by code to work with this. But in some cases it does get a little complex. Since this is largely a drop in improvement for svelte-i18n, I just wanted to bring this up. I haven't had time to look through the code to figure out exactly why this would be happening here yet.
Edit: I've fixed the issue which was in precompile-intl-runtime here. If that's merged in and the version for precompile-int-runtime here is bumped then the keys should be parsed the exact same as svelte-i18n and be a better drop in replacement.