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
According to https://github.com/i18next/i18next-parser?tab=readme-ov-file#caveats, you need to write a comment and declare all your translation keys so that i18next-parser can pick them up correctly. When you use a comment inside a React evaluation, this doesn't seem to be working.
To Reproduce
constComponent=()=>{constmyVariable="a";// "a" or "b" or "c"return(<div>{/* t("Test.a") t("Test.b") t("Test.c") */}<span>{t(`Test.${myVariable}`)}</span></div>);};
Expected behavior
The keys Test.a, Test.b and Test.c should get extracted. However, they don't. The following example does work:
constComponent=()=>{constmyVariable="a";// "a" or "b" or "c"/* t("Test.a") t("Test.b") t("Test.c") */return(<div><span>{t(`Test.${myVariable}`)}</span></div>);};
Your Environment
runtime version: node v20.10.0
i18next version: 23.10.0
i18next-parser version: 8.13.0
os: Mac
any other relevant information
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
According to https://github.com/i18next/i18next-parser?tab=readme-ov-file#caveats, you need to write a comment and declare all your translation keys so that i18next-parser can pick them up correctly. When you use a comment inside a React evaluation, this doesn't seem to be working.
To Reproduce
Expected behavior
The keys
Test.a
,Test.b
andTest.c
should get extracted. However, they don't. The following example does work:Your Environment
v20.10.0
The text was updated successfully, but these errors were encountered: