-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom framework: Any way to match a namespace alongside the key for the usage match? #894
Comments
I'd be interested in this too! I guess this is required for #820 (if namespaces are used). |
It seems like at least programmatically this should be possible: i18n-ally/src/frameworks/react-i18next.ts Lines 82 to 108 in 0ea030d
|
This feature is added in #926, by including a new |
That's nice! Unfortunately it won't work properly with that setup: const t = useI18n()
const scopedT = useScopedI18n('scope')
// Use both t and scopedT |
@baptisteArno ah I see - the issue is that you can only specify one regex, not multiple? That seems like it'd be straightforward to add. For my use case I only needed to set one, so didn't think to add the option for multiple. |
I attempted to work around this by using the regex "or" but it doesn't work for some reason. Any idea why? e.g.
|
Is your feature related to a specific framework or general for this extension
next-international
Is your feature request related to a problem? Please describe.
I'd like to be able to detect a namespace:
It won't take
folders
namespace into consideration with this custom settings:Describe the solution you'd like
Maybe adding
{namespace}
for the regex detection, that would add it as a prefix for the key? Or anamespaceMatchRegex
config?The text was updated successfully, but these errors were encountered: