Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useLingui hook implementation #84

Closed
timofei-iatsenko opened this issue Mar 19, 2024 · 3 comments · Fixed by #90
Closed

useLingui hook implementation #84

timofei-iatsenko opened this issue Mar 19, 2024 · 3 comments · Fixed by #90
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@timofei-iatsenko
Copy link
Collaborator

lingui/js-lingui#1859

@andrii-bodnar andrii-bodnar added help wanted Extra attention is needed enhancement New feature or request labels Mar 26, 2024
@AndrewIngram
Copy link

Any way we can help get this over the line? (sadly I don't have any real Rust expertise)

@andrii-bodnar andrii-bodnar linked a pull request Aug 2, 2024 that will close this issue
@timofei-iatsenko
Copy link
Collaborator Author

I also didn't have any Rust expertise but learned specifically for that project. So it's not an excuse 🤪

Honestly i don't have enough motivation / time to continue working on that. Implementing this in Rust is much more complicated, since SWC and Rust ownership model doesn't give the same tools as babel do. So everything related to scopes, traversing, finding references, replacing references you should do on your own inside the Visitor's loop. You could not, for example, find a useLingui statement, get all bindings referencing this statement and transform them in a loop.

I think, it might be a good task for ChatGPT, we have input, we have output, and we simply need to write a transform.

@andrii-bodnar
Copy link
Contributor

Available in 5.0.0-next.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants