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

Packages loading texts from other packages. #232

Open
Jessedev1 opened this issue Jan 25, 2024 · 3 comments
Open

Packages loading texts from other packages. #232

Jessedev1 opened this issue Jan 25, 2024 · 3 comments

Comments

@Jessedev1
Copy link

Hello,

My project is having some troubles with using translations in multiple packages.
When using a text in package-1 it will search in the language file of package-2.

Imagine I have two packages with the following language files:

register-package:
{ "hello": "Hello", "sign_in": "Sign in", "sign_out": "Sign out", "welcome": "Welcome!" }

login-package:
{ "test": "Test", "first_name": "First name", "last_name": "Last name", "login": "Login", "logout": "Logout", "welcome": "Welcome!" }

When I want to get the string "login" on the login page it will show "login" on the front-end.
But when I move the property "login" to the language file of "register-package" it will load the right way.

Is there some way so I can make sure the code will search in its own package first?

@theosp
Copy link
Collaborator

theosp commented Jan 25, 2024

Hey Jesse,

This issue seems to be a regression.

At the very moment, I am quite busy with other stuff for the next 3-4 weeks. Let me know whether you can try to debug the thing and make it work according to documentation, if guidance from me will be necessary let me know.

Thanks,
-Daniel

@Jessedev1
Copy link
Author

I am still experiencing this error.
Temporary fix was to move all translations to a global file.

This is not the fix I desire, but it works for now.

@theosp
Copy link
Collaborator

theosp commented Jul 25, 2024

Hey, we published v2.0.1 that might address this issue. If it is still something you work on, please give it a try and let me know if it helped.

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