[ADF-3126] i18n support for info drawer tabs (#4698)

* [ADF-3126] i18n support for info drawer tabs

* fix tests

* code fixes
This commit is contained in:
Denys Vuika
2019-05-07 17:31:22 +01:00
committed by Eugenio Romano
parent 58f7a2d0ee
commit 0e2e5e35a0
8 changed files with 27 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
<adf-info-drawer-layout>
<div *ngIf="title" info-drawer-title>{{title}}</div>
<div *ngIf="title" info-drawer-title>{{ title | translate }}</div>
<ng-content *ngIf="!title" info-drawer-title select="[info-drawer-title]"></ng-content>
<ng-content info-drawer-buttons select="[info-drawer-buttons]"></ng-content>
@@ -9,12 +9,12 @@
<ng-template #tabLayout>
<mat-tab-group [(selectedIndex)]="selectedIndex" class="adf-info-drawer-tabs" (selectedTabChange)="onTabChange($event)">
<mat-tab *ngFor="let contentBlock of contentBlocks"
[label]="contentBlock.label"
[label]="contentBlock.label | translate"
class="adf-info-drawer-tab">
<ng-template mat-tab-label>
<mat-icon *ngIf="contentBlock.icon">{{ contentBlock.icon }}</mat-icon>
<span *ngIf="contentBlock.label">{{ contentBlock.label }}</span>
<span *ngIf="contentBlock.label">{{ contentBlock.label | translate }}</span>
</ng-template>
<ng-container *ngTemplateOutlet="contentBlock.content"></ng-container>