Skip to content

Bug: Submodule with separate TRANSLOCO_SCOPE does not load translations from lazy loaded parent. #429

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

Open
6 tasks
NaviKnow opened this issue May 7, 2021 · 1 comment

Comments

@NaviKnow
Copy link

NaviKnow commented May 7, 2021

Current behavior

When a sub-module is imported into another module (lazy loaded?) with it's own TRANSLOCO_SCOPE, the sub-modules TRANSLOCO_SCOPE does not load the translation.

Expected behavior

Expectation is that each Module can have it's own scope and will load properly whether the sub-module is loaded directly or lazily.

Minimal reproduction of the problem with instructions

Navigate first to this link: https://ngneat-transloco-ho6spo.stackblitz.io/lazy
Note that h-alias.TITLE is not translated.
Navigate to the HOME link and note that h-alias.TITLE is now translated (module w/ separate scope is loaded in App Module).
Now navigate back to Lazy and notice that h-alias.TITLE is properly translated.

Stackblitz code: https://stackblitz.com/edit/ngneat-transloco-ho6spo?devtoolsheight=33&file=src/app/helper/myhelper/myhelper.component.html

Browser:

  • [x ] Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • [ x] Edge version XX

Additional context

Add any other context about the problem here.

Contribution

I would like to make a pull request for this feature:
[ ] Yes! 🚀
[x ] Maybe next time

@itayod
Copy link
Contributor

itayod commented May 16, 2021

@NaviKnow please read this guide carefully, you might find your answer there

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