summaryrefslogtreecommitdiffstats
path: root/core/js/l10n.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/l10n.js')
-rw-r--r--core/js/l10n.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/js/l10n.js b/core/js/l10n.js
index 3e37da01369..0c660584322 100644
--- a/core/js/l10n.js
+++ b/core/js/l10n.js
@@ -37,10 +37,11 @@ OC.L10N = {
load: function(appName, callback) {
// already available ?
if (this._bundles[appName] || OC.getLocale() === 'en') {
- if (callback) {
- callback();
- }
- return;
+ var deferred = $.Deferred();
+ var promise = deferred.promise();
+ promise.then(callback);
+ deferred.resolve();
+ return promise;
}
var self = this;