You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/09/17 22:59:32 UTC
[2/7] Fix Externalization of hard-coded label strings
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js
----------------------------------------------------------------------
diff --git a/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js b/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js
index 621c52a..dc0713f 100644
--- a/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js
+++ b/ui/modules/vnmcAsa1000v/vnmcAsa1000v.js
@@ -23,72 +23,72 @@
id: 'asa1000vDevices',
fields: {
hostname: { label: 'label.host' },
- insideportprofile: { label: 'Inside Port Profile' }
+ insideportprofile: { label: 'label.inside.port.profile' }
},
- dataProvider: function(args) {
+ dataProvider: function(args) {
$.ajax({
url: createURL('listCiscoAsa1000vResources'),
data: {
physicalnetworkid: args.context.physicalNetworks[0].id
},
- success: function(json){
- var items = json.listCiscoAsa1000vResources.CiscoAsa1000vResource;
- args.response.success({ data: items });
+ success: function(json){
+ var items = json.listCiscoAsa1000vResources.CiscoAsa1000vResource;
+ args.response.success({ data: items });
}
- });
+ });
},
-
+
actions: {
add: {
- label: 'Add CiscoASA1000v Resource',
- messages: {
+ label: 'label.add.ciscoASA1000v',
+ messages: {
notification: function(args) {
- return 'Add CiscoASA1000v Resource';
+ return 'label.add.ciscoASA1000v';
}
},
createForm: {
- title: 'Add CiscoASA1000v Resource',
+ title: 'label.add.ciscoASA1000v',
fields: {
hostname: {
- label: 'label.host',
+ label: 'label.host',
validation: { required: true }
},
insideportprofile: {
- label: 'Inside Port Profile',
+ label: 'label.inside.port.profile',
validation: { required: true }
},
clusterid: {
- label: 'label.cluster',
+ label: 'label.cluster',
validation: { required: true },
- select: function(args){
+ select: function(args){
$.ajax({
url: createURL('listClusters'),
data: {
zoneid: args.context.zones[0].id
- },
- success: function(json) {
+ },
+ success: function(json) {
var objs = json.listclustersresponse.cluster;
var items = [];
if(objs != null) {
for(var i = 0; i < objs.length; i++){
items.push({id: objs[i].id, description: objs[i].name});
}
- }
+ }
args.response.success({data: items});
}
});
}
- }
+ }
}
},
- action: function(args) {
+ action: function(args) {
var data = {
physicalnetworkid: args.context.physicalNetworks[0].id,
hostname: args.data.hostname,
insideportprofile: args.data.insideportprofile,
clusterid: args.data.clusterid
};
-
+
$.ajax({
url: createURL('addCiscoAsa1000vResource'),
data: data,
@@ -98,37 +98,37 @@
},
error: function(data) {
args.response.error(parseXMLHttpResponse(data));
- }
+ }
});
-
- },
+
+ },
notification: {
poll: function(args) {
args.complete();
}
}
}
- },
-
+ },
+
detailView: {
name: 'CiscoASA1000v details',
- actions: {
+ actions: {
remove: {
- label: 'delete CiscoASA1000v',
+ label: 'label.delete.ciscoASA1000v',
messages: {
confirm: function(args) {
- return 'Please confirm you want to delete CiscoASA1000v';
+ return 'message.confirm.delete.ciscoASA1000v';
},
notification: function(args) {
- return 'delete CiscoASA1000v';
+ return 'label.delete.ciscoASA1000v';
}
},
- action: function(args) {
+ action: function(args) {
$.ajax({
url: createURL('deleteCiscoAsa1000vResource'),
data: {
resourceid: args.context.asa1000vDevices[0].resourceid
- },
+ },
success: function(json) {
args.response.success();
},
@@ -152,31 +152,31 @@
fields: [
{
hostname: {
- label: 'label.host'
+ label: 'label.host'
}
},
{
- insideportprofile: { label: 'Inside Port Profile' },
- RESOURCE_NAME: { label: 'Resource Name' },
- resourceid: { label: 'Resource ID' }
+ insideportprofile: { label: 'label.inside.port.profile' },
+ RESOURCE_NAME: { label: 'label.resource.name' },
+ resourceid: { label: 'label.reource.id' }
}
],
- dataProvider: function(args) {
+ dataProvider: function(args) {
$.ajax({
url: createURL('listCiscoAsa1000vResources'),
data: {
resourceid: args.context.asa1000vDevices[0].resourceid
- },
- success: function(json) {
- var item = json.listCiscoAsa1000vResources.CiscoAsa1000vResource[0];
- args.response.success({ data: item });
+ },
+ success: function(json) {
+ var item = json.listCiscoAsa1000vResources.CiscoAsa1000vResource[0];
+ args.response.success({ data: item });
}
- });
+ });
}
}
}
- }
+ }
}
});
};
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
----------------------------------------------------------------------
diff --git a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
index c9295a3..4535f12 100644
--- a/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
+++ b/ui/modules/vnmcNetworkProvider/vnmcNetworkProvider.js
@@ -273,7 +273,7 @@
var vnmcProviderDetailView = {
id: 'vnmcProvider',
- label: 'VNMC',
+ label: 'label.vnmc',
viewAll: vnmcDeviceViewAll,
actions: {
add: {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index cc4624a..bb85ebf 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -22,7 +22,7 @@
title: 'label.accounts',
id: 'accounts',
sectionSelect: {
- label: 'Select View',
+ label: 'label.select-view',
preFilter: function() {
return ['accounts'];
}
@@ -93,7 +93,7 @@
},
addLdapAccount: {
- label: 'Add LDAP Account',
+ label: 'label.add.LDAP.account',
isHeader: true,
preFilter: function(args) {
//if (isAdmin() && true) { //for testing only
@@ -105,7 +105,7 @@
},
messages: {
notification: function(args) {
- return 'Add LDAP Account';
+ return 'label.add.LDAP.account';
}
},
notification: {
@@ -659,7 +659,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
accounttype: {
label: 'label.role',
@@ -1369,7 +1369,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
state: {
label: 'label.state'
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/autoscaler.js
----------------------------------------------------------------------
diff --git a/ui/scripts/autoscaler.js b/ui/scripts/autoscaler.js
index c8963fd..c0c41ba 100644
--- a/ui/scripts/autoscaler.js
+++ b/ui/scripts/autoscaler.js
@@ -532,13 +532,13 @@
},
scaleUpPolicy: {
title: 'ScaleUp Policy',
- label: 'SCALE UP POLICY',
+ label: 'label.scale.up.policy',
noSelect: true,
noHeaderActionsColumn: true,
ignoreEmptyFields: true,
fields: {
'counterid': {
- label: 'Counter',
+ label: 'label.counter',
select: function(args) {
$.ajax({
url: createURL("listCounters"),
@@ -560,7 +560,7 @@
}
},
'relationaloperator': {
- label: 'Operator',
+ label: 'label.operator',
select: function(args) {
args.response.success({
data: [{
@@ -584,7 +584,7 @@
},
'threshold': {
edit: true,
- label: 'Threshold'
+ label: 'label.threshold'
},
'add-scaleUpcondition': {
label: 'label.add',
@@ -642,7 +642,7 @@
ignoreEmptyFields: true,
fields: {
'counterid': {
- label: 'Counter',
+ label: 'label.counter',
select: function(args) {
$.ajax({
url: createURL("listCounters"),
@@ -664,7 +664,7 @@
}
},
'relationaloperator': {
- label: 'Operator',
+ label: 'label.operator',
select: function(args) {
args.response.success({
data: [{
@@ -688,7 +688,7 @@
},
'threshold': {
edit: true,
- label: 'Threshold'
+ label: 'label.threshold'
},
'add-scaleDowncondition': {
label: 'label.add',
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 38cf501..a2e4dc2 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -494,6 +494,10 @@
return dictionary[str];
};
}
+
+ //added for dictionary split up
+
+ $.extend(dictionary,dictionary2);
// Localize validation messages
cloudStack.localizeValidatorMessages();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/configuration.js
----------------------------------------------------------------------
diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js
index a70c672..9b0086f 100644
--- a/ui/scripts/configuration.js
+++ b/ui/scripts/configuration.js
@@ -455,7 +455,7 @@
},
pciDevice: {
- label: 'GPU',
+ label: 'label.gpu',
select: function(args) {
var items = [];
items.push({
@@ -508,7 +508,7 @@
},
vgpuType: {
- label: 'vGPU Type',
+ label: 'label.vgpu.type',
isHidden: true,
select: function(args) {
var items = [];
@@ -927,20 +927,20 @@
converter: cloudStack.converters.toBooleanText
},
isvolatile: {
- label: 'Volatile',
+ label: 'label.volatile',
converter: cloudStack.converters.toBooleanText
},
deploymentplanner: {
- label: 'Deployment Planner'
+ label: 'label.deployment.planner'
},
plannerMode: {
- label: 'Planner Mode'
+ label: 'label.planner.mode'
},
pciDevice: {
- label: 'GPU'
+ label: 'label.gpu'
},
vgpuType: {
- label: 'vGPU type'
+ label: 'label.vgpu.type'
},
tags: {
label: 'label.storage.tags'
@@ -2612,7 +2612,7 @@
},
isPersistent: {
- label: 'Persistent ',
+ label: 'label.persistent',
isBoolean: true,
isChecked: false
@@ -2626,13 +2626,13 @@
},
useVpc: {
- label: 'VPC',
+ label: 'label.vpc',
docID: 'helpNetworkOfferingVPC',
isBoolean: true
},
lbType: { //only shown when VPC is checked and LB service is checked
- label: 'Load Balancer Type',
+ label: 'label.load.balancer.type',
isHidden: true,
select: function(args) {
args.response.success({
@@ -3155,7 +3155,7 @@
messages: {
notification: function(args) {
- return 'Added network offering';
+ return 'label.added.network.offering';
}
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/domains.js
----------------------------------------------------------------------
diff --git a/ui/scripts/domains.js b/ui/scripts/domains.js
index 488382e..e585d85 100644
--- a/ui/scripts/domains.js
+++ b/ui/scripts/domains.js
@@ -355,7 +355,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
path: {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/events.js
----------------------------------------------------------------------
diff --git a/ui/scripts/events.js b/ui/scripts/events.js
index 2731cb6..ea4b940 100644
--- a/ui/scripts/events.js
+++ b/ui/scripts/events.js
@@ -43,7 +43,7 @@
label: 'label.level'
},
type: {
- label: 'Type',
+ label: 'label.type',
truncate: true
},
domain: {
@@ -67,7 +67,7 @@
isMultiSelectAction: true,
messages: {
confirm: function(args) {
- return 'Please confirm you would like to remove the selected events';
+ return 'message.confirm.remove.selected.events';
},
notification: function(args) {
return 'label.delete.events';
@@ -224,7 +224,7 @@
isMultiSelectAction: true,
messages: {
confirm: function(args) {
- return 'Please confirm you would like to archive the selected events';
+ return 'message.confirm.archive.selected.events';
},
notification: function(args) {
return 'label.archive.events';
@@ -265,20 +265,20 @@
description: ''
}, {
id: 'INFO',
- description: 'INFO'
+ description: 'label.info.upper'
}, {
id: 'WARN',
- description: 'WARN'
+ description: 'label.warn.upper'
}, {
id: 'ERROR',
- description: 'ERROR'
+ description: 'label.error.upper'
}]
});
}
},
domainid: {
- label: 'Domain',
+ label: 'label.domain',
select: function(args) {
if (isAdmin() || isDomainAdmin()) {
$.ajax({
@@ -321,7 +321,7 @@
},
account: {
- label: 'Account',
+ label: 'label.account',
isHidden: function(args) {
if (isAdmin() || isDomainAdmin())
return false;
@@ -352,13 +352,13 @@
// Remove single event
remove: {
- label: 'Delete',
+ label: 'label.delete',
messages: {
notification: function(args) {
- return 'Event Deleted';
+ return 'label.event.deleted';
},
confirm: function() {
- return 'Are you sure you want to remove this event?';
+ return 'message.confirm.remove.event';
}
},
action: function(args) {
@@ -376,13 +376,13 @@
// Archive single event
archive: {
- label: 'Archive',
+ label: 'label.archive',
messages: {
notification: function(args) {
- return 'Event Archived';
+ return 'label.event.archived';
},
confirm: function() {
- return 'Please confirm that you want to archive this event.';
+ return 'message.confirm.archive.event';
}
},
action: function(args) {
@@ -460,7 +460,7 @@
label: 'label.description'
},
type: {
- label: 'Type'
+ label: 'label.type'
},
sent: {
label: 'label.date',
@@ -477,7 +477,7 @@
isMultiSelectAction: true,
messages: {
confirm: function(args) {
- return 'Please confirm you would like to remove the selected alerts';
+ return 'message.confirm.remove.selected.alerts';
},
notification: function(args) {
return 'label.delete.alerts';
@@ -576,7 +576,7 @@
isMultiSelectAction: true,
messages: {
confirm: function(args) {
- return 'Please confirm you would like to archive the selected alerts';
+ return 'message.confirm.archive.selected.alerts';
},
notification: function(args) {
return 'label.archive.alerts';
@@ -682,18 +682,18 @@
});
},
detailView: {
- name: 'Alert details',
+ name: 'label.alert.details',
actions: {
// Remove single Alert
remove: {
- label: 'Delete',
+ label: 'label.delete',
messages: {
notification: function(args) {
- return 'Alert Deleted';
+ return 'label.alert.deleted';
},
confirm: function() {
- return 'Are you sure you want to delete this alert ?';
+ return 'message.confirm.delete.alert';
}
},
action: function(args) {
@@ -710,13 +710,13 @@
},
archive: {
- label: 'Archive',
+ label: 'label.archive',
messages: {
notification: function(args) {
- return 'Alert Archived';
+ return 'label.alert.archived';
},
confirm: function() {
- return 'Please confirm that you want to archive this alert.';
+ return 'message.confirm.archive.alert';
}
},
action: function(args) {
@@ -738,7 +738,7 @@
title: 'label.details',
fields: [{
id: {
- label: 'ID'
+ label: 'label.id'
},
description: {
label: 'label.description'
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 4d536e3..46df52d 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -962,7 +962,7 @@
title: 'label.action.attach.iso',
fields: {
iso: {
- label: 'ISO',
+ label: 'label.iso',
select: function(args) {
var items = [];
var map = {};
@@ -1836,7 +1836,7 @@
label: 'label.memory.mb'
},
vgpu: {
- label: 'VGPU'
+ label: 'label.vgpu'
},
haenable: {
label: 'label.ha.enabled',
@@ -2143,7 +2143,7 @@
multiple: true,
fields: [{
id: {
- label: 'ID'
+ label: 'label.id'
},
name: {
label: 'label.name'
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/lbStickyPolicy.js
----------------------------------------------------------------------
diff --git a/ui/scripts/lbStickyPolicy.js b/ui/scripts/lbStickyPolicy.js
index 16995f6..11d4799 100644
--- a/ui/scripts/lbStickyPolicy.js
+++ b/ui/scripts/lbStickyPolicy.js
@@ -68,7 +68,7 @@
var baseFields = {
stickyName: {
- label: 'Sticky Name',
+ label: 'label.sticky.name',
validation: {
required: true
}
@@ -96,7 +96,7 @@
var conditionalFields = {
methodname: {
- label: 'Stickiness method',
+ label: 'label.stickiness.method',
select: function(args) {
var $select = args.$select;
var $form = $select.closest('form');
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 02dd269..55c4937 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -560,7 +560,7 @@
},
vlan: {
- label: 'VLAN',
+ label: 'label.vlan',
validation: {
required: true
},
@@ -753,7 +753,7 @@
},
messages: {
notification: function() {
- return 'Add Isolated Guest Network';
+ return 'label.add.isolated.guest.network';
}
}
},
@@ -946,7 +946,7 @@
if (args.context.networks[0].type == "Isolated") { //Isolated network
cloudStack.dialog.confirm({
- message: 'Do you want to keep the current guest network CIDR unchanged?',
+ message: 'message.confirm.current.guest.CIDR.unchanged',
action: function() { //"Yes" button is clicked
$.extend(data, {
changecidr: false
@@ -1253,7 +1253,7 @@
if (args != null)
return args;
else
- return 'N/A';
+ return 'label.na';
}
},
@@ -5843,7 +5843,7 @@
var items = [];
items.push({
id: '',
- description: 'None'
+ description: 'label.none'
});
items.push({
id: 'modp1024',
@@ -5911,7 +5911,7 @@
var items = [];
items.push({
id: '',
- description: 'None'
+ description: 'label.none'
});
items.push({
id: 'modp1024',
@@ -6179,7 +6179,7 @@
var items = [];
items.push({
id: '',
- description: 'None'
+ description: 'label.none'
});
items.push({
id: 'modp1024',
@@ -6247,7 +6247,7 @@
var items = [];
items.push({
id: '',
- description: 'None'
+ description: 'label.none'
});
items.push({
id: 'modp1024',
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/projects.js
----------------------------------------------------------------------
diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js
index 53b7964..dd380fb 100644
--- a/ui/scripts/projects.js
+++ b/ui/scripts/projects.js
@@ -700,7 +700,7 @@
},
domainid: {
- label: 'Domain',
+ label: 'label.domain',
select: function(args) {
if (isAdmin() || isDomainAdmin()) {
$.ajax({
@@ -743,7 +743,7 @@
},
account: {
- label: 'Account',
+ label: 'label.account',
isHidden: function(args) {
if (isAdmin() || isDomainAdmin())
return false;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 368c1bf..4899c92 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -55,7 +55,7 @@
label: 'label.name'
},
id: {
- label: 'ID'
+ label: 'label.id'
},
endpoint: {
label: 'label.endpoint'
@@ -152,7 +152,7 @@
label: 'label.regionlevelvpc'
}, {
path: 'regions.portableIpRanges',
- label: 'Portable IP',
+ label: 'label.portable.ip',
preFilter: function(args) {
if (isAdmin())
return true;
@@ -274,7 +274,7 @@
title: 'GSLB',
listView: {
id: 'GSLB',
- label: 'GSLB',
+ label: 'label.gslb',
fields: {
name: {
label: 'label.name'
@@ -476,7 +476,7 @@
name: 'label.gslb.details',
viewAll: {
path: 'regions.lbUnderGSLB',
- label: 'assigned load balancing'
+ label: 'label.gslb.assigned.lb'
},
actions: {
edit: {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 8fc0b72..457548c 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -1101,39 +1101,39 @@ cloudStack.converters = {
// These are old values -- can be removed in the future
case 8:
- return "User VM";
+ return _l('label.user.vm');
case 11:
- return "Routing Host";
+ return _l('label.routing.host');
case 12:
- return "Storage";
+ return _l('label.menu.storage');
case 13:
- return "Usage Server";
+ return _l('label.usage.server');
case 14:
- return "Management Server";
+ return _l('label.management.server');
case 15:
- return "Domain Router";
+ return _l('label.domain.router');
case 16:
- return "Console Proxy";
+ return _l('label.console.proxy');
case 17:
- return "User VM";
+ return _l('label.user.vm');
case 18:
- return "VLAN";
+ return _l('label.vlan');
case 19:
- return "Secondary Storage VM";
+ return _l('label.secondary.storage.vm');
case 20:
- return "Usage Server";
+ return _l('label.usage.server');
case 21:
- return "Storage";
+ return _l('label.menu.storage');
case 22:
- return "Update Resource Count";
+ return _l('label.action.update.resource.count');
case 23:
- return "Usage Sanity Result";
+ return _l('label.usage.sanity.result');
case 24:
- return "Direct Attached Public IP";
+ return _l('label.direct.attached.public.ip');
case 25:
- return "Local Storage";
+ return _l('label.local.storage');
case 26:
- return "Resource Limit Exceeded";
+ return _l('label.resource.limit.exceeded');
}
},
@@ -1160,25 +1160,25 @@ cloudStack.converters = {
case 9:
return _l('label.local.storage');
case 10:
- return "Routing Host";
+ return _l('label.routing.host');
case 11:
- return "Storage";
+ return _l('label.menu.storage');
case 12:
- return "Usage Server";
+ return _l('label.usage.server');
case 13:
- return "Management Server";
+ return _l('label.management.server');
case 14:
- return "Domain Router";
+ return _l('label.domain.router');
case 15:
- return "Console Proxy";
+ return _l('label.console.proxy');
case 16:
- return "User VM";
+ return _l('label.user.vm');
case 17:
- return "VLAN";
+ return _l('label.vlan');
case 18:
- return "Secondary Storage VM";
+ return _l('label.secondary.storage.vm');
case 19:
- return "GPU";
+ return _l('label.gpu');
}
},
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index f4ab6e1..783633c 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -331,7 +331,7 @@
},
checksum: {
docID: 'helpUploadVolumeChecksum',
- label: 'label.checksum'
+ label: 'label.md5.checksum'
}
}
},
@@ -381,10 +381,10 @@
advSearchFields: {
name: {
- label: 'Name'
+ label: 'label.name'
},
zoneid: {
- label: 'Zone',
+ label: 'label.zone',
select: function(args) {
$.ajax({
url: createURL('listZones'),
@@ -408,7 +408,7 @@
},
domainid: {
- label: 'Domain',
+ label: 'label.domain',
select: function(args) {
if (isAdmin() || isDomainAdmin()) {
$.ajax({
@@ -451,7 +451,7 @@
},
account: {
- label: 'Account',
+ label: 'label.account',
isHidden: function(args) {
if (isAdmin() || isDomainAdmin())
return false;
@@ -461,10 +461,10 @@
},
tagKey: {
- label: 'Tag Key'
+ label: 'label.tag.key'
},
tagValue: {
- label: 'Tag Value'
+ label: 'label.tag.value'
}
},
@@ -494,7 +494,7 @@
},
detailView: {
- name: 'Volume details',
+ name: 'label.volume.details',
viewAll: {
path: 'storage.snapshots',
label: 'label.snapshots'
@@ -502,22 +502,22 @@
actions: {
migrateVolume: {
- label: 'Migrate Volume',
+ label: 'label.migrate.volume',
messages: {
confirm: function(args) {
- return 'Do you want to migrate this volume ?';
+ return 'message.confirm.migrate.volume';
},
notification: function(args) {
- return 'Volume migrated';
+ return 'label.volume.migrated';
}
},
createForm: {
- title: 'Migrate Volume',
+ title: 'label.migrate.volume',
desc: '',
fields: {
storagePool: {
- label: 'Storage Pool',
+ label: 'label.storage.pool',
validation: {
required: true
},
@@ -869,7 +869,7 @@
label: 'label.action.attach.disk',
messages: {
confirm: function(args) {
- return 'Are you sure you want to attach disk?';
+ return 'message.confirm.attach.disk';
},
notification: function(args) {
return 'label.action.attach.disk';
@@ -1164,17 +1164,17 @@
},
migrateToAnotherStorage: {
- label: 'label.migrate.volume',
+ label: 'label.migrate.volume.to.primary.storage',
messages: {
confirm: function(args) {
return 'message.migrate.volume';
},
notification: function(args) {
- return 'label.migrate.volume';
+ return 'label.migrate.volume.to.primary.storage';
}
},
createForm: {
- title: 'label.migrate.volume',
+ title: 'label.migrate.volume.to.primary.storage',
desc: '',
fields: {
storageId: {
@@ -1429,7 +1429,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
zonename: {
label: 'label.zone'
@@ -1471,7 +1471,7 @@
label: 'label.hypervisor'
},
size: {
- label: 'Size ',
+ label: 'label.size',
converter: function(args) {
if (args == null || args == 0)
return "";
@@ -1498,10 +1498,10 @@
}
},
virtualmachineid: {
- label: 'VM ID',
+ label: 'label.vm.id',
converter: function(args) {
if (args == null)
- return "detached";
+ return 'state.detached';
else
return args;
}
@@ -1593,11 +1593,11 @@
advSearchFields: {
name: {
- label: 'Name'
+ label: 'label.name'
},
domainid: {
- label: 'Domain',
+ label: 'label.domain',
select: function(args) {
if (isAdmin() || isDomainAdmin()) {
$.ajax({
@@ -1640,7 +1640,7 @@
},
account: {
- label: 'Account',
+ label: 'label.account',
isHidden: function(args) {
if (isAdmin() || isDomainAdmin())
return false;
@@ -1649,10 +1649,10 @@
}
},
tagKey: {
- label: 'Tag Key'
+ label: 'label.tag.key'
},
tagValue: {
- label: 'Tag Value'
+ label: 'label.tag.value'
}
},
@@ -1802,7 +1802,7 @@
label: 'label.action.create.volume',
messages: {
confirm: function(args) {
- return 'Are you sure you want to create volume?';
+ return 'message.confirm.create.volume';
},
notification: function(args) {
return 'label.action.create.volume';
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 71118ff..3f6efce 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1631,7 +1631,7 @@
if (args.context.networks[0].type == "Isolated") {
//Isolated network
cloudStack.dialog.confirm({
- message: 'Do you want to keep the current guest network CIDR unchanged?',
+ message: 'message.confirm.current.guest.CIDR.unchanged',
action: function () {
//"Yes" button is clicked
array1.push("&changecidr=false");
@@ -2854,7 +2854,7 @@
InternalLbVm: {
id: 'InternalLbVm',
- label: 'InternalLbVm',
+ label: 'label.internallbvm',
isMaximized: true,
type: 'detailView',
fields: {
@@ -4998,7 +4998,7 @@
docID: 'helpSRXPrivateInterface'
},
usageinterface: {
- label: 'Usage interface',
+ label: 'label.usage.interface',
docID: 'helpSRXUsageInterface'
},
numretries: {
@@ -10129,9 +10129,9 @@
label: 'label.upgrade.required',
converter: function (args) {
if (args > 0) {
- return 'Yes';
+ return 'label.yes';
} else {
- return 'No';
+ return 'label.no';
}
}
},
@@ -10711,7 +10711,7 @@
},
agentstate: {
- label: 'Agent State',
+ label: 'label.agent.state',
indicator: {
'Up': 'on',
'Down': 'off'
@@ -11374,7 +11374,7 @@
converter: cloudStack.converters.toBooleanText
},
gslbprovider: {
- label: 'GSLB service',
+ label: 'label.gslb.service',
converter: cloudStack.converters.toBooleanText
},
gslbproviderpublicip: {
@@ -13015,7 +13015,7 @@
title: 'label.add.pod',
fields: {
zoneid: {
- label: 'Zone',
+ label: 'label.zone',
docID: 'helpPodZone',
validation: {
required: true
@@ -15032,7 +15032,7 @@
fields: {
zoneid: {
docID: 'helpHostZone',
- label: 'Zone',
+ label: 'label.zone',
validation: {
required: true
},
@@ -15790,7 +15790,7 @@
},
enable: {
- label: 'Enable Host',
+ label: 'label.enable.host',
action: function (args) {
var data = {
id: args.context.hosts[0].id,
@@ -15810,10 +15810,10 @@
},
messages: {
confirm: function (args) {
- return 'Please confirm that you want to enable the host';
+ return 'message.confirm.enable.host';
},
notification: function (args) {
- return 'Enable Host';
+ return 'label.enable.host';
}
},
notification: {
@@ -15824,7 +15824,7 @@
},
disable: {
- label: 'Disable Host',
+ label: 'label.disable.host',
action: function (args) {
var data = {
id: args.context.hosts[0].id,
@@ -15844,10 +15844,10 @@
},
messages: {
confirm: function (args) {
- return 'Please confirm that you want to disable the host';
+ return 'message.confirm.disable.host';
},
notification: function (args) {
- return 'Disable Host';
+ return 'label.disable.host';
}
},
notification: {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 6dcd6da..d71a774 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -87,10 +87,10 @@
}
},
tagKey: {
- label: 'Tag Key'
+ label: 'label.tag.key'
},
tagValue: {
- label: 'Tag Value'
+ label: 'label.tag.value'
}
},
@@ -123,7 +123,7 @@
}
},
url: {
- label: 'URL',
+ label: 'label.url',
docID: 'helpRegisterTemplateURL',
validation: {
required: true
@@ -911,7 +911,7 @@
}
},
isextractable: {
- label: 'extractable',
+ label: 'label.extractable',
isBoolean: true,
isEditable: function() {
if (isAdmin())
@@ -928,7 +928,7 @@
converter: cloudStack.converters.toBooleanText
},
isdynamicallyscalable: {
- label: 'Dynamically Scalable',
+ label: 'label.dynamically.scalable',
isBoolean: true,
isEditable: true,
converter: cloudStack.converters.toBooleanText
@@ -1501,7 +1501,7 @@
}
},
url: {
- label: 'URL',
+ label: 'label.url',
docID: 'helpRegisterISOURL',
validation: {
required: true
@@ -1929,7 +1929,7 @@
}
}, {
id: {
- label: 'ID'
+ label: 'label.id'
},
displaytext: {
label: 'label.description',
@@ -1948,7 +1948,7 @@
}
},
isextractable: {
- label: 'extractable',
+ label: 'label.extractable',
isBoolean: true,
isEditable: function() {
if (isAdmin())
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui-custom/autoscaler.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/autoscaler.js b/ui/scripts/ui-custom/autoscaler.js
index 0aa6c77..a24eb90 100644
--- a/ui/scripts/ui-custom/autoscaler.js
+++ b/ui/scripts/ui-custom/autoscaler.js
@@ -198,7 +198,7 @@
title: '',
fields: {
scaleUpDuration: {
- label: 'Duration(in sec)',
+ label: 'label.duration.in.sec',
validation: {
required: true
}
@@ -217,7 +217,7 @@
title: '',
fields: {
scaleDownDuration: {
- label: 'Duration(in sec)',
+ label: 'label.duration.in.sec',
validation: {
required: true
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui-custom/healthCheck.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/healthCheck.js b/ui/scripts/ui-custom/healthCheck.js
index 4e10f1c..8fb0188 100644
--- a/ui/scripts/ui-custom/healthCheck.js
+++ b/ui/scripts/ui-custom/healthCheck.js
@@ -76,7 +76,7 @@
title: '',
fields: {
pingpath: {
- label: 'Ping Path',
+ label: 'label.ping.path',
validation: {
required: false
},
@@ -98,28 +98,28 @@
title: '',
fields: {
responsetimeout: {
- label: 'Response Timeout (in sec)',
+ label: 'label.response.timeout.in.sec',
validation: {
required: false
},
defaultValue: responsetimeout1
},
healthinterval: {
- label: 'Health Check Interval (in sec)',
+ label: 'label.health.check.interval.in.sec',
validation: {
required: false
},
defaultValue: healthinterval1
},
healthythreshold: {
- label: 'Healthy Threshold',
+ label: 'label.healthy.threshold',
validation: {
required: false
},
defaultValue: healthythreshold1
},
unhealthythreshold: {
- label: 'Unhealthy Threshold',
+ label: 'label.unhealthy.threshold',
validation: {
required: false
},
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui-custom/physicalResources.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/physicalResources.js b/ui/scripts/ui-custom/physicalResources.js
index 110945e..7dd5380 100644
--- a/ui/scripts/ui-custom/physicalResources.js
+++ b/ui/scripts/ui-custom/physicalResources.js
@@ -218,7 +218,7 @@
if (index == certificates.length - 1) // last one, report success
{
cloudStack.dialog.notice({
- message: 'Update SSL Certificates succeeded'
+ message: 'message.update.ssl.succeeded'
});
$loading.remove();
}
@@ -228,7 +228,7 @@
}
} else if (result.jobstatus == 2) {
cloudStack.dialog.notice({
- message: 'Failed to update SSL Certificate. ' + _s(result.jobresult.errortext)
+ message: 'message.update.ssl.failed' + ' ' + _s(result.jobresult.errortext)
});
$loading.remove();
}
@@ -236,7 +236,7 @@
},
error: function(XMLHttpResponse) {
cloudStack.dialog.notice({
- message: 'Failed to update SSL Certificate. ' + parseXMLHttpResponse(XMLHttpResponse)
+ message: 'message.update.ssl.failed' + ' ' + parseXMLHttpResponse(XMLHttpResponse)
});
$loading.remove();
}
@@ -245,7 +245,7 @@
},
error: function(XMLHttpResponse) {
cloudStack.dialog.notice({
- message: 'Failed to update SSL Certificate. ' + parseXMLHttpResponse(XMLHttpResponse)
+ message: 'message.update.ssl.failed' + ' ' + parseXMLHttpResponse(XMLHttpResponse)
});
$loading.remove();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui-custom/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/regions.js b/ui/scripts/ui-custom/regions.js
index 986e009..531da78 100644
--- a/ui/scripts/ui-custom/regions.js
+++ b/ui/scripts/ui-custom/regions.js
@@ -72,7 +72,7 @@
)
.hide();
var $regionSwitcherButton = $('<div>').addClass('region-switcher')
- .attr('title', 'Select region')
+ .attr('title', _l('label.select.region'))
.append(
$('<span>').addClass('icon').html(' '),
$('<span>').addClass('title').html('')
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui-custom/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneWizard.js b/ui/scripts/ui-custom/zoneWizard.js
index f3a1aae..2c17f60 100644
--- a/ui/scripts/ui-custom/zoneWizard.js
+++ b/ui/scripts/ui-custom/zoneWizard.js
@@ -300,11 +300,11 @@
if (hypervisor == 'VMware') {
fields = {
vSwitchName: {
- label: 'vSwitch Name' ,
+ label: 'label.vswitch.name' ,
defaultValue: trafficData.vSwitchName
},
vlanId: {
- label: 'VLAN ID',
+ label: 'label.vlan.id',
defaultValue: trafficData.vlanId
}
};
@@ -354,7 +354,7 @@
$.extend(fields, {
vSwitchType: {
- label: 'vSwitch Type',
+ label: 'label.vSwitch.type',
select: function (args) {
args.response.success({
data: [{
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 6c77924..950d596 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -861,7 +861,7 @@
closeOnEscape: false,
zIndex: 5000,
buttons: [{
- text: _l('Close'),
+ text: _l('label.close'),
'class': 'close',
click: function() {
$(this).dialog('destroy');
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index c7b4a4d..38a9cd5 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -469,7 +469,7 @@
data: [
$.extend(args.data, {
state: 'Creating',
- status: 'Creating',
+ status: 'state.Creating',
allocationstate: 'Creating'
})
]
@@ -516,7 +516,7 @@
data: [
$.extend(args.data, {
state: 'Creating',
- status: 'Creating',
+ status: 'state.Creating',
allocationstate: 'Creating'
})
]
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a11d099/ui/scripts/ui/widgets/multiEdit.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/multiEdit.js b/ui/scripts/ui/widgets/multiEdit.js
index 47e5f43..c4de8ce 100755
--- a/ui/scripts/ui/widgets/multiEdit.js
+++ b/ui/scripts/ui/widgets/multiEdit.js
@@ -529,7 +529,7 @@
instances.listView.actions = {
select: {
- label: 'Select instance',
+ label: 'label.select.instance',
type: isMultipleAdd ? 'checkbox' : 'radio',
action: {
uiCustom: function(args) {