Ajout des traductions
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { AddAction } from '../../models/add-action.enum';
|
||||
import { DropZoneResp } from '../../models/dropzone';
|
||||
@@ -30,7 +31,8 @@ export class ListOfDzsComponent implements OnInit {
|
||||
constructor(private serviceApi: DropzoneService,
|
||||
private serviceComm: ServiceComm,
|
||||
private authenticationService: AuthenticationService,
|
||||
public dialog: MatDialog) {
|
||||
public dialog: MatDialog,
|
||||
private translateService: TranslateService) {
|
||||
this.isUserAdmin = this.authenticationService.currentUserValue.roles === "admin";
|
||||
}
|
||||
|
||||
@@ -41,7 +43,13 @@ export class ListOfDzsComponent implements OnInit {
|
||||
this.getListOfDropZones();
|
||||
}
|
||||
});
|
||||
this.serviceComm.UpdatedComponentTitle('List of DZs');
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
|
||||
if (data === true){
|
||||
this.updateTitle();
|
||||
}
|
||||
});
|
||||
|
||||
this.updateTitle();
|
||||
this.getListOfDropZones();
|
||||
}
|
||||
|
||||
@@ -88,4 +96,10 @@ export class ListOfDzsComponent implements OnInit {
|
||||
const filterValue = (event.target as HTMLInputElement).value;
|
||||
this.dataSourceTable.filter = filterValue.trim().toLowerCase();
|
||||
}
|
||||
|
||||
private updateTitle() {
|
||||
this.translateService.get("ListDz_Title").subscribe(
|
||||
data => { this.serviceComm.UpdatedComponentTitle(data); }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user