I am listening on language changes. I do a setLanguage and then a loadRemote to load up a new language. However, both fire a broadcast by calling broadcastUpdated().
- setCurrentLanguage
|
setCurrentLanguage: function (lang) { |
- setString
|
setStrings: function (language, strings) { |
My follow-up action includes communication with backend, which is happening twice then.
I see 2 options, either we skip the broadcast in setStrings or we apply a setCurrentLanguage in setStrings.
I am listening on language changes. I do a setLanguage and then a loadRemote to load up a new language. However, both fire a broadcast by calling broadcastUpdated().
angular-gettext/src/catalog.js
Line 139 in 8959f44
angular-gettext/src/catalog.js
Line 163 in 8959f44
My follow-up action includes communication with backend, which is happening twice then.
I see 2 options, either we skip the broadcast in setStrings or we apply a setCurrentLanguage in setStrings.