gilbsgilbs / babel-plugin-i18next-extract

Babel plugin that statically extracts i18next and react-i18next translation keys.
https://i18next-extract.netlify.com
MIT License
159 stars 37 forks source link

Extracting from props vs string literals #166

Closed gigamesh closed 4 years ago

gigamesh commented 4 years ago

I haven't been able to extract from strings stored in props.

  return <div>{t(this.props.testString)}</div>

However, string literals or variables within the component are working. ie:

  const testString = "test";
  return <div>{t(testString)}</div>

Is there a way to extract strings from props?