Skip to content

Commit 50fadb4

Browse files
author
Jessica Wang
committed
cloudstack 3.0 new UI - system page - localize primary storage section.
1 parent f9a6214 commit 50fadb4

4 files changed

Lines changed: 49 additions & 60 deletions

File tree

client/WEB-INF/classes/resources/messages.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,3 +1163,6 @@ agent.username=Agent Username
11631163
agent.password=Agent Password
11641164
confirm.action.force.reconnect=Please confirm that you want to force reconnect this host.
11651165
resource.state=Resource state
1166+
LUN.number=LUN #
1167+
1168+

client/WEB-INF/classes/resources/messages_ja.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,3 +1166,7 @@ agent.username=エージェントのユーザー名
11661166
agent.password=エージェントのパスワード
11671167
confirm.action.force.reconnect=このホストを再接続を強制することを確認してください。
11681168
resource.state=リソースの状態
1169+
LUN.number=LUN #
1170+
1171+
1172+

ui/index.jsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,7 @@ dictionary = {
27152715
'agent.username': '<fmt:message key="agent.username" />',
27162716
'agent.password': '<fmt:message key="agent.password" />',
27172717
'confirm.action.force.reconnect': '<fmt:message key="confirm.action.force.reconnect" />',
2718-
'resource.state': '<fmt:message key="resource.state" />'
2718+
'resource.state': '<fmt:message key="resource.state" />',
2719+
'LUN.number': '<fmt:message key="LUN.number" />'
27192720
};
27202721
</script>

ui/scripts/system.js

Lines changed: 40 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5525,7 +5525,7 @@
55255525
}
55265526

