We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In a case where we might have a msg within a msg, Lingui skips the inner msg leading to a ReferenceError: msg is not defined at runtime.
msg
ReferenceError: msg is not defined
Ex:
<SomeComponent title={_(msg`Foo ${someFlag ? _(msg`bar`) : _(msg`baz`)}`)} />
Maybe there's a better way to do this?
The text was updated successfully, but these errors were encountered:
As far as i remember i fixed something like that for babel version of macros, but this still an issue in SWC.
lingui/swc-plugin#16 #1436
These two issues about JSX ternary but it seems it's also applicable for JS ternary.
The workaround would be just avoiding putting ternary into the msg:
const innerMessage = ${someFlag ? _(msg`bar`) : _(msg`baz`)} <SomeComponent title={_(msg`Foo ${innerMessage}`)} />
Sorry, something went wrong.
Should be fixed for babel macro with #1867
No branches or pull requests
In a case where we might have a
msg
within amsg
, Lingui skips the innermsg
leading to aReferenceError: msg is not defined
at runtime.Ex:
Maybe there's a better way to do this?
The text was updated successfully, but these errors were encountered: