Closed hatton closed 3 years ago
Hi @hatton, thank you. I can confirm this is a bug. extract
works fine, but compile
is a problem. Interested is sending a PR?
Try using ''
double apostrophes i.e.
"There is already a ${folderKind} with the name or code ''${value}''."
The ICU MessageFormat actually uses '
as escape characters hence why the text in-between is treated as literal text.
Instead, a pair of apostrophes ''
will be converted to a single one '
A pair of ASCII apostrophes always represents one ASCII apostrophe, similar to %% in printf representing one %, although this rule still applies inside quoted text. ("This '{isn''t}' obvious" → "This {isn't} obvious")
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Interpolated variables surrounded by single quotation marks are treated as literal text.
To Reproduce
If I compile
then messages.js has:
Note that "value" has lost its surrounding single quotes and has not been identified as an interpolated value.
One workaround is to use double quotes instead:
which compiles to:
.babelrc
) or framework you use (Create React App, Meteor, etc.)