(FuseNavigation) Fixed: Translations are not being applied

This commit is contained in:
sercan 2019-12-16 08:21:37 +03:00
parent 116721dd33
commit 007739c356
6 changed files with 15 additions and 15 deletions

View File

@ -42,10 +42,10 @@
<ng-template #itemContent> <ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{(item.badge.translate | translate) || item.badge.title}}
</span> </span>
<mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon> <mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon>
</ng-template> </ng-template>

View File

@ -38,10 +38,10 @@
<ng-template #itemContent> <ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{(item.badge.translate | translate) || item.badge.title}}
</span> </span>
</ng-template> </ng-template>

View File

@ -45,10 +45,10 @@
<ng-template #itemContent> <ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{(item.badge.translate | translate) || item.badge.title}}
</span> </span>
<mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon> <mat-icon class="collapsable-arrow">keyboard_arrow_right</mat-icon>
</ng-template> </ng-template>

View File

@ -1,7 +1,7 @@
<ng-container *ngIf="!item.hidden"> <ng-container *ngIf="!item.hidden">
<div class="group-title" [ngClass]="item.classes"> <div class="group-title" [ngClass]="item.classes">
<span class="hint-text" [translate]="item.translate">{{ item.title }}</span> <span class="hint-text" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
</div> </div>
<div class="group-items"> <div class="group-items">

View File

@ -38,10 +38,10 @@
<ng-template #itemContent> <ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{(item.translate | translate) || item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{(item.badge.translate | translate) || item.badge.title}}
</span> </span>
</ng-template> </ng-template>

View File

@ -49,14 +49,14 @@ export const navigation: FuseNavigation[] = [
title : 'Products', title : 'Products',
type : 'item', type : 'item',
url : '/apps/e-commerce/products', url : '/apps/e-commerce/products',
exactMatch: true // exactMatch: true
}, },
{ {
id : 'productDetail', id : 'productDetail',
title : 'Product Detail', title : 'Product Detail',
type : 'item', type : 'item',
url : '/apps/e-commerce/products/1/printed-dress', url : '/apps/e-commerce/products/1/printed-dress',
exactMatch: true // exactMatch: true
}, },
{ {
id : 'orders', id : 'orders',