From 3f2bbee9c395d5a452cfacdb2602ff895cedf21e Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 16 Feb 2012 11:23:04 -0800 Subject: [PATCH] cloudstack 3.0 new UI - localize messages during zone creation. --- .../classes/resources/messages.properties | 33 ++++++++++++ .../classes/resources/messages_ja.properties | 32 +++++++++++ ui/index.jsp | 33 ++++++++++++ ui/scripts/ui-custom/zoneWizard.js | 22 ++++++++ ui/scripts/zoneWizard.js | 53 +++++++++++++++++++ 5 files changed, 173 insertions(+) diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 11e9a5c4a6f..b829c0470a8 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -2552,6 +2552,39 @@ resource.state=Resource state ======= LUN.number=LUN # confirm.remove.IP.range=Please confirm that you would like to remove this IP range. +<<<<<<< HEAD +======= +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 +message.enabling.zone=Enabling zone +error.something.went.wrong.please.correct.the.following=Something went wrong; please correct the following +error.could.not.enable.zone=Could not enable zone +message.zone.creation.complete.would.you.like.to.enable.this.zone=Zone creation complete. Would you like to enable this zone? +message.please.add.at.lease.one.traffic.range=Please add at lease one traffic range. +message.you.must.have.at.least.one.physical.network=You must have at least one physical network +message.please.select.a.different.public.and.management.network.before.removing=Please select a different public and management network before removing + +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties index 32b71e492ef..68a45f6ef29 100644 --- a/client/WEB-INF/classes/resources/messages_ja.properties +++ b/client/WEB-INF/classes/resources/messages_ja.properties @@ -1694,5 +1694,37 @@ resource.state=リソースの状態 ======= LUN.number=LUN # confirm.remove.IP.range=あなたがこのIPアドレス範囲の削除を希望することを確認してください。 +<<<<<<< HEAD >>>>>>> 50fadb4... cloudstack 3.0 new UI - system page - localize primary storage section. +======= +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=完全なゾーンの作成 +message.enabling.zone=Enabling zone +error.something.went.wrong.please.correct.the.following=Something went wrong; please correct the following +error.could.not.enable.zone=Could not enable zone +message.zone.creation.complete.would.you.like.to.enable.this.zone=Zone creation complete. Would you like to enable this zone? +message.please.add.at.lease.one.traffic.range=Please add at lease one traffic range. +message.you.must.have.at.least.one.physical.network=You must have at least one physical network +message.please.select.a.different.public.and.management.network.before.removing=Please select a different public and management network before removing +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. diff --git a/ui/index.jsp b/ui/index.jsp index 1e0e701bdfd..b7323f38eac 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -3033,7 +3033,40 @@ dictionary = { >>>>>>> 50fadb4... cloudstack 3.0 new UI - system page - localize primary storage section. ======= 'LUN.number': '', +<<<<<<< HEAD 'confirm.remove.IP.range': '' >>>>>>> 0341d00... cloudstack 3.0 new UI - system page - localize IP Ranges sections. +======= +'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': '', +'message.enabling.zone': '', +'error.something.went.wrong.please.correct.the.following': '', +'error.could.not.enable.zone': '', +'message.zone.creation.complete.would.you.like.to.enable.this.zone': '', +'message.please.add.at.lease.one.traffic.range': '', +'message.you.must.have.at.least.one.physical.network': '', +'message.please.select.a.different.public.and.management.network.before.removing': '' +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. }; diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js index f1dc1a06eaf..d9999750db4 100644 --- a/ui/scripts/ui-custom/zoneWizard.js +++ b/ui/scripts/ui-custom/zoneWizard.js @@ -679,8 +679,30 @@ var $container = $physicalNetworkItem.closest('.setup-physical-network .content.input-area form'); var $trafficTypes = $physicalNetworkItem.find('li.traffic-type-draggable'); +<<<<<<< HEAD $trafficTypes.each(function() { var trafficTypeID = $(this).attr('traffic-type-id'); +======= + if (!$item.siblings().size()) { + cloudStack.dialog.notice({ + message: dictionary['message.you.must.have.at.least.one.physical.network'] + }); + } else if ($item.find('input[type=radio]:checked').size()) { + cloudStack.dialog.notice({ + message: dictionary['message.please.select.a.different.public.and.management.network.before.removing'] + }); + } else { + // Put any traffic type symbols back in original container + $item.find('li.traffic-type-draggable').each(function() { + var $draggable = $(this); + var $originalContainer = $('.traffic-types-drag-area:visible > ul > li') + .filter(function() { + return $(this).hasClass($draggable.attr('traffic-type-id')); + }); + + $draggable.appendTo($item.prev()); + }); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. physicalNetwork.assignTrafficType( trafficTypeID, diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index e5abac69c7f..4a9349f9070 100644 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -1411,6 +1411,7 @@ var data = args.data; var stepFns = { +<<<<<<< HEAD <<<<<<< HEAD addZone: function() { message(dictionary['message.creating.zone']); @@ -1418,6 +1419,10 @@ addZone: function() { message('Creating zone'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + addZone: function() { + message(dictionary['creating.zone']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array1 = []; var networkType = args.data.zone.networkType; //"Basic", "Advanced" @@ -1474,11 +1479,15 @@ }, addPhysicalNetworks: function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.creating.physical.networks']); ======= message('Creating physical network(s)'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['creating.physical.networks']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var returnedPhysicalNetworks = []; @@ -1946,6 +1955,7 @@ //afterCreateZonePhysicalNetworkTrafficTypes: enable physical network, enable virtual router element, enable network service provider configurePhysicalNetwork: function(args) { +<<<<<<< HEAD message(dictionary['message.configuring.physical.networks']); if(args.data.zone.networkType == "Basic") { @@ -2361,6 +2371,9 @@ //afterCreateZonePhysicalNetworkTrafficTypes: enable physical network, enable virtual router element, enable network service provider configurePhysicalNetwork: function(args) { message('Configuring physical network(s)'); +======= + message(dictionary['configuring.physical.networks']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. if(args.data.zone.networkType == "Basic") { $.ajax({ @@ -2788,8 +2801,12 @@ }, addNetscalerDevice: function(args) { +<<<<<<< HEAD message('Adding Netscaler device'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['adding.Netscaler.device']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array1 = []; array1.push("&physicalnetworkid=" + args.data.returnedBasicPhysicalNetwork.id); @@ -3016,8 +3033,12 @@ ======= addPod: function(args) { +<<<<<<< HEAD message('Creating pod'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['creating.pod']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array3 = []; array3.push("&zoneId=" + args.data.returnedZone.id); @@ -3053,10 +3074,14 @@ ||(args.data.zone.networkType == "Advanced")) { <<<<<<< HEAD +<<<<<<< HEAD message(dictionary['message.configuring.public.traffic']); ======= message('Configuring public traffic'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['configuring.public.traffic']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var stopNow = false; @@ -3161,8 +3186,12 @@ return complete({}); } +<<<<<<< HEAD message('Configuring storage traffic'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['configuring.storage.traffic']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var storageIPRanges = args.data.storageTraffic; var tasks = []; @@ -3241,11 +3270,15 @@ }, configureGuestTraffic: function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.configuring.guest.traffic']); ======= message('Configuring guest traffic'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['configuring.guest.traffic']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. if(args.data.returnedZone.networktype == "Basic") { //create an VlanIpRange for guest network in basic zone var array1 = []; @@ -3352,6 +3385,7 @@ }, addCluster: function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.creating.cluster']); @@ -3361,6 +3395,9 @@ ======= message('Creating cluster'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['creating.cluster']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array1 = []; array1.push("&zoneId=" + args.data.returnedZone.id); @@ -3428,11 +3465,15 @@ }, addHost: function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.adding.host']); ======= message('Adding host'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['adding.host']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array1 = []; array1.push("&zoneid=" + args.data.returnedZone.id); @@ -3540,11 +3581,15 @@ return; } +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.creating.primary.storage']); ======= message('Creating primary storage'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['creating.primary.storage']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var array1 = []; array1.push("&zoneid=" + args.data.returnedZone.id); @@ -3638,11 +3683,15 @@ }, addSecondaryStorage: function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.creating.secondary.storage']); ======= message('Creating secondary storage'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['creating.secondary.storage']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. var nfs_server = args.data.secondaryStorage.nfsServer; var path = args.data.secondaryStorage.path; @@ -3667,11 +3716,15 @@ }; var complete = function(args) { +<<<<<<< HEAD <<<<<<< HEAD message(dictionary['message.Zone.creation.complete']); ======= message('Zone creation complete!'); >>>>>>> 5c06960... bug 13743: New zone wizard step -- configure storage traffic +======= + message(dictionary['Zone.creation.complete']); +>>>>>>> 68f12d9... cloudstack 3.0 new UI - localize messages during zone creation. success(args); };