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/14 00:21:11 UTC
git commit: updated refs/heads/4.5 to 8ec26fb
Repository: cloudstack
Updated Branches:
refs/heads/4.5 b3faab6f4 -> 8ec26fb53
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.
Conflicts:
ui/dictionary2.jsp
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8ec26fb5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8ec26fb5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8ec26fb5
Branch: refs/heads/4.5
Commit: 8ec26fb531eedc8fdb9f4731900c047760178fb6
Parents: b3faab6
Author: Brian Federle <br...@citrix.com>
Authored: Wed Nov 12 09:55:27 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Nov 13 15:20:17 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/8ec26fb5/ui/dictionary2.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary2.jsp b/ui/dictionary2.jsp
index 28b4f05..a76ba3b 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/8ec26fb5/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;
};
}