Repository: cloudstack
Updated Branches:
  refs/heads/master 1091d4580 -> 66e805cba


Fixes: Hardcoded strings externalized from various JS files.

Signed-off-by: vetrivelc <vetrivel.chinnas...@citrix.com>


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

Branch: refs/heads/master
Commit: 66e805cba92f6b99befc5caed583903fe7066c15
Parents: 1091d45
Author: vetrivelc <vetrivel.chinnas...@citrix.com>
Authored: Fri Nov 21 19:28:01 2014 +0530
Committer: Brian Federle <brian.fede...@citrix.com>
Committed: Fri Nov 21 08:02:49 2014 -0800

----------------------------------------------------------------------
 .../classes/resources/messages.properties       | 23 +++++++++++-
 systemvm/js/cloud.logger.js                     |  2 +-
 tools/ngui/static/js/app/storage/storage.js     | 18 +++++-----
 ui/dictionary2.jsp                              | 21 +++++++++++
 ui/scripts/configuration.js                     | 14 ++++----
 ui/scripts/globalSettings.js                    | 16 ++++-----
 ui/scripts/regions.js                           |  4 +--
 ui/scripts/storage.js                           |  2 +-
 ui/scripts/system.js                            | 38 ++++++++++----------
 ui/scripts/templates.js                         | 12 +++----
 ui/scripts/vpc.js                               |  4 +--
 11 files changed, 98 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties 
b/client/WEB-INF/classes/resources/messages.properties
index 9c2c4d7..580c9a6 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -2053,4 +2053,25 @@ state.Suspended=Suspended
 ui.listView.filters.all=All
 ui.listView.filters.mine=Mine
 label.na=N/A
-label.added.network.offering=Added network offering
\ No newline at end of file
+label.added.network.offering=Added network offering
+hint.type.part.storage.tag=Type in part of a storage tag
+hint.type.part.host.tag=Type in part of a host tag
+hint.no.storage.tags=No storage tags found
+hint.no.host.tags=No host tags found
+label.availabilityZone=availabilityZone
+label.diskoffering=diskoffering
+title.upload.volume=Upload Volume
+label.format.lower=format
+label.checksum=checksum
+label.assign.vms=Assign VMs
+label.extractable.lower=extractable
+label.globo.dns=GloboDNS
+label.add.globo.dns=Add GloboDNS
+label.globo.dns.configuration=GloboDNS Configuration
+label.region.details=Region details
+label.baremetal.rack.configuration=Baremetal Rack Configuration
+label.add.baremetal.rack.configuration=Add Baremetal Rack Configuration
+label.delete.baremetal.rack.configuration=Delete Baremetal Rack Configuration
+message.confirm.delete.baremetal.rack.configuration=Please confirm that you 
want to delete Baremetal Rack Configuration.
+message.added.new.nuage.vsp.controller=Added new Nuage Vsp Controller
+message.added.vpc.offering=Added VPC offering
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/systemvm/js/cloud.logger.js
----------------------------------------------------------------------
diff --git a/systemvm/js/cloud.logger.js b/systemvm/js/cloud.logger.js
index 751627e..5e61acc 100644
--- a/systemvm/js/cloud.logger.js
+++ b/systemvm/js/cloud.logger.js
@@ -331,7 +331,7 @@ Logger.prototype = {
                                return '' + object;
                        }
                } else {
-                       return 'N/A';
+                       return 'label.na';
                }
        }
 };

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/tools/ngui/static/js/app/storage/storage.js
----------------------------------------------------------------------
diff --git a/tools/ngui/static/js/app/storage/storage.js 
b/tools/ngui/static/js/app/storage/storage.js
index af36167..12f27da 100644
--- a/tools/ngui/static/js/app/storage/storage.js
+++ b/tools/ngui/static/js/app/storage/storage.js
@@ -53,13 +53,13 @@ angular.module("storage").controller("VolumesListCtrl", 
["$scope", "$location",
             {
                 model: 'name',
                 type: 'input-text',
-                label: 'name',
+                label: 'label.name.lower',
                 required: true
             },
             {
                 model: 'zoneid',
                 type: 'select',
-                label: 'availabilityZone',
+                label: 'label.availabilityZone',
                 options: Zones.getAll,
                 getValue: function(model){
                     return model.id;
@@ -71,7 +71,7 @@ angular.module("storage").controller("VolumesListCtrl", 
["$scope", "$location",
             {
                 model: 'diskofferingid',
                 type: 'select',
-                label: 'diskoffering',
+                label: 'label.diskoffering',
                 options: DiskOfferings.getAll,
                 getValue: function(model){
                     return model.id;
@@ -84,18 +84,18 @@ angular.module("storage").controller("VolumesListCtrl", 
["$scope", "$location",
     };
 
     $scope.uploadVolumeForm = {
-        title: 'Upload Volume',
+        title: 'title.upload.volume',
         onSubmit: Volumes.getAll,
         fields: [
             {
                 model: 'name',
                 type: 'input-text',
-                label: 'name',
+                label: 'label.name.lower',
             },
             {
                 model: 'zoneid',
                 type: 'select',
-                label: 'availabilityZone',
+                label: 'label.availabilityZone',
                 options: Zones.getAll,
                 getValue: function(model){
                     return model.id;
@@ -107,7 +107,7 @@ angular.module("storage").controller("VolumesListCtrl", 
["$scope", "$location",
             {
                 model: 'format',
                 type: 'select',
-                label: 'format',
+                label: 'label.format.lower',
                 options: function(){
                     return ['RAW', 'VHD', 'OVA', 'QCOW2'];
                 },
@@ -121,12 +121,12 @@ angular.module("storage").controller("VolumesListCtrl", 
["$scope", "$location",
             {
                 model: 'url',
                 type: 'input-text',
-                label: 'url'
+                label: 'label.url'
             },
             {
                 model: 'checksum',
                 type: 'input-text',
-                label: 'checksum'
+                label: 'label.checksum'
             }
         ],
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/dictionary2.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary2.jsp b/ui/dictionary2.jsp
index 7bc8c37..7b91635 100644
--- a/ui/dictionary2.jsp
+++ b/ui/dictionary2.jsp
@@ -1013,5 +1013,26 @@ $.extend(dictionary, {
 'label.na': '<fmt:message key="label.na" />',
 'label.migrate.volume': '<fmt:message key="label.migrate.volume" />',
 'label.added.network.offering': '<fmt:message 
key="label.added.network.offering" />',
+'hint.type.part.storage.tag': '<fmt:message key="hint.type.part.storage.tag" 
/>',
+'hint.type.part.host.tag': '<fmt:message key="hint.type.part.host.tag" />',
+'hint.no.storage.tags': '<fmt:message key="hint.no.storage.tags" />',
+'hint.no.host.tags': '<fmt:message key="hint.no.host.tags" />',
+'label.availabilityZone': '<fmt:message key="label.availabilityZone" />',
+'label.diskoffering': '<fmt:message key="label.diskoffering" />',
+'title.upload.volume': '<fmt:message key="title.upload.volume" />',
+'label.format.lower': '<fmt:message key="label.format.lower" />',
+'label.checksum': '<fmt:message key="label.checksum" />',
+'label.assign.vms': '<fmt:message key="label.assign.vms" />',
+'label.extractable.lower': '<fmt:message key="label.extractable.lower" />',
+'label.globo.dns': '<fmt:message key="label.globo.dns" />',
+'label.add.globo.dns': '<fmt:message key="label.add.globo.dns" />',
+'label.globo.dns.configuration': '<fmt:message 
key="label.globo.dns.configuration" />',
+'label.region.details': '<fmt:message key="label.region.details" />',
+'label.baremetal.rack.configuration': '<fmt:message 
key="label.baremetal.rack.configuration" />',
+'label.add.baremetal.rack.configuration': '<fmt:message 
key="label.add.baremetal.rack.configuration" />',
+'label.delete.baremetal.rack.configuration': '<fmt:message 
key="label.delete.baremetal.rack.configuration" />',
+'message.confirm.delete.baremetal.rack.configuration': '<fmt:message 
key="message.confirm.delete.baremetal.rack.configuration" />',
+'message.added.new.nuage.vsp.controller': '<fmt:message 
key="message.added.new.nuage.vsp.controller" />',
+'message.added.vpc.offering': '<fmt:message key="message.added.vpc.offering" 
/>',
 });
 </script>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index 763d86b..0e673b3 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -327,8 +327,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a storage tag",
-                                                        noResultsText: "No 
storage tags found"
+                                                        hintText: 
_l('hint.type.part.storage.tag'),
+                                                        noResultsText: 
_l('hint.no.storage.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -363,8 +363,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a host tag",
-                                                        noResultsText: "No 
host tags found"
+                                                        hintText: 
_l('hint.type.part.host.tag'),
+                                                        noResultsText: 
_l('hint.no.host.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -1852,8 +1852,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a storage tag",
-                                                        noResultsText: "No 
storage tags found"
+                                                        hintText: 
_l('hint.type.part.storage.tag'),
+                                                        noResultsText: 
_l('hint.no.storage.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -3792,7 +3792,7 @@
 
                             messages: {
                                 notification: function(args) {
-                                    return 'Added VPC offering';
+                                    return 'message.added.vpc.offering';
                                 }
                             }
                         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/globalSettings.js
----------------------------------------------------------------------
diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js
index 702799c..2b1fe5c 100644
--- a/ui/scripts/globalSettings.js
+++ b/ui/scripts/globalSettings.js
@@ -237,10 +237,10 @@
             },    
             baremetalRct: {
                 type: 'select',
-                title: 'Baremetal Rack Configuration',
+                title: 'label.baremetal.rack.configuration',
                 listView: {
                     id: 'baremetalRct',
-                    label: 'Baremetal Rack Configuration',
+                    label: 'label.baremetal.rack.configuration',
                     fields: {   
                        id: {
                                label: 'label.id'
@@ -263,14 +263,14 @@
                     },
                     actions: {
                         add: {
-                            label: 'Add Baremetal Rack Configuration',
+                            label: 'label.add.baremetal.rack.configuration',
                             messages: {                                
                                 notification: function(args) {
-                                    return 'Add Baremetal Rack Configuration';
+                                    return 
'label.add.baremetal.rack.configuration';
                                 }
                             },
                             createForm: {
-                                title: 'Add Baremetal Rack Configuration',
+                                title: 
'label.add.baremetal.rack.configuration',
                                 fields: {
                                     url: {
                                         label: 'label.url',
@@ -309,13 +309,13 @@
                        name: "details",
                        actions: {
                                remove: {
-                                label: 'Delete Baremetal Rack Configuration',
+                                label: 
'label.delete.baremetal.rack.configuration',
                                 messages: {
                                     confirm: function(args) {
-                                        return 'Please confirm that you want 
to delete Baremetal Rack Configuration.';
+                                        return 
'message.confirm.delete.baremetal.rack.configuration';
                                     },
                                     notification: function(args) {
-                                        return 'Delete Baremetal Rack 
Configuration';
+                                        return 
'label.delete.baremetal.rack.configuration';
                                     }
                                 },
                                 action: function(args) {                       
                

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 4899c92..950a238 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -143,10 +143,10 @@
                         });
                     },
                     detailView: {
-                        name: 'Region details',
+                        name: 'label.region.details',
                         viewAll: [{
                             path: 'regions.GSLB',
-                            label: 'GSLB'
+                            label: 'label.gslb'
                         }, {
                             path: 'network.vpc',
                             label: 'label.regionlevelvpc'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index e628c61..3608f4d 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -1515,7 +1515,7 @@
                                         label: 'label.status'
                                     },
                                     diskofferingdisplaytext: {
-                                       label: 'Disk Offering'
+                                        label: 'label.disk.offering'
                                     },
                                     type: {
                                         label: 'label.type'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index c8a5bb8..b6a35a3 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -30,7 +30,7 @@
         var routerType = _l('label.menu.system');
         
         if (router.projectid) routerType = _l('label.project');
-        if (router.vpcid) routerType = 'VPC';
+        if (router.vpcid) routerType = _l('label.vpc');
         
         return $.extend(router, {
             routerType: routerType
@@ -1281,7 +1281,7 @@
                                         isEditable: true
                                     },
                                     tags: {
-                                        label: 'Tags',
+                                        label: 'label.tags',
                                         isEditable: true
                                     },
                                     broadcastdomainrange: {
@@ -7432,7 +7432,7 @@
                         isMaximized: true,
                         type: 'detailView',
                         id: 'globoDnsProvider',
-                        label: 'GloboDNS',
+                        label: 'label.globo.dns',
                         tabs: {
                             details: {
                                 title: 'label.details',
@@ -7463,26 +7463,26 @@
                         },
                         actions: {
                             add: {
-                                label: 'GloboDNS Configuration',
+                                label: 'label.globo.dns.configuration',
                                 createForm: {
-                                    title: 'GloboDNS Configuration',
+                                    title: 'label.globo.dns.configuration',
                                     preFilter: function(args) {},
                                     fields: {
                                         username: {
-                                            label: 'Username',
+                                            label: 'label.username',
                                             validation: {
                                                 required: true
                                             }
                                         },
                                         password: {
-                                            label: 'Password',
+                                            label: 'label.password',
                                             isPassword: true,
                                             validation: {
                                                 required: true
                                             }
                                         },
                                         url: {
-                                            label: 'URL',
+                                            label: 'label.url',
                                             validation: {
                                                 required: true
                                             }
@@ -7529,7 +7529,7 @@
                                 },
                                 messages: {
                                     notification: function(args) {
-                                        return 'Add GloboDNS';
+                                        return 'label.add.globo.dns';
                                     }
                                 },
                                 notification: {
@@ -12947,7 +12947,7 @@
 
                             messages: {
                                 notification: function(args) {
-                                    return 'Added new Nuage Vsp Controller';
+                                    return 
'message.added.new.nuage.vsp.controller';
                                 }
                             },
                             notification: {
@@ -15483,8 +15483,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a host tag",
-                                                        noResultsText: "No 
host tags found"
+                                                        hintText: 
_l('hint.type.part.host.tag'),
+                                                        noResultsText: 
_l('hint.no.host.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -16078,8 +16078,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a host tag",
-                                                        noResultsText: "No 
host tags found"
+                                                        hintText: 
_l('hint.type.part.host.tag'),
+                                                        noResultsText: 
_l('hint.no.host.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -17115,7 +17115,7 @@
                                         }
                                     },
                                     url: {
-                                        label: 'URL',
+                                        label: 'label.url',
                                         docID: 'helpUrl',
                                         validation: {
                                             required: false
@@ -17259,8 +17259,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a storage tag",
-                                                        noResultsText: "No 
storage tags found"
+                                                        hintText: 
_l('hint.type.part.storage.tag'),
+                                                        noResultsText: 
_l('hint.no.storage.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {
@@ -17624,8 +17624,8 @@
 
                                                     args.response.success({
                                                         data: tags,
-                                                        hintText: "Type in 
part of a storage tag",
-                                                        noResultsText: "No 
storage tags found"
+                                                        hintText: 
_l('hint.type.part.storage.tag'),
+                                                        noResultsText: 
_l('hint.no.storage.tags')
                                                     });
                                                 },
                                                 error: 
function(XMLHttpResponse) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 28145d5..deb836b 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -906,7 +906,7 @@
                                         }
                                     },
                                     isextractable: {
-                                        label: 'label.extractable',
+                                        label: 'label.extractable.lower',
                                         isBoolean: true,
                                         isEditable: function() {
                                             if (isAdmin())
@@ -1304,7 +1304,7 @@
                                                     }
                                                 },
                                                 isextractable: {
-                                                    label: 'extractable',
+                                                    label: 
'label.extractable.lower',
                                                     isBoolean: true,
                                                     isEditable: function() {
                                                         if (isAdmin())
@@ -1321,7 +1321,7 @@
                                                     converter: 
cloudStack.converters.toBooleanText
                                                 },
                                                 isdynamicallyscalable: {
-                                                    label: 'Dynamically 
Scalable',
+                                                    label: 
'label.dynamically.scalable',
                                                     isBoolean: true,
                                                     isEditable: true,
                                                     converter: 
cloudStack.converters.toBooleanText
@@ -1943,7 +1943,7 @@
                                         }
                                     },
                                     isextractable: {
-                                        label: 'label.extractable',
+                                        label: 'label.extractable.lower',
                                         isBoolean: true,
                                         isEditable: function() {
                                             if (isAdmin())
@@ -2208,7 +2208,7 @@
                                                 }
                                             }, {
                                                 id: {
-                                                    label: 'ID'
+                                                    label: 'label.id'
                                                 },
                                                 zonename: {
                                                     label: 'label.zone.name'
@@ -2241,7 +2241,7 @@
                                                     }
                                                 },
                                                 isextractable: {
-                                                    label: 'extractable',
+                                                    label: 
'label.extractable.lower',
                                                     isBoolean: true,
                                                     isEditable: function() {
                                                         if (isAdmin())

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66e805cb/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index af19d87..0770cb2 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -17,10 +17,10 @@
 (function($, cloudStack) {
     var assignVMAction = function() {
         return {
-            label: 'Assign VMs',
+            label: 'label.assign.vms',
             messages: {
                 notification: function(args) {
-                    return 'Assign VMs';
+                    return 'label.assign.vms';
                 }
             },
             needsRefresh: true,

Reply via email to