i18next / i18next-parser

Parse your code to extract translation keys/values and manage your catalog files
MIT License
472 stars 192 forks source link

key is a variable, can not be parsed? #940

Closed codedaybyday closed 6 months ago

codedaybyday commented 9 months ago

🐛 Bug Report

A clear and concise description of what the bug is.

To Reproduce

A minimal reproducible example. A codesandbox example or similar or at least steps to reproduce the behavior:

const key = 'key';
const val = 'val';
t('key', val);

Expected behavior

key will be parsed

{
  "key": "val"
}

Your Environment

karellm commented 6 months ago

It's not a bug. The parser doesn't interpret the code so it cannot do what you ask.