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

fix: nested macros used in useLingui in arrow functions #133

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

timofei-iatsenko
Copy link
Collaborator

@timofei-iatsenko timofei-iatsenko commented Dec 21, 2024

fixes: lingui/js-lingui#2095 (comment)

It turned out that ArrowFunctionExpression falls into Expression category as well, unlike the regular Function, that caused nested macros such a plural to be processed before the outer macro is processed and get a wrong result.

src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@andrii-bodnar andrii-bodnar force-pushed the fix/use-lingui-nested-in-arrow branch from df68677 to c26dc16 Compare December 23, 2024 08:31
Copy link
Contributor

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timofei-iatsenko thank you!

@andrii-bodnar andrii-bodnar merged commit d88ade0 into main Dec 23, 2024
6 checks passed
@andrii-bodnar andrii-bodnar deleted the fix/use-lingui-nested-in-arrow branch December 23, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V5 plural RangeError: Incorrect locale information provided
2 participants