mirror of https://github.com/apache/cloudstack.git
bug 4556: localize middle menu actions.
This commit is contained in:
parent
38857cf47c
commit
2db078abf6
|
|
@ -19,6 +19,9 @@ label.add=Add
|
|||
label.adding.processing=Adding....
|
||||
label.adding.succeeded=Adding Succeeded
|
||||
label.adding.failed=Adding Failed
|
||||
label.succeeded=Succeeded
|
||||
label.failed=Failed
|
||||
label.error.code=Error Code
|
||||
label.add.zone=Add Zone
|
||||
label.adding.zone=Adding Zone
|
||||
label.add.host=Add Host
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@
|
|||
g_dictionary = {
|
||||
'label.adding.processing' : '<fmt:message key="label.adding.processing"/>',
|
||||
'label.adding.succeeded' : '<fmt:message key="label.adding.succeeded"/>',
|
||||
'label.adding.failed' : '<fmt:message key="label.adding.failed"/>'
|
||||
'label.adding.failed' : '<fmt:message key="label.adding.failed"/>',
|
||||
'label.succeeded' : '<fmt:message key="label.succeeded"/>',
|
||||
'label.failed' : '<fmt:message key="label.failed"/>',
|
||||
'label.error.code': '<fmt:message key="label.error.code"/>'
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -410,12 +410,14 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
|
|||
$midmenuItem1.find("#content").removeClass("inaction");
|
||||
$midmenuItem1.find("#spinning_wheel").hide();
|
||||
hideDetailsTabActionSpinningWheel(id, inProcessText2, $midmenuItem1);
|
||||
|
||||
if (result.jobstatus == 1) { // Succeeded
|
||||
$midmenuItem1.find("#info_icon").removeClass("error").show();
|
||||
$midmenuItem1.data("afterActionInfo", (label2 + " action succeeded."));
|
||||
$midmenuItem1.data("afterActionInfo", (label2 + " - " + g_dictionary["label.succeeded"]));
|
||||
afterActionSeccessFn(json, $midmenuItem1, id);
|
||||
} else if (result.jobstatus == 2) { // Failed
|
||||
var errorMsg = label2 + " action failed. Reason: " + fromdb(result.jobresult.errortext);
|
||||
//var errorMsg = label2 + " action failed. Reason: " + fromdb(result.jobresult.errortext);
|
||||
var errorMsg = label2 + " - " + g_dictionary["label.failed"] + " - " + g_dictionary["label.error.code"] + " " + fromdb(result.jobresult.errorcode);
|
||||
handleErrorInMidMenu2(errorMsg, $midmenuItem1, id, inProcessText2);
|
||||
}
|
||||
}
|
||||
|
|
@ -447,7 +449,8 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
|
|||
$midmenuItem1.find("#content").removeClass("inaction");
|
||||
$midmenuItem1.find("#spinning_wheel").hide();
|
||||
$midmenuItem1.find("#info_icon").removeClass("error").show();
|
||||
$midmenuItem1.data("afterActionInfo", (label2 + " action succeeded."));
|
||||
//$midmenuItem1.data("afterActionInfo", (label2 + " action succeeded."));
|
||||
$midmenuItem1.data("afterActionInfo", (label2 + " - " + g_dictionary["label.succeeded"]));
|
||||
hideDetailsTabActionSpinningWheel(id, inProcessText2, $midmenuItem1);
|
||||
afterActionSeccessFn(json, $midmenuItem1, id);
|
||||
},
|
||||
|
|
@ -529,7 +532,7 @@ function copyActionInfoFromMidMenuToRightPanel($midmenuItem1) {
|
|||
if(inProcessText in dictionary)
|
||||
$detailsTabSpinningWheel.find("#description").text(dictionary[inProcessText]);
|
||||
else
|
||||
$detailsTabSpinningWheel.find("#description").text(label);
|
||||
$detailsTabSpinningWheel.find("#description").text(inProcessText);
|
||||
$detailsTabSpinningWheel.show();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue