Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(service): add missing final event on new (async) translations
Browse files Browse the repository at this point in the history
Relates #751 #733
  • Loading branch information
knalli committed Sep 30, 2014
1 parent 72692b9 commit 22cc8b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/service/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,7 @@ angular.module('pascalprecht.translate').provider('$translate', ['$STORAGE_KEY',
if ($fallbackLanguage && $fallbackLanguage.length) {
var processAsyncResult = function (translation) {
translations(translation.key, translation.table);
$rootScope.$emit('$translateChangeEnd', { language: translation.key });
};
for (var i = 0, len = $fallbackLanguage.length; i < len; i++) {
langPromises[$fallbackLanguage[i]] = loadAsync($fallbackLanguage[i]).then(processAsyncResult);
Expand Down

0 comments on commit 22cc8b4

Please sign in to comment.