TAPevents / tap-i18n

A comprehensive internationalization solution for Meteor.
MIT License
329 stars 86 forks source link

Packages loading texts from other packages. #232

Open Jessedev1 opened 9 months ago

Jessedev1 commented 9 months ago

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 commented 9 months ago

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 commented 8 months ago

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 commented 3 months ago

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.