bug 4556: cluster page - localize all actions.

This commit is contained in:
Jessica Wang 2011-01-27 18:05:16 -08:00
parent b9b53f4f1b
commit 3b70350910
3 changed files with 16 additions and 6 deletions

View File

@ -523,6 +523,9 @@ label.action.edit.pod=Edit Pod
label.action.delete.pod=Delete Pod
label.action.delete.pod.processing=Deleting Pod....
label.action.delete.cluster=Delete Cluster
label.action.delete.cluster.processing=Deleting Cluster....
#Messages
message.action.start.instance=Please confirm you want to start instance
message.action.stop.instance=Please confirm you want to stop instance
@ -547,10 +550,9 @@ message.action.delete.ISO=Please confirm you want to delete ISO
message.action.delete.ISO.for.all.zones=The ISO is used by all zones. Please confirm you want to delete it from all zones.
message.action.delete.domain=Please confirm you want to delete domain
message.action.delete.zone=Please confirm you want to delete zone
message.action.delete.pod=Please confirm you want to delete pod
message.action.delete.cluster=Please confirm you want to delete cluster
message.edit.limits=Please specify limits to the following resources. A "-1" indicates no limit to the amount of resources create.
message.disable.account=Please confirm you want to disable this account. By disabling the account, all users for this account will no longer have access to their cloud resources. All running virtual machines will be immediately shut down.

View File

@ -5,6 +5,14 @@
</c:if>
<fmt:setBundle basename="resources/messages"/>
<script language="javascript">
dictionary = {
'label.action.delete.cluster' : '<fmt:message key="label.action.delete.cluster"/>',
'label.action.delete.cluster.processing' : '<fmt:message key="label.action.delete.cluster.processing"/>',
'message.action.delete.cluster' : '<fmt:message key="message.action.delete.cluster"/>'
};
</script>
<div class="main_title" id="right_panel_header">
<div class="main_titleicon">

View File

@ -85,7 +85,7 @@ function clusterJsonToDetailsTab() {
});
var $actionMenu = $thisTab.find("#action_link #action_menu");
$actionMenu.find("#action_list").empty();
buildActionLinkForTab("Delete Cluster", clusterActionMap, $actionMenu, $midmenuItem1, $thisTab);
buildActionLinkForTab("label.action.delete.cluster", clusterActionMap, $actionMenu, $midmenuItem1, $thisTab);
}
function clusterClearDetailsTab() {
@ -105,11 +105,11 @@ function clusterClearDetailsTab() {
}
var clusterActionMap = {
"Delete Cluster": {
"label.action.delete.cluster": {
api: "deleteCluster",
isAsyncJob: false,
dialogBeforeActionFn : doDeleteCluster,
inProcessText: "Deleting Cluster....",
inProcessText: "label.action.delete.cluster.processing",
afterActionSeccessFn: function(json, $midmenuItem1, id) {
$midmenuItem1.slideUp("slow", function() {
$(this).remove();
@ -127,7 +127,7 @@ function doDeleteCluster($actionLink, $detailsTab, $midmenuItem1) {
var id = jsonObj.id;
$("#dialog_confirmation")
.text("Please confirm you want to delete this cluster")
.text(dictionary["message.action.delete.cluster"])
.dialog('option', 'buttons', {
"Confirm": function() {
$(this).dialog("close");