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
It's currently unclear how component interpolation could be implemented in Paraglide. Interpolating components would almost certainly require a framework-specific runtime/renderer. However, if we just have message functions, how can such a renderer insert a component?
This could force us to switch to the AST approach, where instead of a message function, the message is compiled to an AST that a small runtime utility then renders.
const my_message = ["Please accept the ", ["component": "Terms and conditions"], "before continuing"]
m(my_message)
This would require major API changes so I would really appreciate alternative suggestions
Context
It's currently unclear how component interpolation could be implemented in Paraglide. Interpolating components would almost certainly require a framework-specific runtime/renderer. However, if we just have message functions, how can such a renderer insert a component?
This could force us to switch to the AST approach, where instead of a message function, the message is compiled to an AST that a small runtime utility then renders.
This would require major API changes so I would really appreciate alternative suggestions
Alternative Idea:
Another clever suggestion comes from this discussion:
https://github.com/orgs/opral/discussions/913#discussioncomment-9126828
It suggests having the messages return an array that can be used as a JSX value directly.
Unfortunately this also has drawbacks :
Proposal
??? - Not sure yet, might be a paraglide 2.0 feature
The text was updated successfully, but these errors were encountered: