Skip to content

Commit d6fc3f9

Browse files
committed
Localizaton fixes
-Add conditional CSS for Japanese version -Fix font wrapping in JA CSS for header bar, system dashboard -Add some missing localization labels
1 parent 9002067 commit d6fc3f9

5 files changed

Lines changed: 65 additions & 20 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#new labels (begin) **********************************************************************************************
2+
label.system.wide.capacity=System-wide capacity
3+
label.network.service.providers=Network Service Providers
24
message.launch.zone=Zone is ready to launch; please proceed to the next step.
35
label.add.compute.offering=Add compute offering
46
label.compute.offering=Compute offering

ui/css/cloudstack3.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3381,8 +3381,10 @@ Dialogs*/
33813381
}
33823382

33833383
.dashboard.admin .dashboard-container .stats ul li .name {
3384-
width: 135px;
3384+
width: 178px;
33853385
float: left;
3386+
font-size: 11px;
3387+
font-weight: bold;
33863388
margin: 15px 15px 0 0;
33873389
}
33883390

@@ -3946,7 +3948,7 @@ Dialogs*/
39463948
}
39473949

39483950
.system-chart.dashboard.admin .dashboard-container .stats .chart {
3949-
width: 286px;
3951+
width: 242px;
39503952
}
39513953

39523954
/** Compute*/
@@ -7375,7 +7377,7 @@ div.panel.ui-dialog div.list-view div.fixed-header {
73757377
position: relative;
73767378
left: 0px;
73777379
top: -10px;
7378-
margin-right: 10px;
7380+
margin-right: 9px;
73797381
}
73807382

73817383
#header div.view-switcher.alt {
@@ -7386,9 +7388,9 @@ div.panel.ui-dialog div.list-view div.fixed-header {
73867388
float: left;
73877389
/*[empty]display:;*/
73887390
width: 126px;
7389-
padding: 12px 0 0;
7391+
padding: 13px 0 0;
73907392
margin: 0;
7391-
text-indent: 21px;
7393+
text-indent: 17px;
73927394
position: relative;
73937395
/*+text-shadow:0px -1px 1px #2D2D2D;*/
73947396
-moz-text-shadow: 0px -1px 1px #2D2D2D;

ui/css/cloudstack3.ja.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*[fmt]1C20-1C0D-E*/
2+
#header div.view-switcher {
3+
font-size: 9px;
4+
}
5+
6+
.dashboard.admin .dashboard-container .stats ul li .name {
7+
font-size: 10px;
8+
}
9+
10+
.dashboard.admin .dashboard-container .stats ul li .percentage {
11+
float: left;
12+
font-size: 15px;
13+
font-weight: bold;
14+
margin: 13px 0 0;
15+
/*+text-shadow:0px -2px 1px #FFFFFF;*/
16+
-moz-text-shadow: 0px -2px 1px #FFFFFF;
17+
-webkit-text-shadow: 0px -2px 1px #FFFFFF;
18+
-o-text-shadow: 0px -2px 1px #FFFFFF;
19+
text-shadow: 0px -2px 1px #FFFFFF;
20+
}
21+
22+
.dashboard.admin .dashboard-container .stats ul li .value .content {
23+
font-size: 10px;
24+
}
25+
26+
div.toolbar div.filters label {
27+
font-size: 9px;
28+
}
29+
30+
div.toolbar div.filters select {
31+
width: 82px;
32+
font-size: 11px;
33+
}
34+

ui/index.jsp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<title>CloudStack</title>
1515
<link type="text/css" rel="stylesheet" href="lib/reset.css"/>
1616
<link type="text/css" rel="stylesheet" href="css/cloudstack3.css" />
17+
<c:if test="${!empty cookie.lang && cookie.lang.value != 'en'}">
18+
<link type="text/css" rel="stylesheet" href="css/cloudstack3.${cookie.lang.value}.css" />
19+
</c:if>
1720

1821
<!--[if IE 7]>
1922
<link type="text/css" rel="stylesheet" href="css/cloudstack3-ie7.css" />
@@ -1614,6 +1617,10 @@
16141617

16151618
<script language="javascript">
16161619
dictionary = {
1620+
'label.system.wide.capacity': '<fmt:message key="label.system.wide.capacity"/>',
1621+
'label.management': '<fmt:message key="label.management"/>',
1622+
'label.guest': '<fmt:message key="label.guest"/>',
1623+
'label.network.service.providers': '<fmt:message key="label.network.service.providers"/>',
16171624
'message.launch.zone': '<fmt:message key="message.launch.zone"/>',
16181625
'label.compute.offering': '<fmt:message key="label.compute.offering"/>',
16191626
'label.add.compute.offering': '<fmt:message key="label.add.compute.offering"/>',

ui/scripts/ui-custom/zoneChart.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,35 +186,35 @@
186186

187187
var trafficTypes = {
188188
'public': {
189-
label: 'Public',
189+
label: _l('label.public'),
190190
configure: {
191191
action: actions.trafficTypeDetails('public', targetContext)
192192
}
193193
},
194194

195195
'guest': {
196-
label: 'Guest',
196+
label: _l('label.guest'),
197197
configure: {
198198
action: actions.trafficTypeDetails('guest', targetContext)
199199
}
200200
},
201201

202202
'management': {
203-
label: 'Management',
203+
label: _l('label.management'),
204204
configure: {
205205
action: actions.trafficTypeDetails('management', targetContext)
206206
}
207207
},
208208

209209
'storage': {
210-
label: 'Storage',
210+
label: _l('label.storage'),
211211
configure: {
212212
action: actions.trafficTypeDetails('storage', targetContext)
213213
}
214214
},
215215

216216
'providers': {
217-
label: 'Network Service Providers',
217+
label: _l('label.network.service.providers'),
218218
ignoreChart: true,
219219
dependsOn: 'guest',
220220
configure: {
@@ -245,7 +245,7 @@
245245
var $li = $('<li>').addClass(id);
246246
var $label = $('<span>').addClass('label').html(trafficType.label);
247247
var $configureButton = viewAllButton($.extend(trafficType.configure, {
248-
label: 'Configure',
248+
label: _l('label.configure'),
249249
title: trafficType.label,
250250
$browser: $browser,
251251
targetContext: targetContext
@@ -325,19 +325,19 @@
325325
var $stats = $('<div>').addClass('stats');
326326
var $container = $('<div>').addClass('dashboard-container head');
327327
var $top = $('<div>').addClass('top');
328-
var $title = $('<div>').addClass('title').append($('<span>').html('System-wide capacity'));
328+
var $title = $('<div>').addClass('title').append($('<span>').html(_l('label.system.wide.capacity')));
329329

330330
var chartItems = {
331331
// The keys are based on the internal type ID associated with each capacity
332-
0: { name: 'Memory' },
332+
0: { name: _l('label.memory') },
333333
1: { name: 'CPU' },
334-
2: { name: 'Storage' },
335-
3: { name: 'Allocated Storage' },
336-
6: { name: 'Secondary Storage' },
337-
9: { name: 'Local Storage' },
338-
4: { name: 'Public IP' },
339-
5: { name: 'Private IP' },
340-
8: { name: 'Direct Public IP' },
334+
2: { name: _l('label.storage') },
335+
3: { name: _l('label.primary.allocated') },
336+
6: { name: _l('label.secondary.storage') },
337+
9: { name: _l('label.local.storage') },
338+
4: { name: _l('label.public.ip') },
339+
5: { name: _l('label.private.ip') },
340+
8: { name: _l('label.direct.ips') },
341341
7: { name: 'VLAN' }
342342
};
343343

0 commit comments

Comments
 (0)