-
Notifications
You must be signed in to change notification settings - Fork 368
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
Select Macro Documentation Example is wrong #1324
Comments
Looked at the code one more time, and looks like this work by mistake. The original author's intention was to have exact choices with underscore only. Here is the regex:
|
Related #1288 |
You're right. ICU MessageFormat uses |
Example from documentation:
Actually, it should be:
Proof: https://github.com/lingui/js-lingui/blob/main/packages/macro/test/jsx-select.ts#L3-L19
If you write code as in example, macro will produce:
Which by the way will work, but unnecessary code would be produced.
So here we should either fix the macro to not produce this fields and add this to the test case.
Or update docs and fix usage with
_{option}
which would be a breaking change.Anyway, action point needed here.
The text was updated successfully, but these errors were encountered: