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
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No (no idea)
Current behavior
When navigating to a page with a scoped translation, it trigger 2 times the loader:
useFallbackTranslation is set to true and both defaultLang and fallbackLang has the same value.
I also suspect another bug, all translation keys are fine on this scoped component, I don't get why it's loading the fallback lang file as there's no error.
Both problem only appear with the scoped translation, it works as expected for the main file.
Expected behavior
If the current lang is the same as the fallbackLang, then it should not load the fallback file as it will already be loaded by default.
If there is no translation error, it should not load the fallback lang file.
Please provide a link to a minimal reproduction of the bug
The text was updated successfully, but these errors were encountered:
Yberion
changed the title
Bug(transloco): transloco loader triggers 2 times on scope translation
Bug(transloco): transloco loader trigger 2 times on scoped translation
Feb 11, 2023
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No (no idea)
Current behavior
When navigating to a page with a scoped translation, it trigger 2 times the loader:
useFallbackTranslation
is set totrue
and bothdefaultLang
andfallbackLang
has the same value.I also suspect another bug, all translation keys are fine on this scoped component, I don't get why it's loading the fallback lang file as there's no error.
Both problem only appear with the scoped translation, it works as expected for the main file.
Expected behavior
If the current lang is the same as the
fallbackLang
, then it should not load the fallback file as it will already be loaded by default.If there is no translation error, it should not load the fallback lang file.
Please provide a link to a minimal reproduction of the bug
https://github.com/ngneat/transloco/tree/master/apps/transloco-playground
Change
fallbackLang
toen
, setuseFallbackTranslation
totrue
and navigate to the scoped route:https://github.com/ngneat/transloco/blob/master/apps/transloco-playground/src/app/transloco-root.module.ts#L45-L48
Transloco Config
Please provide the environment you discovered this bug in
Browser
No response
I would like to make a pull request for this bug
Yes 🚀
The text was updated successfully, but these errors were encountered: