cloudstack 3.0 UI - localize validation message for vm host name.

This commit is contained in:
Jessica Wang 2012-04-18 18:19:46 -07:00
parent b7b77cea5c
commit 9d694dd8e7
3 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@ label.add.SRX.device=Add SRX device
label.account.and.security.group=Account, Security group
label.fetch.latest=Fetch latest
label.system.offering=System Offering
message.validate.instance.name=Instance name can not be longer than 63 characters. Only ASCII letters a~z, digits 0~9, hyphen are allowed. Must start with a letter and end with a letter or a digit.
label.action.register.template=Register template
label.action.register.iso=Register ISO
#new labels (end) ************************************************************************************************

View File

@ -2935,6 +2935,7 @@ dictionary = {
'label.add.SRX.device': '<fmt:message key="label.add.SRX.device" />',
'label.account.and.security.group': '<fmt:message key="label.account.and.security.group" />',
'label.system.offering': '<fmt:message key="label.system.offering" />',
'message.validate.instance.name': '<fmt:message key="message.validate.instance.name" />',
'label.action.register.template': '<fmt:message key="label.action.register.template" />',
'label.action.register.iso': '<fmt:message key="label.action.register.iso" />'
};

View File

@ -206,7 +206,7 @@ cloudStack.validate = {
var regexp = /^[a-z]{1}[a-z0-9\-]{0,61}[a-z0-9]{0,1}$/;
var b = regexp.test(args); //true or false
if(b == false)
cloudStack.dialog.notice({ message: 'Instance name can not be longer than 63 characters. Only ASCII letters a~z, digits 0~9, hyphen are allowed. Must start with a letter and end with a letter or a digit.' });
cloudStack.dialog.notice({ message: 'message.validate.instance.name' });
return b;
}
}