You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, yeah, it is a real example... just migrating our legacy translation system to Lingui
old message format was UPPER_CASE and the second parameter was values e.g.
constFORM_MAX_CHARACTERS="[FIELD] must be [NUM] characters";t("FORM_MAX_CHARACTERS",{FIELD: t("FIRST_NAME"),NUM: 16}
in the whole application, we are using Macro t and Trans and hash-generated IDs
I know I can use i18n._ but then I need to provide id which we don't want...
May I ask what you expect to get in extracted messages in this case?
basically {0} must be {1} characters
but if it is a limitation of babel-macro and there is nothing to do, then we can close it
Yeah, you probably can solve this differently in your code. This is not a limitation of babel-macro itself, rather how lingui macro is written, and i don't really want to touch it since it may break something else.
Describe the bug
t
insidet
causing ReferenceError: t is not definedbtw
Trans
inTrans
is workingTo Reproduce
try code
why t in t? for YUP validation schema error messages...
e.g.
Expected behavior
t in t should work
Additional context
Add any other context about the problem here.
I can reproduce it also with fresh CRA
lingui --version
4.6.0npm list @babel/core
@babel/core@7.22.8@lingui/swc-plugin
babel-macro-plugin
.babelrc
) or framework you use (Create React App, NextJs, Vite)The text was updated successfully, but these errors were encountered: