Ajout des traductions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { formatDate } from '@angular/common';
|
||||
import { DateAdapter, MAT_DATE_FORMATS, NativeDateAdapter } from "@angular/material/core";
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
import { JumpTypeResp } from "../../models/jumpType";
|
||||
import { AircraftResp } from "../../models/aircraft";
|
||||
@@ -68,14 +69,19 @@ export class NewJumpComponent implements OnInit {
|
||||
private serviceAircraft: AircraftService,
|
||||
private serviceDropzone: DropzoneService,
|
||||
private serviceGear: GearService,
|
||||
private dateService: DateService) {}
|
||||
private dateService: DateService,
|
||||
private translateService: TranslateService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.UpdatedComponentTitle("Add a new jump");
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data)=> {
|
||||
if (data === true){
|
||||
this.updateTitle();
|
||||
}
|
||||
});
|
||||
this.updateTitle();
|
||||
|
||||
this.pendingAddRequest = false;
|
||||
|
||||
this.initForm();
|
||||
|
||||
this.getListOfJumpTypes();
|
||||
}
|
||||
|
||||
@@ -213,4 +219,10 @@ export class NewJumpComponent implements OnInit {
|
||||
this.selectedDz = undefined;
|
||||
this.onChangeDz('');
|
||||
}
|
||||
|
||||
private updateTitle() {
|
||||
this.translateService.get("NewJump_Title").subscribe(
|
||||
data => { this.serviceComm.UpdatedComponentTitle(data); }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user