-
Notifications
You must be signed in to change notification settings - Fork 1k
translateLanguage directive is not working together with asynchronous language loading by static files loader when translation files are big enough #1770
Comments
Sorry for the delay. Overseen this here. As everything is event based here, we should see this issue also when using a custom loader with a explicit deferred load ( In the tests we are using such custom loader with different timings as well: angular-translate/test/unit/service/translate.spec.js Lines 648 to 696 in c7e743b
Basics: The promise resolve will be deferred with a specific amount of time. |
Thank you for the response @knalli . But I'm also seeing de_DE showing untraslated content even with timeout time set to 0 for both languages. It's though working in the case when first language takes longer to load than second (2s vs 1s) Hope that helps |
When using `forceLanguage` via directive or service, internally the service waits only for the current language instead of the requested `forceLanguage` Fixes #1770
Fix in canary. |
Subject of the issue
translateLanguage
directive is not working, when used together with asynchronous language loading by static files loader, in the case when translation files are big enoughYour environment
Steps to reproduce
See the plunker
App is set to load languages from the static files with the default language
en
.To the body added an element needing a translation in another language, under the element with
translate-language="de"
attribute.When language files are taking longer to load (there is a race condition), the text under
translate-language="de"
is not translated – the translation key is shown instead.Expected behaviour
After the translation file was loaded, the actual translations are displayed.
Actual behaviour
Elements under
translate-language="de"
are not translated into any languageNote
The text was updated successfully, but these errors were encountered: