From 8ad9000766329dc6466b22a44b73078cb3445234 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Wed, 3 Oct 2018 11:22:21 +0200 Subject: [PATCH] Add more i18n strings --- .../campaign-player-detail.component.ts | 4 ++- .../highscore/highscore.component.html | 8 ++--- .../war/scoreboard/scoreboard.component.html | 8 ++--- .../war/scoreboard/scoreboard.component.ts | 7 ----- .../war/war-edit/war-edit.component.html | 28 ++++++++++-------- .../war/war-edit/war-edit.component.ts | 3 ++ .../war/war-header/war-header.component.html | 29 ++++++++++++------- static/src/app/utils/player-utils.ts | 22 +++++++------- static/src/assets/i18n/statistics/de.json | 18 ++++++++++-- 9 files changed, 75 insertions(+), 52 deletions(-) diff --git a/static/src/app/statistic/campaign/campaign-player-detail/campaign-player-detail.component.ts b/static/src/app/statistic/campaign/campaign-player-detail/campaign-player-detail.component.ts index 1b1fe14..ce934aa 100644 --- a/static/src/app/statistic/campaign/campaign-player-detail/campaign-player-detail.component.ts +++ b/static/src/app/statistic/campaign/campaign-player-detail/campaign-player-detail.component.ts @@ -74,7 +74,9 @@ export class CampaignPlayerDetailComponent implements OnInit { for (let i = 0; i < this.playerAttributeNameMap.length; i++) { const attr = this.playerAttributeNameMap[i]; - this.graphData.push({key: attr.prop, label: attr.head}); + this.translate.get(attr.head).subscribe((translated) => { + this.graphData.push({key: attr.prop, label: translated}); + }); } this.initDataArray(); diff --git a/static/src/app/statistic/campaign/highscore/highscore.component.html b/static/src/app/statistic/campaign/highscore/highscore.component.html index 41b3c5e..6992cc8 100644 --- a/static/src/app/statistic/campaign/highscore/highscore.component.html +++ b/static/src/app/statistic/campaign/highscore/highscore.component.html @@ -2,14 +2,14 @@
@@ -26,7 +26,7 @@ - Name + {{'stats.highscore.header.name' | translate}} {{element.name}} @@ -36,7 +36,7 @@ + matTooltip="{{attributeMap.head | translate}}"> {{element[attributeMap.prop]}} diff --git a/static/src/app/statistic/war/scoreboard/scoreboard.component.html b/static/src/app/statistic/war/scoreboard/scoreboard.component.html index 9fc1427..ebd4e7b 100644 --- a/static/src/app/statistic/war/scoreboard/scoreboard.component.html +++ b/static/src/app/statistic/war/scoreboard/scoreboard.component.html @@ -7,7 +7,7 @@ class="mat-elevation-z8"> - {{tableHead[0].head}} + {{tableHead[0].head | translate}} {{element.name}} @@ -15,14 +15,14 @@ - {{tableHead[1].head}} + {{tableHead[1].head | translate}} {{element.fraction === 'BLUFOR' ? fraction.BLUFOR : fraction.OPFOR}} + matTooltip="{{column.head | translate}}"> {{element[column.prop]}} @@ -32,7 +32,7 @@