Open tylerrasor opened 2 years ago
@tylerrasor It is indeed a missing feature at the moment.
I just discovered the same bug with key prefixes instead of namespaces. Looks like i18next-parser threads all t functions with the config that appeared last.
const { t: tRoot } = useTranslation();
const { t } = useTranslation('translation', {keyPrefix: 'staticData.locations'});
any progress here?
🐛 Bug Report
When using the
useTranslation
hook to get two different TFunctions scoped to different namespaces, extraction should place keys into the namespace of the corresponding TFunction.To Reproduce
Expected behavior
Should get extracted to the default namespace:
But gets extracted to the namespace provided to the other
useTranslation
hook:I believe this is the corresponding test that should be added, but haven't gotten much farther than that
Your Environment