bug 4556: secondary storage page - localize all actions.

This commit is contained in:
Jessica Wang 2011-01-27 19:20:43 -08:00
parent 7f059c2d78
commit 7f99eeff0c
3 changed files with 17 additions and 4 deletions

View File

@ -541,6 +541,9 @@ label.action.edit.primary.storage=Edit Primary Storage
label.action.delete.primary.storage=Delete Primary Storage
label.action.delete.primary.storage.processing=Deleting Primary Storage....
label.action.delete.secondary.storage=Delete Secondary Storage
label.action.delete.secondary.storage.processing=Deleting Secondary Storage....
#Messages
message.action.start.instance=Please confirm you want to start instance
message.action.stop.instance=Please confirm you want to stop instance
@ -577,6 +580,8 @@ message.action.force.reconnect=Please confirm you want to force a reconnection f
message.action.primarystorage.enable.maintenance.mode=Warning: placing the primary storage into maintenance mode will cause all VMs using volumes from it to be stopped. Do you want to continue?
message.action.delete.primary.storage=Please confirm you want to delete primary storage
message.action.delete.secondary.storage=Please confirm you want to delete secondary storage
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.
message.lock.account=Please confirm you want to lock this account. By locking the account, all users for this account will no longer be able to manage their cloud resources. Existing resources can still be accessed.

View File

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

View File

@ -97,7 +97,7 @@ function secondaryStorageJsonToDetailsTab() {
});
var $actionMenu = $thisTab.find("#action_link #action_menu");
$actionMenu.find("#action_list").empty();
buildActionLinkForTab("Delete Secondary Storage", secondaryStorageActionMap, $actionMenu, $midmenuItem1, $thisTab);
buildActionLinkForTab("label.action.delete.secondary.storage", secondaryStorageActionMap, $actionMenu, $midmenuItem1, $thisTab);
$thisTab.find("#tab_spinning_wheel").hide();
$thisTab.find("#tab_container").show();
@ -126,10 +126,10 @@ function secondaryStorageClearDetailsTab() {
}
var secondaryStorageActionMap = {
"Delete Secondary Storage": {
"label.action.delete.secondary.storage": {
isAsyncJob: false,
dialogBeforeActionFn: doDeleteSecondaryStorage,
inProcessText: "Deleting Secondary Storage....",
inProcessText: "label.action.delete.secondary.storage.processing",
afterActionSeccessFn: function(json, $midmenuItem1, id) {
if(id.toString() == $("#right_panel_content").find("#tab_content_details").find("#id").text()) {
secondaryStorageJsonClearRightPanel();
@ -142,7 +142,7 @@ function doDeleteSecondaryStorage($actionLink, $detailsTab, $midmenuItem1) {
var jsonObj = $midmenuItem1.data("jsonObj");
$("#dialog_confirmation")
.text("Please confirm you want to delete this secondary storage")
.text(dictionary["message.action.delete.secondary.storage"])
.dialog('option', 'buttons', {
"Confirm": function() {
var $thisDialog = $(this);