From a9e99d30652b030b870dff92af33d0a4e5000a4f Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 15 Feb 2012 19:22:33 -0800 Subject: [PATCH] cloudstack 3.0 new UI - localize zone wizard. --- .../classes/resources/messages.properties | 26 +++ .../classes/resources/messages_ja.properties | 22 ++ ui/index.jsp | 24 ++- ui/scripts/zoneWizard.js | 202 +++++++++--------- 4 files changed, 168 insertions(+), 106 deletions(-) diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 4012fc7d3c2..6ac2806a4d2 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -1165,6 +1165,32 @@ confirm.action.force.reconnect=Please confirm that you want to force reconnect t resource.state=Resource state LUN.number=LUN # confirm.remove.IP.range=Please confirm that you would like to remove this IP range. +tooltip.zone.name=A name for the zone. +tooltip.dns.1=Name of a DNS server for use by VMs in the zone. The public IP addresses for the zone must have a route to this server. +tooltip.dns.2=A second DNS server name for use by VMs in the zone. The public IP addresses for the zone must have a route to this server. +tooltip.internal.dns.1=Name of a DNS server for use by CloudStack internal system VMs in the zone. The private IP address for the pods must have a route to this server. +tooltip.internal.dns.2=Name of a DNS server for use by CloudStack internal system VMs in the zone. The private IP address for the pods must have a route to this server. +tooltip.network.domain=A DNS suffix that will create a custom domain name for the network that is accessed by guest VMs. +tooltip.pod.name=A name for this pod. +tooltip.reserved.system.gateway=The gateway for the hosts in the pod. +tooltip.reserved.system.netmask=The network prefix that defines the pod subnet. Uses CIDR notation. +creating.zone=Creating zone +creating.physical.networks=Creating physical networks +configuring.physical.networks=Configuring physical networks +adding.Netscaler.device=Adding Netscaler device +creating.pod=Creating pod +configuring.public.traffic=Configuring public traffic +configuring.storage.traffic=Configuring storage traffic +configuring.guest.traffic=Configuring guest traffic +creating.cluster=Creating cluster +adding.host=Adding host +creating.primary.storage=Creating primary storage +creating.secondary.storage=Creating secondary storage +Zone.creation.complete=Zone creation complete + + + + diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties index 336d6e5c2bf..4b4bd555f76 100644 --- a/client/WEB-INF/classes/resources/messages_ja.properties +++ b/client/WEB-INF/classes/resources/messages_ja.properties @@ -1168,4 +1168,26 @@ confirm.action.force.reconnect=このホストを再接続を強制すること resource.state=リソースの状態 LUN.number=LUN # confirm.remove.IP.range=あなたがこのIPアドレス範囲の削除を希望することを確認してください。 +tooltip.zone.name=ゾーンの名前を入力します。 +tooltip.dns.1=ゾーン内のVMで使用するためにDNSサーバーの名前を指定します。ゾーンのパブリックIPアドレスは、このサーバへのルートを持っている必要があります。 +tooltip.dns.2=ゾーン内のVMで使用するための二次DNSサーバー名を指定します。ゾーンのパブリックIPアドレスは、このサーバへのルートを持っている必要があります +tooltip.internal.dns.1=ゾーン内のCloudStack内部システムのVMによって使用されるDNSサーバーの名前を指定します。ポッド用のプライベートIPアドレスはこのサーバへのルートを持っている必要があります。 +tooltip.internal.dns.2=ゾーン内のCloudStack内部システムのVMによって使用されるDNSサーバーの名前を指定します。ポッド用のプライベートIPアドレスはこのサーバへのルートを持っている必要があります。 +tooltip.network.domain=ゲストVMによってアクセスされるネットワーク用のカスタムドメイン名を作成するDNSサフィックスです。 +tooltip.pod.name=このポッドの名前を入力します。 +tooltip.reserved.system.gateway=ポッド内のホストに対するゲートウェイ。 +tooltip.reserved.system.netmask=ポッドサブネットを定義するネットワーク接頭辞。 CIDR表記を使用しています。 +creating.zone=ゾーンを作成する +creating.physical.networks=物理的なネットワークを作成する +configuring.physical.networks=物理的なネットワークを構成する +adding.Netscaler.device=NetScalerのデバイスを追加する +creating.pod=ポッドを作成する +configuring.public.traffic=公共交通を構成する +configuring.storage.traffic=ストレージ·トラフィックの設定 +configuring.guest.traffic=ゲストのトラフィックを設定する +creating.cluster=クラスタの作成 +adding.host=ホストを追加する +creating.primary.storage=プライマリ·ストレージを作成する +creating.secondary.storage=セカンダリ·ストレージを作成する +Zone.creation.complete=完全なゾーンの作成 diff --git a/ui/index.jsp b/ui/index.jsp index d9a4bd97875..72fa6bb442b 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -2739,6 +2739,28 @@ dictionary = { 'confirm.action.force.reconnect': '', 'resource.state': '', 'LUN.number': '', -'confirm.remove.IP.range': '' +'confirm.remove.IP.range': '', +'tooltip.zone.name': '', +'tooltip.dns.1': '', +'tooltip.dns.2': '', +'tooltip.internal.dns.1': '', +'tooltip.internal.dns.2': '', +'tooltip.network.domain': '', +'tooltip.pod.name': '', +'tooltip.reserved.system.gateway': '', +'tooltip.reserved.system.netmask': '', +'creating.zone': '', +'creating.physical.networks': '', +'configuring.physical.networks': '', +'adding.Netscaler.device': '', +'creating.pod': '', +'configuring.public.traffic': '', +'configuring.storage.traffic': '', +'configuring.guest.traffic': '', +'creating.cluster': '', +'adding.host': '', +'creating.primary.storage': '', +'creating.secondary.storage': '', +'Zone.creation.complete': '' }; diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 670711350af..98fc3838a8f 100644 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -15,15 +15,15 @@ context: args.context, noSelect: true, fields: { - 'gateway': { edit: true, label: 'Gateway' }, - 'netmask': { edit: true, label: 'Netmask' }, - 'vlanid': { edit: true, label: 'VLAN', isOptional: true }, - 'startip': { edit: true, label: 'Start IP' }, - 'endip': { edit: true, label: 'End IP' }, - 'add-rule': { label: 'Add', addButton: true } + 'gateway': { edit: true, label: 'label.gateway' }, + 'netmask': { edit: true, label: 'label.netmask' }, + 'vlanid': { edit: true, label: 'label.vlan', isOptional: true }, + 'startip': { edit: true, label: 'start.IP' }, + 'endip': { edit: true, label: 'end.IP' }, + 'add-rule': { label: 'label.add', addButton: true } }, add: { - label: 'Add', + label: 'label.add', action: function(args) { multiEditData.push($.extend(args.data, { index: totalIndex @@ -35,7 +35,7 @@ }, actions: { destroy: { - label: 'Remove Rule', + label: 'label.remove.rule', action: function(args) { multiEditData = $.grep(multiEditData, function(item) { return item.index != args.context.multiRule[0].index; @@ -60,14 +60,14 @@ context: args.context, noSelect: true, fields: { - 'netmask': { edit: true, label: 'Netmask' }, - 'vlanid': { edit: true, label: 'VLAN', isOptional: true }, - 'startip': { edit: true, label: 'Start IP' }, - 'endip': { edit: true, label: 'End IP' }, - 'add-rule': { label: 'Add', addButton: true } + 'netmask': { edit: true, label: 'label.netmask' }, + 'vlanid': { edit: true, label: 'label.vlan', isOptional: true }, + 'startip': { edit: true, label: 'start.IP' }, + 'endip': { edit: true, label: 'end.IP' }, + 'add-rule': { label: 'label.add', addButton: true } }, add: { - label: 'Add', + label: 'label.add', action: function(args) { multiEditData.push($.extend(args.data, { index: totalIndex @@ -79,7 +79,7 @@ }, actions: { destroy: { - label: 'Remove Rule', + label: 'label.remove.rule', action: function(args) { multiEditData = $.grep(multiEditData, function(item) { return item.index != args.context.multiRule[0].index; @@ -174,27 +174,27 @@ }, fields: { name: { - label: 'Name', validation: { required: true }, - desc: 'A name for the zone.' + label: 'label.name', validation: { required: true }, + desc: 'tooltip.zone.name' }, dns1: { - label: 'DNS 1', validation: { required: true }, - desc: 'Name of a DNS server for use by VMs in the zone. The public IP addresses for the zone must have a route to this server.' + label: 'label.dns.1', validation: { required: true }, + desc: 'tooltip.dns.1' }, dns2: { - label: 'DNS 2', - desc: 'A second DNS server name for use by VMs in the zone. The public IP addresses for the zone must have a route to this server.' + label: 'label.dns.2', + desc: 'tooltip.dns.2' }, internaldns1: { - label: 'Internal DNS 1', validation: { required: true }, - desc: 'Name of a DNS server for use by CloudStack\'s internal system VMs in the zone. The private IP address for the pods must have a route to this server.' + label: 'label.internal.dns.1', validation: { required: true }, + desc: 'tooltip.internal.dns.1' }, internaldns2: { - label: 'Internal DNS 2', - desc: 'Name of a DNS server for use by CloudStack\'s internal system VMs in the zone. The private IP address for the pods must have a route to this server.' + label: 'label.internal.dns.2', + desc: 'tooltip.internal.dns.2' }, networkOfferingId: { - label: 'Network Offering', + label: 'label.network.offering', select: function(args) { $.ajax({ url: createURL("listNetworkOfferings&state=Enabled&guestiptype=Shared"), @@ -253,22 +253,22 @@ } }, networkdomain: { - label: 'Network Domain', - desc: 'A DNS suffix that will create a custom domain name for the network that is accessed by guest VMs.' + label: 'label.network.domain', + desc: 'tooltip.network.domain' }, guestcidraddress: { - label: 'Guest CIDR', + label: 'label.guest.cidr', defaultValue: '10.1.1.0/24', validation: { required: false } }, ispublic: { isReverse: true, isBoolean: true, - label: 'Public', + label: 'label.public', isChecked: true //checked by default (public zone) }, domain: { - label: 'Domain', + label: 'label.domain', dependsOn: 'ispublic', isHidden: true, select: function(args) { @@ -297,22 +297,22 @@ pod: { fields: { name: { - label: 'Pod name', + label: 'pod.name', validation: { required: true }, - desc: 'A name for this pod.' + desc: 'tooltip.pod.name' }, reservedSystemGateway: { - label: 'Reserved system gateway', + label: 'reserved.system.gateway', validation: { required: true }, - desc: 'The gateway for the hosts in the pod.' + desc: 'tooltip.reserved.system.gateway' }, reservedSystemNetmask: { - label: 'Reserved system netmask', + label: 'reserved.system.netmask', validation: { required: true }, - desc: 'The network prefix that defines the pod\'s subnet. Uses CIDR notation.' + desc: 'tooltip.reserved.system.netmask' }, reservedSystemStartIp: { - label: 'Start Reserved system IP', + label: 'start.reserved.system.IP', validation: { required: true } }, reservedSystemEndIp: { @@ -325,17 +325,17 @@ basicPhysicalNetwork: { //"Netscaler" now fields: { ip: { - label: 'IP address' + label: 'label.ip.address' }, username: { - label: 'Username' + label: 'label.username' }, password: { - label: 'Password', + label: 'label.password', isPassword: true }, networkdevicetype: { - label: 'Type', + label: 'label.type', select: function(args) { var items = []; items.push({id: "NetscalerMPXLoadBalancer", description: "NetScaler MPX LoadBalancer"}); @@ -345,30 +345,21 @@ } }, publicinterface: { - label: 'Public interface' + label: 'label.public.interface' }, privateinterface: { - label: 'Private interface' + label: 'label.private.interface' }, numretries: { - label: 'Number of retries', + label: 'number.of.retries', defaultValue: '2' - }, - inline: { - label: 'Mode', - select: function(args) { - var items = []; - items.push({id: "false", description: "side by side"}); - items.push({id: "true", description: "inline"}); - args.response.success({data: items}); - } - }, + }, capacity: { - label: 'Capacity', + label: 'capacity', validation: { required: false, number: true } }, dedicated: { - label: 'Dedicated', + label: 'dedicated', isBoolean: true, isChecked: false } @@ -409,15 +400,15 @@ fields: { //Basic (start) - guestGateway: { label: 'Guest gateway' }, - guestNetmask: { label: 'Guest netmask' }, - guestStartIp: { label: 'Guest start IP' }, - guestEndIp: { label: 'Guest end IP' }, + guestGateway: { label: 'label.guest.gateway' }, + guestNetmask: { label: 'label.guest.netmask' }, + guestStartIp: { label: 'guest.start.IP' }, + guestEndIp: { label: 'guest.end.IP' }, //Basic (end) //Advanced (start) vlanRange: { - label: 'VLAN Range', + label: 'label.vlan.range', range: ['vlanRangeStart', 'vlanRangeEnd'], validation: { required: false, digits: true } //Bug 13517 - AddZone wizard->Configure guest traffic: Vlan is optional } @@ -427,7 +418,7 @@ cluster: { fields: { hypervisor: { - label: 'Hypervisor', + label: 'label.hypervisor', select: function(args) { $.ajax({ url: createURL("listHypervisors"), @@ -467,26 +458,26 @@ } }, name: { - label: 'Cluster Name', + label: 'cluster.name', validation: { required: true } }, //hypervisor==VMWare begins here vCenterHost: { - label: 'vCenter Host', + label: 'label.vcenter.host', validation: { required: true } }, vCenterUsername: { - label: 'vCenter Username', + label: 'label.vcenter.username', validation: { required: true } }, vCenterPassword: { - label: 'vCenter Password', + label: 'label.vcenter.password', validation: { required: true }, isPassword: true }, vCenterDatacenter: { - label: 'vCenter Datacenter', + label: 'label.vcenter.datacenter', validation: { required: true } } //hypervisor==VMWare ends here @@ -580,19 +571,19 @@ }, fields: { hostname: { - label: 'Host name', + label: 'label.host.name', validation: { required: true }, isHidden: true }, username: { - label: 'User name', + label: 'label.username', validation: { required: true }, isHidden: true }, password: { - label: 'Password', + label: 'label.password', validation: { required: true }, isHidden: true, isPassword: true @@ -601,7 +592,7 @@ //input_group="VMWare" starts here vcenterHost: { - label: 'ESX/ESXi Host', + label: 'label.esx.host', validation: { required: true }, isHidden: true }, @@ -609,22 +600,22 @@ //input_group="BareMetal" starts here baremetalCpuCores: { - label: '# of CPU Cores', + label: 'label.num.cpu.cores', validation: { required: true }, isHidden: true }, baremetalCpu: { - label: 'CPU (in MHz)', + label: 'label.cpu.mhz', validation: { required: true }, isHidden: true }, baremetalMemory: { - label: 'Memory (in MB)', + label: 'label.memory.mb', validation: { required: true }, isHidden: true }, baremetalMAC: { - label: 'Host MAC', + label: 'host.MAC', validation: { required: true }, isHidden: true }, @@ -632,12 +623,12 @@ //input_group="OVM" starts here agentUsername: { - label: 'Agent Username', + label: 'agent.username', validation: { required: false }, isHidden: true }, agentPassword: { - label: 'Agent Password', + label: 'agent.password', validation: { required: true }, isHidden: true, isPassword: true @@ -646,23 +637,23 @@ //always appear (begin) hosttags: { - label: 'Host tags', + label: 'label.host.tags', validation: { required: false } } //always appear (end) } }, - primaryStorage: { + primaryStorage: { preFilter: function(args) {}, fields: { name: { - label: 'Name', + label: 'label.name', validation: { required: false } // Primary storage is not required. User can use local storage instead of primary storage. }, protocol: { - label: 'Protocol', + label: 'label.protocol', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. select: function(args) { var selectedClusterObj = { @@ -879,52 +870,52 @@ } }, server: { - label: 'Server', + label: 'label.server', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, //nfs path: { - label: 'Path', + label: 'label.path', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, //iscsi iqn: { - label: 'Target IQN', + label: 'label.target.iqn', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, lun: { - label: 'LUN #', + label: 'LUN.number', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, //clvm volumegroup: { - label: 'Volume Group', + label: 'label.volgroup', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, //vmfs vCenterDataCenter: { - label: 'vCenter Datacenter', + label: 'label.vcenter.datacenter', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, vCenterDataStore: { - label: 'vCenter Datastore', + label: 'label.vcenter.datastore', validation: { required: false }, // Primary storage is not required. User can use local storage instead of primary storage. isHidden: true }, //always appear (begin) storageTags: { - label: 'Storage Tags', + label: 'label.storage.tags', validation: { required: false } // Primary storage is not required. User can use local storage instead of primary storage. } //always appear (end) @@ -933,11 +924,11 @@ secondaryStorage: { fields: { nfsServer: { - label: 'NFS Server', + label: 'label.nfs.server', validation: { required: true } }, path: { - label: 'Path', + label: 'label.path', validation: { required: true } } } @@ -956,7 +947,7 @@ var stepFns = { addZone: function() { - message('Creating zone'); + message('creating.zone'); var array1 = []; var networkType = args.data.zone.networkType; //"Basic", "Advanced" @@ -1005,7 +996,7 @@ }, addPhysicalNetworks: function(args) { - message('Creating physical network(s)'); + message('creating.physical.networks'); var returnedPhysicalNetworks = []; @@ -1288,7 +1279,7 @@ //afterCreateZonePhysicalNetworkTrafficTypes: enable physical network, enable virtual router element, enable network service provider configurePhysicalNetwork: function(args) { - message('Configuring physical network(s)'); + message('configuring.physical.networks'); if(args.data.zone.networkType == "Basic") { $.ajax({ @@ -1716,7 +1707,7 @@ }, addNetscalerDevice: function(args) { - message('Adding Netscaler device'); + message('adding.Netscaler.device'); var array1 = []; array1.push("&physicalnetworkid=" + args.data.returnedBasicPhysicalNetwork.id); @@ -1897,7 +1888,7 @@ }, addPod: function(args) { - message('Creating pod'); + message('creating.pod'); var array3 = []; array3.push("&zoneId=" + args.data.returnedZone.id); @@ -1931,7 +1922,8 @@ configurePublicTraffic: function(args) { if((args.data.zone.networkType == "Basic" && (selectedNetworkOfferingHavingSG == true && selectedNetworkOfferingHavingEIP == true && selectedNetworkOfferingHavingELB == true)) ||(args.data.zone.networkType == "Advanced")) { - message('Configuring public traffic'); + + message('configuring.public.traffic'); var stopNow = false; @@ -2017,7 +2009,7 @@ return complete({}); } - message('Configuring storage traffic'); + message('configuring.storage.traffic'); var storageIPRanges = args.data.storageTraffic; var tasks = []; @@ -2096,7 +2088,7 @@ }, configureGuestTraffic: function(args) { - message('Configuring guest traffic'); + message('configuring.guest.traffic'); if(args.data.returnedZone.networktype == "Basic") { //create an VlanIpRange for guest network in basic zone var array1 = []; @@ -2199,7 +2191,7 @@ }, addCluster: function(args) { - message('Creating cluster'); + message('creating.cluster'); var array1 = []; array1.push("&zoneId=" + args.data.returnedZone.id); @@ -2263,7 +2255,7 @@ }, addHost: function(args) { - message('Adding host'); + message('adding.host'); var array1 = []; array1.push("&zoneid=" + args.data.returnedZone.id); @@ -2336,7 +2328,7 @@ return; } - message('Creating primary storage'); + message('creating.primary.storage'); var array1 = []; array1.push("&zoneid=" + args.data.returnedZone.id); @@ -2426,7 +2418,7 @@ }, addSecondaryStorage: function(args) { - message('Creating secondary storage'); + message('creating.secondary.storage'); var nfs_server = args.data.secondaryStorage.nfsServer; var path = args.data.secondaryStorage.path; @@ -2451,7 +2443,7 @@ }; var complete = function(args) { - message('Zone creation complete!'); + message('Zone.creation.complete'); success(args); };