-
Notifications
You must be signed in to change notification settings - Fork 1k
When using partial translations and multiple translate.refresh() are called not all translations are loaded #1326
Comments
Is it a duplicate of #1307 ? |
No this is more about when the requests are returned out of order and some translations are lost. eg. P = Promise, T=Partial translation |
Ensures that the partial loader service refetches the list of parts when its promise resolves in case the list of parts have changed in the intervening time Fixes angular-translate#1326
Ensures that the partial loader service refetches the list of parts when its promise resolves in case the list of parts have changed in the intervening time Fixes #1326
@cleavera Just picked your PR. Thank you ! |
Hi there, is there a release date for 2.9.2? I would really like to see this fix released soon 👍 Thanks, |
Uhm.. (confused) this is part of 2.9.0 already? |
Well,... never mind. I don't know why I thought this would be added in 2.9.2 Thanks! |
hi, is this issue fixed? I am still facing this issue in 2.15. I am on angular 1.26 btw but using v2.15 for angular-translate. Should i be using a different version of angular translate for angular v 1.26? |
Looks so. Please file a new issue if the bug is still unresolved. And attach an appropriate demo, thanks. |
When I call $translatePartialLoader.addPart('...') and translate.refresh() in a short space of time the full list of translations is not always loaded in, this leads to the end user being shown missing translations.
The issue seems to happen when you add a part then refresh translations then add another part and refresh it before the previous refresh has completed. If the second refresh is completed then the first is completed then the results of the second refresh are ignored as the first one (with less data) overwrites the data from the second (which has the extra data).
Hopefully this example makes it clearer.
http://codepen.io/antisback/pen/xZGKQK?editors=101
You can toggle the translation working by commenting out the timeout near the end to simulate the first refresh resolving after the second.
The text was updated successfully, but these errors were encountered: