You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2014/03/08 01:22:51 UTC
[18/50] [abbrv] Externalized the hardcodedstrings from UI JAVASCRIPT
files.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 3551613..7a45463 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -237,7 +237,7 @@
},
xenserverToolsVersion61plus: {
- label: 'XenServer Tools Version 6.1+',
+ label: 'label.xenserver.tools.version.61.plus',
isBoolean: true,
isChecked: function (args) {
var b = false;
@@ -434,7 +434,7 @@
},
isdynamicallyscalable: {
- label: "Dynamically Scalable",
+ label: "label.dynamically.scalable",
docID: 'helpRegisterTemplateDynamicallyScalable',
isBoolean: true
},
@@ -951,7 +951,7 @@
label: 'label.hypervisor'
},
xenserverToolsVersion61plus: {
- label: 'XenServer Tools Version 6.1+',
+ label: 'label.xenserver.tools.version.61.plus',
isBoolean: true,
isEditable: function () {
if (isAdmin())
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/ui-custom/zoneChart.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/zoneChart.js b/ui/scripts/ui-custom/zoneChart.js
index e847a19..bc30d51 100644
--- a/ui/scripts/ui-custom/zoneChart.js
+++ b/ui/scripts/ui-custom/zoneChart.js
@@ -24,7 +24,7 @@
*/
var viewAllButton = function(args) {
var $viewAll = $('<div>').addClass('button view-all');
- var $label = $('<span>').addClass('view-all-label').html(args.label ? args.label : 'View all');
+ var $label = $('<span>').addClass('view-all-label').html(args.label ? args.label : 'label.view.all');
var $browser = args.$browser;
var action = args.action;
// Launch a list view
@@ -111,46 +111,46 @@
// Resource items
var computeResources = {
zone: {
- label: 'Zone'
+ label: 'label.zone'
},
pods: {
- label: 'Pods',
+ label: 'label.pods',
viewAll: {
action: actions.listView('pods', context)
}
},
clusters: {
- label: 'Clusters',
+ label: 'label.clusters',
viewAll: {
action: actions.listView('clusters', context)
}
},
hosts: {
- label: 'Hosts',
+ label: 'label.hosts',
viewAll: {
action: actions.listView('hosts', context)
}
},
primaryStorage: {
- label: 'Primary Storage',
+ label: 'label.primary.storage',
viewAll: {
action: actions.listView('primary-storage', context)
}
},
ucs: {
- label: 'UCS',
+ label: 'label.ucs',
viewAll: {
action: actions.listView('ucs', context)
}
},
secondaryStorage: {
- label: 'Secondary Storage',
+ label: 'label.secondary.storage',
viewAll: {
action: actions.listView('secondary-storage', context)
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/ui/core.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 06be12b..add7d06 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -363,7 +363,7 @@
function(value, element) {
return (value.indexOf("<") == -1 && value.indexOf(">") == -1);
},
- jQuery.format("Disallowed characters: <, >")
+ jQuery.format('message.disallowed.characters')
);
// Check for pending project invitations
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/ui/widgets/tagger.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/tagger.js b/ui/scripts/ui/widgets/tagger.js
index 673bd43..3ffd80b 100644
--- a/ui/scripts/ui/widgets/tagger.js
+++ b/ui/scripts/ui/widgets/tagger.js
@@ -22,7 +22,7 @@
if (!key || !value) {
cloudStack.dialog.notice({
- message: 'Please specify a tag key and value'
+ message: 'message.specifiy.tag.key.value'
});
return false;
}
@@ -42,7 +42,7 @@
var $valueField = $('<div>').addClass('field value');
var $valueLabel = $('<label>').attr('for', 'value').html(_l('label.value') + ':');
var $value = $('<input>').addClass('value disallowSpecialCharacters').attr('name', 'value');
- var $submit = $('<input>').attr('type', 'submit').val('Add');
+ var $submit = $('<input>').attr('type', 'submit').val('label.add');
$keyField.append($keyLabel, $key);
$valueField.append($valueLabel, $value);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 770ee9b..73d34df 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -66,7 +66,7 @@
fields: {
'number': {
- label: 'Rule Number',
+ label: 'label.rule.number',
edit: true,
isEditable: true
@@ -78,16 +78,16 @@
isEditable: true
},
action: {
- label: 'Action',
+ label: 'label.action',
isEditable: true,
select: function(args) {
args.response.success({
data: [{
- name: 'Allow',
- description: 'Allow'
+ name: 'label.allow',
+ description: 'label.allow'
}, {
- name: 'Deny',
- description: 'Deny'
+ name: 'label.deny',
+ description: 'label.deny'
}]
});
}
@@ -1926,14 +1926,14 @@
docID: 'helpVPCGatewayNetmask'
},
sourceNat: {
- label: 'Source NAT',
+ label: 'label.source.nat',
isBoolean: true,
isChecked: false
},
aclid: {
- label: 'ACL',
+ label: 'label.acl',
select: function(args) {
$.ajax({
url: createURL('listNetworkACLLists'),
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/182c3189/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 1de3646..988e0f9 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -1569,7 +1569,7 @@
var protocol = $(this).val();
- $form.find('[rel=path]').find(".name").find("label").html('<span class=\"field-required\">*</span>Path:');
+ $form.find('[rel=path]').find(".name").find("label").html('<span class=\"field-required\">*</span>"label.path":');
if (protocol == null)
return;
@@ -1635,7 +1635,7 @@
$form.find('[rel=server]').find(".value").find("input").val("localhost");
$form.find('[rel=path]').css('display', 'block');
- $form.find('[rel=path]').find(".name").find("label").html("<span class=\"field-required\">*</span>SR Name-Label:");
+ $form.find('[rel=path]').find(".name").find("label").html("<span class=\"field-required\">*</span>'label.SR.name':");
$form.find('[rel=smbUsername]').hide();
$form.find('[rel=smbPassword]').hide();
@@ -2123,20 +2123,20 @@
//SMB (begin)
smbUsername: {
- label: 'SMB Username',
+ label: 'label.smb.username',
validation: {
required: true
}
},
smbPassword: {
- label: 'SMB Password',
+ label: 'label.smb.password',
isPassword: true,
validation: {
required: true
}
},
smbDomain: {
- label: 'SMB Domain',
+ label: 'label.smb.domain',
validation: {
required: true
}
@@ -2189,7 +2189,7 @@
},
createNfsCache: {
- label: 'Create NFS Secondary Staging Store',
+ label: 'label.create.nfs.secondary.staging.storage',
isBoolean: true,
isChecked: true,
isHidden: true