cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 37ba08a
Date Wed, 10 Jul 2013 18:20:44 GMT
Updated Branches:
  refs/heads/master f7f826d4f -> 37ba08a8e


UI: Fix localization fn override

If localization function is specified in another plugin, do not use the
default


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/37ba08a8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/37ba08a8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/37ba08a8

Branch: refs/heads/master
Commit: 37ba08a8ea8ae637624ddb7946e0bca4a112f2c3
Parents: 7ce0bd6
Author: Brian Federle <brian.federle@citrix.com>
Authored: Wed Jul 10 11:16:18 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Jul 10 11:18:27 2013 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/37ba08a8/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 1385607..c0ff7f2 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -483,9 +483,11 @@
     cloudStack.uiCustom.login(loginArgs);
 
     // Localization
-    cloudStack.localizationFn = function(str) {
-      return dictionary[str];
-    };
+    if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is overridden by a
plugin/module
+      cloudStack.localizationFn = function(str) {
+        return dictionary[str];
+      };
+    }
 
     document.title = _l('label.app.name');
   });


Mime
View raw message