You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature related to a specific framework or general for this extension
Yes. react-i18next
Is your feature request related to a problem? Please describe.
Yes. Our application wraps the useTranslation utility provided by react-i18next in order to provide some more fine-tuned DX enhancements for our internal conventions. Our wrapper is named useI18nContext. I noticed that using this wrapper leads i18n-ally to falsely report missing translation keys when relying on an unqualified key using the default namespace. For example:
Is your feature related to a specific framework or general for this extension
Yes.
react-i18next
Is your feature request related to a problem? Please describe.
Yes. Our application wraps the
useTranslation
utility provided byreact-i18next
in order to provide some more fine-tuned DX enhancements for our internal conventions. Our wrapper is nameduseI18nContext
. I noticed that using this wrapper leads i18n-ally to falsely report missing translation keys when relying on an unqualified key using the default namespace. For example:would correctly be identified as referring to
common:some-key
because the call touseTranslation
changes the default namespace in its scope.However, the following does not work:
Describe the solution you'd like
I would like to be able to configure an alternate name or list of names to use for matching the scoped default namespace instead of
useTranslation
Additional context
I have already created a proof of concept for this that works quite well for our use case. I based my implementation on e89557c#diff-1945e219acf58a633d45d6d8ef766218782fe79bd75a905659b76934902a075c. that I discovered via #307. I will create a PR with my changes and would love to contribute if you would accept the PR.
The text was updated successfully, but these errors were encountered: