Ajout des traductions

This commit is contained in:
Sébastien André
2021-05-31 11:26:54 +02:00
parent 0833930135
commit 03cf10e69c
17 changed files with 251 additions and 61 deletions

View File

@@ -27,10 +27,12 @@ export class DefaultComponent implements OnInit {
this.authenticationService.alwaysLogin();
this.putToCacheRefDatas().subscribe(() => { console.log("Push to cache the referentiel datas"); });
this.translateService.get("Home").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
);
this.updateTitle();
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
if (data === true){
this.updateTitle();
}
});
}
private putToCacheRefDatas(): Observable<any[]> {
@@ -41,4 +43,10 @@ export class DefaultComponent implements OnInit {
return forkJoin([aircraftResp, jumpTypeResp, dzResp, gearResp]);
}
private updateTitle() {
this.translateService.get("Default_Title").subscribe(
data => { this.serviceComm.UpdatedComponentTitle(data); }
);
}
}