Skip to content

Commit 8ec26fb

Browse files
committed
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
1 parent b3faab6 commit 8ec26fb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ui/dictionary2.jsp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ under the License.
2424
<fmt:setBundle basename="resources/messages"/>
2525
<% long now = System.currentTimeMillis(); %>
2626
<script type="text/javascript">
27-
dictionary2 = {
27+
$.extend(dictionary, {
2828
'label.rules': '<fmt:message key="label.rules" />',
2929
'label.running.vms': '<fmt:message key="label.running.vms" />',
3030
'label.s3.access_key': '<fmt:message key="label.s3.access_key" />',
@@ -1013,5 +1013,5 @@ dictionary2 = {
10131013
'label.na': '<fmt:message key="label.na" />',
10141014
'label.added.network.offering': '<fmt:message key="label.added.network.offering" />',
10151015
'label.no': '<fmt:message key="label.no" />'
1016-
};
1016+
});
10171017
</script>

ui/scripts/cloudStack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@
407407
// Localization
408408
if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is overridden by a plugin/module
409409
cloudStack.localizationFn = function(str) {
410-
// look in dictionary first; if not found, try dictionary2
411410
var localized = dictionary[str];
412-
return localized ? localized : dictionary2[str];
411+
412+
return localized ? localized : str;
413413
};
414414
}
415415

0 commit comments

Comments
 (0)