Ajout des traductions
This commit is contained in:
@@ -2,7 +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 { Observable } from 'rxjs';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { AddAction } from '../../models/add-action.enum';
|
||||
import { Jump } from '../../models/jump';
|
||||
@@ -31,7 +31,8 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
|
||||
constructor(private serviceApi: JumpService,
|
||||
private serviceComm: ServiceComm,
|
||||
public dialog: MatDialog) { }
|
||||
public dialog: MatDialog,
|
||||
private translateService: TranslateService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.refreshRequest.subscribe(action => {
|
||||
@@ -40,7 +41,13 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
this.getListOfJumps();
|
||||
}
|
||||
});
|
||||
this.serviceComm.UpdatedComponentTitle('List of jumps');
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
|
||||
if (data === true){
|
||||
this.updateTitle();
|
||||
}
|
||||
});
|
||||
|
||||
this.updateTitle();
|
||||
this.getListOfJumps();
|
||||
}
|
||||
|
||||
@@ -79,4 +86,10 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
|
||||
this.serviceApi.DeleteJump(item);
|
||||
}
|
||||
|
||||
private updateTitle() {
|
||||
this.translateService.get("ListJumps_Title").subscribe(
|
||||
data => { this.serviceComm.UpdatedComponentTitle(data); }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user