55275527
},
5528-
tabs: { //Jes
5528+
tabs: {
55295529
details: {
55305530
title: 'label.details',
55315531
fields: [
@@ -5581,16 +5581,16 @@
55815581
}
55825582
}
55835583
},
5584-
'primary-storage': { //Jes
5585-
title: 'Primary Storage',
5584+
'primary-storage': {
5585+
title: 'label.primary.storage',
55865586
id: 'primarystorages',
55875587
listView: {
55885588
id: 'primarystorages',
55895589
section: 'primary-storage',
55905590
fields: {
55915591
name: { label: 'label.name' },
5592-
ipaddress: { label: 'Server' },
5593-
path: { label: 'Path' }
5592+
ipaddress: { label: 'label.server' },
5593+
path: { label: 'label.path' }
55945594
},
55955595

55965596
dataProvider: function(args) {
@@ -5626,11 +5626,10 @@
56265626

56275627
actions: {
56285628
add: {
5629-
label: 'Add primary storage',
5629+
label: 'label.add.primary.storage',
56305630

56315631
createForm: {
5632-
title: 'Add new primary storage',
5633-
desc: 'Please fill in the following information to add a new primary storage',
5632+
title: 'label.add.primary.storage',
56345633
fields: {
56355634
//always appear (begin)
56365635
podId: {
@@ -5683,7 +5682,7 @@
56835682
},
56845683

56855684
protocol: {
5686-
label: 'Protocol',
5685+
label: 'label.protocol',
56875686
validation: { required: true },
56885687
dependsOn: 'clusterId',
56895688
select: function(args) {
@@ -5909,45 +5908,45 @@
59095908
//always appear (end)
59105909

59115910
server: {
5912-
label: 'Server',
5911+
label: 'label.server',
59135912
validation: { required: true },
59145913
isHidden: true
59155914
},
59165915

59175916
//nfs
59185917
path: {
5919-
label: 'Path',
5918+
label: 'label.path',
59205919
validation: { required: true },
59215920
isHidden: true
59225921
},
59235922

59245923
//iscsi
59255924
iqn: {
5926-
label: 'Target IQN',
5925+
label: 'label.target.iqn',
59275926
validation: { required: true },
59285927
isHidden: true
59295928
},
59305929
lun: {
5931-
label: 'LUN #',
5930+
label: 'LUN.number',
59325931
validation: { required: true },
59335932
isHidden: true
59345933
},
59355934

59365935
//clvm
59375936
volumegroup: {
5938-
label: 'Volume Group',
5937+
label: 'label.volgroup',
59395938
validation: { required: true },
59405939
isHidden: true
59415940
},
59425941

59435942
//vmfs
59445943
vCenterDataCenter: {
5945-
label: 'vCenter Datacenter',
5944+
label: 'label.vcenter.datacenter',
59465945
validation: { required: true },
59475946
isHidden: true
59485947
},
59495948
vCenterDataStore: {
5950-
label: 'vCenter Datastore',
5949+
label: 'label.vcenter.datastore',
59515950
validation: { required: true },
59525951
isHidden: true
59535952
},
@@ -6059,14 +6058,14 @@
60596058

60606059
messages: {
60616060
notification: function(args) {
6062-
return 'Added new primary storage';
6061+
return 'label.add.primary.storage';
60636062
}
60646063
}
60656064
}
60666065
},
60676066

60686067
detailView: {
6069-
name: "Primary storage details",
6068+
name: "Primary storage details", //Jes
60706069
actions: {
60716070
edit: {
60726071
label: 'label.edit',
@@ -6089,7 +6088,7 @@
60896088
},
60906089

60916090
enableMaintenanceMode: {
6092-
label: 'Enable Maintenace' ,
6091+
label: 'label.action.enable.maintenance.mode' ,
60936092
action: function(args) {
60946093
$.ajax({
60956094
url: createURL("enableStorageMaintenance&id=" + args.context.primarystorages[0].id),
@@ -6114,16 +6113,10 @@
61146113
},
61156114
messages: {
61166115
confirm: function(args) {
6117-
return 'Warning: placing the primary storage into maintenance mode will cause all VMs using volumes from it to be stopped. Do you want to continue?';
6118-
},
6119-
success: function(args) {
6120-
return 'Maintenance is being enabled.';
6121-
},
6116+
return 'message.action.primarystorage.enable.maintenance.mode';
6117+
},
61226118
notification: function(args) {
6123-
return 'Enabling maintenance';
6124-
},
6125-
complete: function(args) {
6126-
return 'Maintenance has been enabled.';
6119+
return 'label.action.enable.maintenance.mode';
61276120
}
61286121
},
61296122
notification: {
@@ -6132,7 +6125,15 @@
61326125
},
61336126

61346127
cancelMaintenanceMode: {
6135-
label: 'Cancel Maintenace' ,
6128+
label: 'label.action.cancel.maintenance.mode' ,
6129+
messages: {
6130+
confirm: function(args) {
6131+
return 'message.action.cancel.maintenance.mode';
6132+
},
6133+
notification: function(args) {
6134+
return 'label.action.cancel.maintenance.mode';
6135+
}
6136+
},
61366137
action: function(args) {
61376138
$.ajax({
61386139
url: createURL("cancelStorageMaintenance&id=" + args.context.primarystorages[0].id),
@@ -6154,40 +6155,20 @@
61546155
);
61556156
}
61566157
});
6157-
},
6158-
messages: {
6159-
confirm: function(args) {
6160-
return 'Please confirm that you want to cancel this maintenance.';
6161-
},
6162-
success: function(args) {
6163-
return 'Maintenance is being cancelled.';
6164-
},
6165-
notification: function(args) {
6166-
return 'Cancelling maintenance';
6167-
},
6168-
complete: function(args) {
6169-
return 'Maintenance has been cancelled.';
6170-
}
6171-
},
6158+
},
61726159
notification: {
61736160
poll: pollAsyncJobResult
61746161
}
61756162
},
61766163

61776164
'delete': {
6178-
label: 'label.delete' ,
6165+
label: 'label.action.delete.primary.storage' ,
61796166
messages: {
61806167
confirm: function(args) {
6181-
return 'Please confirm that you want to delete this primary storage.';
6182-
},
6183-
success: function(args) {
6184-
return 'Primary storage is being deleted.';
6185-
},
6168+
return 'message.action.delete.primary.storage';
6169+
},
61866170
notification: function(args) {
6187-
return 'Deleting primary storage';
6188-
},
6189-
complete: function(args) {
6190-
return 'Primary storage has been deleted.';
6171+
return 'label.action.delete.primary.storage';
61916172
}
61926173
},
61936174
action: function(args) {
@@ -6209,7 +6190,7 @@
62096190

62106191
tabs: {
62116192
details: {
6212-
title: 'label.details',
6193+
title: 'label.details', //Jes
62136194
fields: [
62146195
{
62156196
name: { label: 'label.name' }
@@ -6225,9 +6206,9 @@
62256206
clustername: { label: 'label.cluster' },
62266207
type: { label: 'label.type' },
62276208
ipaddress: { label: 'label.ip.address' },
6228-
path: { label: 'Path' },
6209+
path: { label: 'label.path' },
62296210
disksizetotal: {
6230-
label: 'Disk total',
6211+
label: 'label.disk.total',
62316212
converter: function(args) {
62326213
if (args == null || args == 0)
62336214
return "";
@@ -6236,7 +6217,7 @@
62366217
}
62376218
},
62386219
disksizeallocated: {
6239-
label: 'Disk Allocated',
6220+
label: 'label.disk.allocated',
62406221
converter: function(args) {
62416222
if (args == null || args == 0)
62426223
return "";
@@ -6260,7 +6241,7 @@
62606241
}
62616242
},
62626243

6263-
'secondary-storage': {
6244+
'secondary-storage': { //Jes
62646245
title: 'Secondary Storage',
62656246
id: 'secondarystorages',
62666247
listView: {

0 commit comments

Comments
 (0)