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
Describe the bug
Escaped placeholders still get processed as placeholder in development mode.
To Reproduce
repro: https://github.com/ninesunsabiu/lingui-brace-bug/blob/main/src/App.tsx
const literalBrace = i18n._(msg`Hey '{name}'!`)
Rendered as Hey !. {name} treated as placeholder and replaced to empty string
Hey !
{name}
Expected behavior It should print Hey {name}!, placeholder is not processed and kept as-is.
Hey {name}!
Root Cause This happend because message get double compiled in Dev mode.
First compilation (compiled in catalog):
Hey '{name}' -> Hey {name}
Hey '{name}
Hey {name}
Second compilation happened for already compiled message from catalog in runtime in i18n:
Hey {name} -> Hey <replaced to value>
Hey <replaced to value>
The text was updated successfully, but these errors were encountered:
Any progress updates?
Sorry, something went wrong.
fix: escaped curly-braces doesn't preserve in development mode (lingu…
86b8602
…i#1901)
a9da3a3
Successfully merging a pull request may close this issue.
Describe the bug
Escaped placeholders still get processed as placeholder in development mode.
To Reproduce
repro: https://github.com/ninesunsabiu/lingui-brace-bug/blob/main/src/App.tsx
Rendered as
Hey !
.{name}
treated as placeholder and replaced to empty stringExpected behavior
It should print
Hey {name}!
, placeholder is not processed and kept as-is.Root Cause
This happend because message get double compiled in Dev mode.
First compilation (compiled in catalog):
Second compilation happened for already compiled message from catalog in runtime in i18n:
The text was updated successfully, but these errors were encountered: