Skip to content
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

Namespace based file in react-native ...didn't work?! #15

Open
xstable opened this issue May 4, 2020 · 3 comments
Open

Namespace based file in react-native ...didn't work?! #15

xstable opened this issue May 4, 2020 · 3 comments

Comments

@xstable
Copy link

xstable commented May 4, 2020

Translation-Text is marked red with this error-message:
Cannot resolve symbol 'example:homeScreenText'

This Image describe my issue exactly:

image

@nyavro
Copy link
Owner

nyavro commented May 4, 2020

Hi!
To tell the truth, I didn't get what configuration you have.
Is it really vue-i18n? If so keys like:

'example.homeScreenText'

should work.

As far as I know, vue-i18n does not have namespaces, all translations resides under certain folder (locales, like in your case)
What you refer as 'namespace' works for i18n another way, namespace is the name of file where your localization resides.
In your case, if you have key 'example:homeScreenText', you have to have translation file named:

homeSceenText.json 

with content like:

{
    "homeScreenText": "Das ist ein Beispieltext..."
    ...
}

Please let me know if you still having problems with plugin configuring
Regards, Evgeniy

@xstable
Copy link
Author

xstable commented May 4, 2020

I use i18next-react. I didn't notice, that your project only work with vue?
But anyway. I don't think it should be too complicated to support i18next like namespaces (like you see in my posting above) with your plugin?!
Would be an awesome plugin for the IDE.

@nyavro
Copy link
Owner

nyavro commented May 4, 2020

No, the project works not only for vue, it is also for i18next (https://www.i18next.com/).
I'm wondering how does i18next-react differs from i18next, but anyway, let me investigate this kind of configuration, it is quite possible to implement support for such option.
Could you give me a link to guide to configure some small demo project to be sure that everything works? Or maybe you could give more screenshots of your package.json dependencies section and i18next init function parameters? I would greatly appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants