mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
This commit is contained in:
parent
b3faab6f42
commit
8ec26fb531
@ -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>
|
||||
|
||||
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user