Skip to content

Commit ec86c37

Browse files
committed
Rebuild.
1 parent 3e96e98 commit ec86c37

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

dist/angular-gettext.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ angular.module('gettext').factory('gettextCatalog', ["gettextPlurals", "$http",
2121
}
2222
};
2323

24+
function broadcastUpdated() {
25+
$rootScope.$broadcast('gettextLanguageChanged');
26+
}
27+
2428
catalog = {
2529
debug: false,
2630
strings: {},
@@ -30,7 +34,7 @@ angular.module('gettext').factory('gettextCatalog', ["gettextPlurals", "$http",
3034

3135
setCurrentLanguage: function (lang) {
3236
this.currentLanguage = lang;
33-
$rootScope.$broadcast('gettextLanguageChanged');
37+
broadcastUpdated();
3438
},
3539

3640
setStrings: function (language, strings) {
@@ -46,6 +50,8 @@ angular.module('gettext').factory('gettextCatalog', ["gettextPlurals", "$http",
4650
this.strings[language][key] = val;
4751
}
4852
}
53+
54+
broadcastUpdated();
4955
},
5056

5157
getStringForm: function (string, n) {
@@ -74,7 +80,6 @@ angular.module('gettext').factory('gettextCatalog', ["gettextPlurals", "$http",
7480
for (var lang in data) {
7581
catalog.setStrings(lang, data[lang]);
7682
}
77-
$rootScope.$broadcast('gettextLanguageChanged');
7883
});
7984
}
8085
};

dist/angular-gettext.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)