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
Allow the scanner to automatically detect and generate the namespaces automatically, without needing to specify them in the ns option.
Motivation
I have a (react-native) project with many namespaces. Basically, one per page/screen. That makes it cumbersome to have to update manually and list all the namespaces in the ns option.
If I forget one, I get the error *** does not exist in the namespaces ***. While this error is useful to identify the issue, it is still not ideal to have to add the namespaces manually since I have dozens of them.
Ideally, I would just like to pass an option to ns (maybe false) so that the plugin will just go ahead and generate any {{lng}}/{{ns}}.json file I need, based on the usage.
If myNamespace exists (the file exists), it should just add the hello key to it.
If not, it should create the file.
All this without the need to have to add myNamespace anywhere in the options.
Thank you
The text was updated successfully, but these errors were encountered:
Thanks @montogeek but this is a different issue. I am using that solution along with useTranslation() and it works great. However, I just want to avoid to have to specify manually all the namespaces in the scanner config. That should just be automatic with usage from the code.
🚀 Feature Proposal
Allow the scanner to automatically detect and generate the namespaces automatically, without needing to specify them in the
ns
option.Motivation
I have a (react-native) project with many namespaces. Basically, one per page/screen. That makes it cumbersome to have to update manually and list all the namespaces in the
ns
option.If I forget one, I get the error
*** does not exist in the namespaces ***
. While this error is useful to identify the issue, it is still not ideal to have to add the namespaces manually since I have dozens of them.Ideally, I would just like to pass an option to
ns
(maybefalse
) so that the plugin will just go ahead and generate any{{lng}}/{{ns}}.json
file I need, based on the usage.Example
If
myNamespace
exists (the file exists), it should just add thehello
key to it.If not, it should create the file.
All this without the need to have to add
myNamespace
anywhere in the options.Thank you
The text was updated successfully, but these errors were encountered: