nyavro / i18nPlugin

Intellij idea i18next support plugin
MIT License
70 stars 11 forks source link

Unresolved namespace with ternary operator issue #203

Open Demianeen opened 1 year ago

Demianeen commented 1 year ago

I use this awesome plugin with React. I encountered the bug when using the ternary operator inside the t function: {t(short ? 'Short language' : 'Language')}

This code gives 7 Unresolved key errors and 1 Unresolved namespace. If I create the variable and put it, the result will be the same:

const key = short ? 'Short language' : 'Language'
{t(key)}

What to do? I use Webstorm 2022.3.4 on mac 13.2.1. with i18n support plugin 2.8.4