cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/master to a49e240
Date Fri, 14 Nov 2014 19:52:13 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master fd03091c8 -> a49e24095


CLOUDSTACK-7645: Use the localization function _l() instead of dictionary directly


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a49e2409
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a49e2409
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a49e2409

Branch: refs/heads/master
Commit: a49e24095850980ed008d9be8b4c5430977297dc
Parents: fd03091
Author: Mihaela Stoica <mihaela.stoica@citrix.com>
Authored: Tue Nov 4 16:53:36 2014 +0000
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Fri Nov 14 11:51:40 2014 -0800

----------------------------------------------------------------------
 ui/scripts/configuration.js        | 48 ++++++++++++++++-----------------
 ui/scripts/installWizard.js        |  4 +--
 ui/scripts/instances.js            |  4 +--
 ui/scripts/system.js               | 24 ++++++++---------
 ui/scripts/ui-custom/zoneWizard.js | 10 +++----
 ui/scripts/zoneWizard.js           | 32 +++++++++++-----------
 6 files changed, 61 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 2a9829d..c2d00ec 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -1060,15 +1060,15 @@
                                             var items = [];
                                             items.push({
                                                 id: 'domainrouter',
-                                                description: dictionary['label.domain.router']
+                                                description: _l('label.domain.router')
                                             });
                                             items.push({
                                                 id: 'consoleproxy',
-                                                description: dictionary['label.console.proxy']
+                                                description: _l('label.console.proxy')
                                             });
                                             items.push({
                                                 id: 'secondarystoragevm',
-                                                description: dictionary['label.secondary.storage.vm']
+                                                description: _l('label.secondary.storage.vm')
                                             });
                                             args.response.success({
                                                 data: items
@@ -1435,13 +1435,13 @@
                                             var text = '';
                                             switch (args) {
                                                 case 'domainrouter':
-                                                    text = dictionary['label.domain.router'];
+                                                    text = _l('label.domain.router');
                                                     break;
                                                 case 'consoleproxy':
-                                                    text = dictionary['label.console.proxy'];
+                                                    text = _l('label.console.proxy');
                                                     break;
                                                 case 'secondarystoragevm':
-                                                    text = dictionary['label.secondary.storage.vm'];
+                                                    text = _l('label.secondary.storage.vm');
                                                     break;
                                             }
                                             return text;
@@ -2679,34 +2679,34 @@
                                                         // Sanitize names
                                                         switch (serviceName) {
                                                             case 'Vpn':
-                                                                serviceDisplayName = dictionary['label.vpn'];
+                                                                serviceDisplayName = _l('label.vpn');
                                                                 break;
                                                             case 'Dhcp':
-                                                                serviceDisplayName = dictionary['label.dhcp'];
+                                                                serviceDisplayName = _l('label.dhcp');
                                                                 break;
                                                             case 'Dns':
-                                                                serviceDisplayName = dictionary['label.dns'];
+                                                                serviceDisplayName = _l('label.dns');
                                                                 break;
                                                             case 'Lb':
-                                                                serviceDisplayName = dictionary['label.load.balancer'];
+                                                                serviceDisplayName = _l('label.load.balancer');
                                                                 break;
                                                             case 'SourceNat':
-                                                                serviceDisplayName = dictionary['label.source.nat'];
+                                                                serviceDisplayName = _l('label.source.nat');
                                                                 break;
                                                             case 'StaticNat':
-                                                                serviceDisplayName = dictionary['label.static.nat'];
+                                                                serviceDisplayName = _l('label.static.nat');
                                                                 break;
                                                             case 'PortForwarding':
-                                                                serviceDisplayName = dictionary['label.port.forwarding'];
+                                                                serviceDisplayName = _l('label.port.forwarding');
                                                                 break;
                                                             case 'SecurityGroup':
-                                                                serviceDisplayName = dictionary['label.security.groups'];
+                                                                serviceDisplayName = _l('label.security.groups');
                                                                 break;
                                                             case 'UserData':
-                                                                serviceDisplayName = dictionary['label.user.data'];
+                                                                serviceDisplayName = _l('label.user.data');
                                                                 break;
                                                             case 'Connectivity':
-                                                                serviceDisplayName = dictionary['label.virtual.networking'];
+                                                                serviceDisplayName = _l('label.virtual.networking');
                                                                 break;
                                                             default:
                                                                 serviceDisplayName = serviceName;
@@ -3632,28 +3632,28 @@
                                                 // Sanitize names
                                                 switch (serviceName) {
                                                     case 'Vpn':
-                                                        serviceDisplayName = dictionary['label.vpn'];
+                                                        serviceDisplayName = _l('label.vpn');
                                                         break;
                                                     case 'Dhcp':
-                                                        serviceDisplayName = dictionary['label.dhcp'];
+                                                        serviceDisplayName = _l('label.dhcp');
                                                         break;
                                                     case 'Dns':
-                                                        serviceDisplayName = dictionary['label.dns'];
+                                                        serviceDisplayName = _l('label.dns');
                                                         break;
                                                     case 'Lb':
-                                                        serviceDisplayName = dictionary['label.load.balancer'];
+                                                        serviceDisplayName = _l('label.load.balancer');
                                                         break;
                                                     case 'SourceNat':
-                                                        serviceDisplayName = dictionary['label.source.nat'];
+                                                        serviceDisplayName = _l('label.source.nat');
                                                         break;
                                                     case 'StaticNat':
-                                                        serviceDisplayName = dictionary['label.static.nat'];
+                                                        serviceDisplayName = _l('label.static.nat');
                                                         break;
                                                     case 'PortForwarding':
-                                                        serviceDisplayName = dictionary['label.port.forwarding'];
+                                                        serviceDisplayName = _l('label.port.forwarding');
                                                         break;
                                                     case 'UserData':
-                                                        serviceDisplayName = dictionary['label.user.data'];
+                                                        serviceDisplayName = _l('label.user.data');
                                                         break;
                                                     default:
                                                         serviceDisplayName = serviceName;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/installWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/installWizard.js b/ui/scripts/installWizard.js
index 85eaff0..535f89f 100644
--- a/ui/scripts/installWizard.js
+++ b/ui/scripts/installWizard.js
@@ -287,7 +287,7 @@
                 response: {
                     success: function(args) {
                         var enableZone = function() {
-                            message(dictionary['message.enabling.zone.dots']);
+                            message(_l('message.enabling.zone.dots'));
                             cloudStack.zoneWizard.enableZoneAction({
                                 data: args.data,
                                 formData: args.data,
@@ -302,7 +302,7 @@
 
                         var pollSystemVMs = function() {
                             // Poll System VMs, then enable zone
-                            message(dictionary['message.creating.systemVM']);
+                            message(_l('message.creating.systemVM'));
                             var poll = setInterval(function() {
                                 $.ajax({
                                     url: createURL('listSystemVms'),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 0caaa39..11aa725 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1319,7 +1319,7 @@
                                                     });
                                                 } else {
                                                     cloudStack.dialog.notice({
-                                                        message: _l(dictionary['message.no.host.available'])
+                                                        message: _l('message.no.host.available')
                                                     }); //Only a single host in the set up
                                                 }
                                             }
@@ -2046,7 +2046,7 @@
                                                 }
                                             });
                                             cloudStack.dialog.notice({
-                                                message: _l(dictionary['message.set.default.NIC.manual'])
+                                                message: _l('message.set.default.NIC.manual')
                                             });
                                         }
                                     });

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c341db9..672a6a2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -128,34 +128,34 @@
         });
         
         if (trafficType.xenservernetworklabel == null || trafficType.xenservernetworklabel
== 0)
-        trafficType.xenservernetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.xenservernetworklabel = _l( 'label.network.label.display.for.blank.value');
         if (trafficType.kvmnetworklabel == null || trafficType.kvmnetworklabel == 0)
-        trafficType.kvmnetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.kvmnetworklabel = _l( 'label.network.label.display.for.blank.value');
         if (trafficType.vmwarenetworklabel == null || trafficType.vmwarenetworklabel == 0)
-        trafficType.vmwarenetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.vmwarenetworklabel = _l( 'label.network.label.display.for.blank.value');
         if (trafficType.ovmnetworklabel == null || trafficType.ovmnetworklabel == 0)
-        trafficType.ovmnetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.ovmnetworklabel = _l( 'label.network.label.display.for.blank.value');
         if (trafficType.lxcnetworklabel == null || trafficType.lxcnetworklabel == 0)
-        trafficType.lxcnetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.lxcnetworklabel = _l( 'label.network.label.display.for.blank.value');
         if (trafficType.hypervnetworklabel == null || trafficType.hypervnetworklabel == 0)
-        trafficType.hypervnetworklabel = dictionary[ 'label.network.label.display.for.blank.value'];
+        trafficType.hypervnetworklabel = _l( 'label.network.label.display.for.blank.value');
         
         return trafficType;
     };
     
     var updateTrafficLabels = function (trafficType, labels, complete) {
         var array1 =[];
-        if (labels.xenservernetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.xenservernetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&xenservernetworklabel=" + labels.xenservernetworklabel);
-        if (labels.kvmnetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.kvmnetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&kvmnetworklabel=" + labels.kvmnetworklabel);
-        if (labels.vmwarenetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.vmwarenetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&vmwarenetworklabel=" + labels.vmwarenetworklabel);
-        if (labels.ovmnetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.ovmnetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&ovmnetworklabel=" + labels.ovmnetworklabel);
-        if (labels.lxcnetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.lxcnetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&lxcnetworklabel=" + labels.lxcnetworklabel);
-        if (labels.hypervnetworklabel != dictionary[ 'label.network.label.display.for.blank.value'])
+        if (labels.hypervnetworklabel != _l( 'label.network.label.display.for.blank.value'))
         array1.push("&hypervnetworklabel=" + labels.hypervnetworklabel);
         
         $.ajax({

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index 2c17f60..02552f9 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -177,7 +177,7 @@
             }
 
             cloudStack.dialog.notice({
-                message: dictionary['message.please.add.at.lease.one.traffic.range']
+                message: _l('message.please.add.at.lease.one.traffic.range')
             });
             return false;
         },
@@ -1038,7 +1038,7 @@
                             };
 
                             var enableZone = function() {
-                                makeMessage(dictionary['message.enabling.zone']);
+                                makeMessage(_l('message.enabling.zone'));
 
                                 enableZoneAction({
                                     formData: data,
@@ -1051,7 +1051,7 @@
 
                                         error: function(message) {
                                             cloudStack.dialog.notice({
-                                                message: dictionary['error.could.not.enable.zone']
+ ':</br>' + message
+                                                message: _l('error.could.not.enable.zone')
+ ':</br>' + message
                                             });
                                         }
                                     }
@@ -1059,7 +1059,7 @@
                             };
 
                             cloudStack.dialog.confirm({
-                                message: dictionary['message.zone.creation.complete.would.you.like.to.enable.this.zone'],
+                                message: _l('message.zone.creation.complete.would.you.like.to.enable.this.zone'),
                                 action: function() {
                                     enableZone();
                                 },
@@ -1083,7 +1083,7 @@
                                 .removeClass('final')
                                 .html('<span>Fix errors</span>')
                                 .click(goNextOverride);
-                            makeMessage(dictionary['error.something.went.wrong.please.correct.the.following']
+ ':<br/>' + message, true);
+                            makeMessage(_l('error.something.went.wrong.please.correct.the.following')
+ ':<br/>' + message, true);
                             $wizard.data('startfn', start);
                         },
                         message: makeMessage

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a49e2409/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 9fccb8b..9461081 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -2372,7 +2372,7 @@
                 },
 
                 addPhysicalNetworks: function(args) {
-                    message(dictionary['message.creating.physical.networks']);
+                    message(_l('message.creating.physical.networks'));
 
                     var returnedPhysicalNetworks = [];
 
@@ -2711,7 +2711,7 @@
 
                 //afterCreateZonePhysicalNetworkTrafficTypes: enable physical network, enable
virtual router element, enable network service provider
                 configurePhysicalNetwork: function(args) {
-                    message(dictionary['message.configuring.physical.networks']);
+                    message(_l('message.configuring.physical.networks'));
 
                     if (args.data.zone.networkType == "Basic") {
                         $.ajax({
@@ -2866,7 +2866,7 @@
                                                                                         
                       selectedNetworkOfferingHavingSG = args.data.pluginFrom.selectedNetworkOfferingHavingSG;
                                                                                         
                   }
                                                                                         
                   if (selectedNetworkOfferingHavingSG == true) { //need to Enable security
group provider first
-                                                                                        
                       message(dictionary['message.enabling.security.group.provider']);
+                                                                                        
                       message(_l('message.enabling.security.group.provider'));
 
                                                                                         
                       // get network service provider ID of Security Group
                                                                                         
                       var securityGroupProviderId;
@@ -3589,7 +3589,7 @@
                                                             });
                                                             // ***** VPC Virtual Router *****
(end) *****
                                                         } else { //args.data.zone.sgEnabled
== true  //Advanced SG-enabled zone                                                      
  
-                                                            message(dictionary['message.enabling.security.group.provider']);
+                                                            message(_l('message.enabling.security.group.provider'));
 
                                                             // get network service provider
ID of Security Group
                                                             var securityGroupProviderId;
@@ -3660,7 +3660,7 @@
                 addNetscalerProvider: function(args) {
 
                     if (selectedNetworkOfferingHavingNetscaler == true) {
-                        message(dictionary['message.adding.Netscaler.provider']);
+                        message(_l('message.adding.Netscaler.provider'));
 
                         $.ajax({
                             url: createURL("addNetworkServiceProvider&name=Netscaler&physicalnetworkid="
+ args.data.returnedBasicPhysicalNetwork.id),
@@ -3707,7 +3707,7 @@
 
 
                 addNetscalerDevice: function(args) {
-                    message(dictionary['message.adding.Netscaler.device']);
+                    message(_l('message.adding.Netscaler.device'));
 
                     var array1 = [];
                     array1.push("&physicalnetworkid=" + args.data.returnedBasicPhysicalNetwork.id);
@@ -3867,7 +3867,7 @@
                 },
 
                 addGuestNetwork: function(args) { //create a guest network for Basic zone
or Advanced zone with SG
-                    message(dictionary['message.creating.guest.network']);
+                    message(_l('message.creating.guest.network'));
 
                     var data = {
                         zoneid: args.data.returnedZone.id,
@@ -3911,7 +3911,7 @@
                 },
 
                 addPod: function(args) {
-                    message(dictionary['message.creating.pod']);
+                    message(_l('message.creating.pod'));
 
                     var array3 = [];
                     array3.push("&zoneId=" + args.data.returnedZone.id);
@@ -3948,7 +3948,7 @@
                 configurePublicTraffic: function(args) {
                     if ((args.data.zone.networkType == "Basic" && (selectedNetworkOfferingHavingSG
== true && selectedNetworkOfferingHavingEIP == true && selectedNetworkOfferingHavingELB
== true)) || (args.data.zone.networkType == "Advanced" && args.data.zone.sgEnabled
!= true)) {
 
-                        message(dictionary['message.configuring.public.traffic']);
+                        message(_l('message.configuring.public.traffic'));
 
                         var stopNow = false;
 
@@ -4054,7 +4054,7 @@
                         return complete({});
                     }
 
-                    message(dictionary['message.configuring.storage.traffic']);
+                    message(_l('message.configuring.storage.traffic'));
 
                     var storageIPRanges = args.data.storageTraffic;
                     var tasks = [];
@@ -4144,7 +4144,7 @@
                         return;
                     }
 
-                    message(dictionary['message.configuring.guest.traffic']);
+                    message(_l('message.configuring.guest.traffic'));
 
                     if (args.data.returnedZone.networktype == "Basic") { //create an VlanIpRange
for guest network in basic zone
                         var array1 = [];
@@ -4261,7 +4261,7 @@
                 },
 
                 addCluster: function(args) {
-                    message(dictionary['message.creating.cluster']);
+                    message(_l('message.creating.cluster'));
 
                     // Have cluster use zone's hypervisor
                     args.data.cluster.hypervisor = args.data.zone.hypervisor ?
@@ -4403,7 +4403,7 @@
                 },
 
                 addHost: function(args) {
-                    message(dictionary['message.adding.host']);
+                    message(_l('message.adding.host'));
 
                     var data = {
                         zoneid: args.data.returnedZone.id,
@@ -4470,7 +4470,7 @@
                         return;
                     }
 
-                    message(dictionary['message.creating.primary.storage']);
+                    message(_l('message.creating.primary.storage'));
 
                     var array1 = [];
                     array1.push("&zoneid=" + args.data.returnedZone.id);
@@ -4566,7 +4566,7 @@
                 	}
                 	
                 	
-                	message(dictionary['message.creating.secondary.storage']);
+                	message(_l('message.creating.secondary.storage'));
 
                     var data = {};
                     if (args.data.secondaryStorage.name != null && args.data.secondaryStorage.name.length
> 0) {
@@ -4775,7 +4775,7 @@
             };
 
             var complete = function(args) {
-                message(dictionary['message.Zone.creation.complete']);
+                message(_l('message.Zone.creation.complete'));
                 success(args);
             };
 


Mime
View raw message