Skip to content

Commit 37ba08a

Browse files
committed
UI: Fix localization fn override
If localization function is specified in another plugin, do not use the default
1 parent 7ce0bd6 commit 37ba08a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎ui/scripts/cloudStack.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,11 @@
483483
cloudStack.uiCustom.login(loginArgs);
484484

485485
// Localization
486-
cloudStack.localizationFn = function(str) {
487-
return dictionary[str];
488-
};
486+
if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is overridden by a plugin/module
487+
cloudStack.localizationFn = function(str) {
488+
return dictionary[str];
489+
};
490+
}
489491

490492
document.title = _l('label.app.name');
491493
});

0 commit comments

Comments
 (0)