On 02/21/2014 03:53 PM, Rodrigo Trujillo wrote:
In the guest UI, some messages were missed to add to i18n file.
This patch fixes this.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_main.js | 16 ++++++++--------
ui/pages/i18n.html.tmpl | 8 ++++++++
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index b5e7af3..d43b62f 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -31,7 +31,7 @@ kimchi.vmstart = function(event) {
kimchi.listVmsAuto();
}, function() {
startButton.removeClass('loading');
- kimchi.message.error(i18n['msg.fail.start']);
+ kimchi.message.error(i18n['KCHVM6002M']);
In the error functions we need to raise the message received in server
request
}, function(err) {
startButton.removeClass('loading');
kimchi.message.error(err.responseJSON.reason);
}
);
} else {
@@ -51,7 +51,7 @@ kimchi.vmstop = function(event) {
button.removeClass('loading');
kimchi.listVmsAuto();
}, function() {
- kimchi.message.error(i18n['msg.fail.stop']);
+ kimchi.message.error(i18n['KCHVM6003M']);
Same as I commented above
});
} else {
event.preventDefault();
@@ -65,7 +65,7 @@ kimchi.vmreset = function(event){
kimchi.resetVM(vm_id, function(result) {
kimchi.listVmsAuto();
}, function() {
- kimchi.message.error(i18n['msg.fail.reset']);
+ kimchi.message.error(i18n['KCHVM6004M']);
Here too
}
);
};
@@ -74,16 +74,16 @@ kimchi.vmdelete = function(event) {
var vm = $(this).closest('li[name=guest]');
var vm_id=vm.attr("id");
var settings = {
- title : i18n['msg.confirm.delete.title'],
- content : i18n['msg.vm.confirm.delete'],
- confirm : i18n['msg.confirm.delete.confirm'],
- cancel : i18n['msg.confirm.delete.cancel']
+ title : i18n['KCHVM6005M'],
+ content : i18n['KCHVM6006M'],
+ confirm : i18n['KCHAPI6002M'],
+ cancel : i18n['KCHAPI6003M']
};
kimchi.confirm(settings, function() {
kimchi.deleteVM(vm_id, function(result) {
kimchi.listVmsAuto();
}, function() {
- kimchi.message.error(i18n['msg.fail.delete']);
+ kimchi.message.error(i18n['KCHVM6007M']);
And here.
});
}, function() {
});
diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl
index 613b707..cd48029 100644
--- a/ui/pages/i18n.html.tmpl
+++ b/ui/pages/i18n.html.tmpl
@@ -95,6 +95,14 @@ var i18n = {
'KCHVM6001M': "$_("This will delete the virtual machine and its
virtual disks. This operation cannot be undone. Would you like to continue?")",
+ 'KCHVM6002M': "$_("Failed to
start")",
+ 'KCHVM6003M': "$_("Failed to stop")",
+ 'KCHVM6004M': "$_("Failed to reset")",
+ 'KCHVM6005M': "$_("Delete Confirmation")",
Those messages are not needed
+ 'KCHVM6006M': "$_("This will delete the VM and
its virtual disks. "
+ "This operation cannot be undone. "
And neither this one. This is exactly the message KCHVM6001M
+ "Would you like to
continue?")",
+ 'KCHVM6007M': "$_("Failed to delete")",
'KCHNET6001E': "$_("The VLAN id must be between 1 and
4094.")",