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
This would be a really great feature because it would prevent a lot of bugs about unsynchronized translations. The idea is to check the existence of literal identifiers and arguments passed to tr! and move_tr! macros in the Fluent files, so we can ensure at compilation time that a translation is missing.
The implementation required to convert macro_rules! macros to procedural ones and allow them to check if the passed arguments are literal strings or expressions. If they are literal strings, check them in the Fluent files.
The problems are two:
Expensive
Could be computationally extensive, so the solution would be to wrap this in a opt-in feature.
Lack of context
We don't now the location of the files at tr! and move_tr! macro invocations. I'm not sure how to solve this, perhaps the most manageable approach would be to declare in the leptos_fluent! macro what files must be checked with a (or an array of) Bash wildcard(s).
This would be a really great feature because it would prevent a lot of bugs about unsynchronized translations. The idea is to check the existence of literal identifiers and arguments passed to
tr!
andmove_tr!
macros in the Fluent files, so we can ensure at compilation time that a translation is missing.The implementation required to convert
macro_rules!
macros to procedural ones and allow them to check if the passed arguments are literal strings or expressions. If they are literal strings, check them in the Fluent files.The problems are two:
Expensive
Could be computationally extensive, so the solution would be to wrap this in a opt-in feature.
Lack of context
We don't now the location of the files at
tr!
andmove_tr!
macro invocations. I'm not sure how to solve this, perhaps the most manageable approach would be to declare in theleptos_fluent!
macro what files must be checked with a (or an array of) Bash wildcard(s).Another possible solution would be to wait for XAMPPRocky/fluent-templates#53, but doesn't seem too much relevant.
The text was updated successfully, but these errors were encountered: