Fix translations in campaign overview

pull/46/head
HardiReady 2018-10-05 10:29:57 +02:00
parent f9c9e20339
commit bf4b219234
3 changed files with 5 additions and 18 deletions

View File

@ -26,7 +26,7 @@
[legendTitle]="legendTitle" [legendTitle]="legendTitle"
[showXAxisLabel]="showXAxisLabel" [showXAxisLabel]="showXAxisLabel"
[showYAxisLabel]="showYAxisLabel" [showYAxisLabel]="showYAxisLabel"
[yAxisLabel]="yAxisLabel" yAxisLabel="{{yAxisLabel | translate}}"
[autoScale]="autoscale" [autoScale]="autoscale"
[timeline]="timeline" [timeline]="timeline"
[roundDomains]="roundDomains"> [roundDomains]="roundDomains">

View File

@ -66,19 +66,6 @@ export class StatisticOverviewComponent implements OnInit {
if (itemsProcessed === campaigns.length) { if (itemsProcessed === campaigns.length) {
if (this.id === 'all') { if (this.id === 'all') {
this.timeline = true; this.timeline = true;
this.title = 'Gesamtübersicht';
wars.sort((a, b) => {
// sort by dates, because older campaign can contain newer war
if (a['date'] > (b['date'])) {
return -1;
}
if (a['date'] < (b['date'])) {
return 1;
}
return 0;
});
} else {
this.title = campaign.title;
} }
this.initChart(wars); this.initChart(wars);
} }
@ -89,15 +76,15 @@ export class StatisticOverviewComponent implements OnInit {
switch (parseInt(index, 10)) { switch (parseInt(index, 10)) {
case 0: case 0:
this.currentData = this.pointSumData; this.currentData = this.pointSumData;
this.yAxisLabel = 'Gesamtpunkte'; this.yAxisLabel = 'stats.graph.select.sum.points';
break; break;
case 1: case 1:
this.currentData = this.pointData; this.currentData = this.pointData;
this.yAxisLabel = 'Punkte'; this.yAxisLabel = 'stats.graph.select.battle.points';
break; break;
case 2: case 2:
this.currentData = this.playerData; this.currentData = this.playerData;
this.yAxisLabel = 'Anzahl Spieler'; this.yAxisLabel = 'stats.graph.select.player.count';
break; break;
} }
} }

View File

@ -24,7 +24,7 @@
"stats.graph.select.sum.points": "Total Score", "stats.graph.select.sum.points": "Total Score",
"stats.graph.select.battle.points": "Score per Battle", "stats.graph.select.battle.points": "Score per Battle",
"stats.graph.select.player.count": "Player count", "stats.graph.select.player.count": "Player Count",
"stats.fraction.select.points": "Score", "stats.fraction.select.points": "Score",
"stats.fraction.select.budget": "Budget", "stats.fraction.select.budget": "Budget",