Merge pull request #11527 from ChantsovaEkaterina/improvement/recent-dashboards-widget-translatable-dashboard-titles

Recent dashboards widget - apply custom translation for dashboard titles
This commit is contained in:
Igor Kulikov 2024-09-03 16:53:19 +03:00 committed by GitHub
commit c53208e2fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@
{{ 'widgets.recent-dashboards.name' | translate }}
</mat-header-cell>
<mat-cell class="title" *matCellDef="let lastVisitedDashboard">
<a [routerLink]="createDashboardUrl(lastVisitedDashboard.id)">{{ lastVisitedDashboard.title }}</a>
<a [routerLink]="createDashboardUrl(lastVisitedDashboard.id)">{{ lastVisitedDashboard.title | customTranslate }}</a>
</mat-cell>
</ng-container>
<ng-container matColumnDef="lastVisited">
@ -78,7 +78,7 @@
class="star" [ngClass]="{'starred': dashboard.starred}">{{ dashboard.starred ? 'star' : 'star_border' }}</mat-icon>
</div>
<div class="tb-cell title">
<a [routerLink]="createDashboardUrl(dashboard.id)">{{ dashboard.title }}</a>
<a [routerLink]="createDashboardUrl(dashboard.id)">{{ dashboard.title | customTranslate }}</a>
</div>
</div>
</div>

View File

@ -32,7 +32,7 @@
[matAutocomplete]="dashboardAutocomplete"
[fxShow]="!useDashboardLink || !disabled || !selectDashboardFormGroup.get('dashboard').value">
<a *ngIf="useDashboardLink && selectDashboardFormGroup.get('dashboard').value && disabled" aria-label="Open device profile" [routerLink]=dashboardURL>
{{ displayDashboardFn(selectDashboardFormGroup.get('dashboard').value) }}
{{ displayDashboardFn(selectDashboardFormGroup.get('dashboard').value) | customTranslate }}
</a>
<button *ngIf="selectDashboardFormGroup.get('dashboard').value && !disabled"
type="button"
@ -54,7 +54,7 @@
#dashboardAutocomplete="matAutocomplete"
[displayWith]="displayDashboardFn">
<mat-option *ngFor="let dashboard of filteredDashboards | async" [value]="dashboard">
<span [innerHTML]="dashboard.title | highlight:searchText"></span>
<span [innerHTML]="dashboard.title | customTranslate | highlight:searchText"></span>
</mat-option>
<mat-option *ngIf="!(filteredDashboards | async)?.length" [value]="null">
<div (click)="$event.stopPropagation()">