i18next / i18next-parser

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

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

Closed codedaybyday closed 9 months ago

codedaybyday commented 1 year 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 9 months ago

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