Replies: 1 comment
-
Thank you for question! I think this should be possible if implemented as procedural macro. I don't have much time to work on this at the moment, but I'd be happy to review a PR for it. We already have a macro crate, so what would work would be to add a new macro similar to the existing one, but that uses the ArcLoader to load localisations into the macro itself, and then provides a panic message when it's not found using a separate lookup macro. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For compile-time support is it possible to get a compile error when compiling if the lookup fails? I tried cargo-i18n with i18n-embed and in that setup a mispelling will trigger a compile error. My issue with that setup was I could not figure out how to make it work in wasm. This project works just fine in wasm but the forced breakage at compile time would be great.
assert_eq!("Hello World!", LOCALES.lookup(&US_ENGLISH, "hello-world-ooops"));
Beta Was this translation helpful? Give feedback.
All reactions