You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/11/12 18:58:12 UTC

git commit: updated refs/heads/master to 68745ae

Repository: cloudstack
Updated Branches:
  refs/heads/master 6df38427c -> 68745ae9b


CLOUDSTACK-7645: UI: Fix method for extending dictionary

Instead of mapping both dictionary JSP files to separate objects, extend
dictionary2's object onto single 'dictionary' object.

-- The previous approach was causing issues on certain dialogs, which were not
opening due to possible missing labels.


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

Branch: refs/heads/master
Commit: 68745ae9b1652393974f457137c9c7c1df333810
Parents: 6df3842
Author: Brian Federle <br...@citrix.com>
Authored: Wed Nov 12 09:55:27 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Nov 12 09:57:42 2014 -0800

----------------------------------------------------------------------
 ui/dictionary2.jsp       | 4 ++--
 ui/scripts/cloudStack.js | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/68745ae9/ui/dictionary2.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary2.jsp b/ui/dictionary2.jsp
index a182103..a755ebc 100644
--- a/ui/dictionary2.jsp
+++ b/ui/dictionary2.jsp
@@ -24,7 +24,7 @@ under the License.
 <fmt:setBundle basename="resources/messages"/>
 <% long now = System.currentTimeMillis(); %>
 <script type="text/javascript">
-dictionary2 = {
+$.extend(dictionary, {
 'label.rules': '<fmt:message key="label.rules" />',
 'label.running.vms': '<fmt:message key="label.running.vms" />',
 'label.s3.access_key': '<fmt:message key="label.s3.access_key" />',
@@ -1013,5 +1013,5 @@ dictionary2 = {
 'label.na': '<fmt:message key="label.na" />',
 'label.added.network.offering': '<fmt:message key="label.added.network.offering" />',
 'label.no': '<fmt:message key="label.no" />',
-};
+});
 </script>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/68745ae9/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index a76e101..7a59882 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -407,9 +407,9 @@
         // Localization
         if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is overridden by a plugin/module
             cloudStack.localizationFn = function(str) {
-                // look in dictionary first; if not found, try dictionary2
                 var localized = dictionary[str];
-                return localized ? localized : dictionary2[str]; 
+
+                return localized ? localized : str;
             };
         }