js-lingui
js-lingui copied to clipboard
i18n._ function removes unrecognized macros
Describe the bug
i18n._ removes macros that are unrecognized. This prevents programs that also parse macros in strings from handling them after Lingui loads them.
To Reproduce Using the following code:
i18n._("code {hello}")
The string returned is code .
Expected behavior
It should return code {hello} because no values object was passed to i18n._.
Alternatives ideas
- Perhaps there is a callback that can be triggered when it encounters a macro it doesn't recognize?
- Or an option that can be enabled for this behavior?
- Or another function that does not process macros but can get the locale string.