added translation for new feature
This commit is contained in:
@@ -10,5 +10,6 @@ export interface listTranslations {
|
|||||||
translate: string;
|
translate: string;
|
||||||
locationName: string;
|
locationName: string;
|
||||||
distance: string;
|
distance: string;
|
||||||
|
positionNotFoundErrorMessage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<div class="distance">
|
<div class="distance">
|
||||||
<h4 *ngIf="distance[i]">{{translations.distance}}{{distance[i]}} km</h4>
|
<h4 *ngIf="distance[i]">{{translations.distance}}{{distance[i]}} km</h4>
|
||||||
<h4 *ngIf="positionNotFound">could not retrieve distance</h4>
|
<h4 *ngIf="positionNotFound">{{translations.positionNotFoundErrorMessage}}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -121,6 +121,6 @@ export class ListComponent implements OnInit, OnChanges {
|
|||||||
this.translations.translate = await this.translateService.getData(this.translations.translate, lang);
|
this.translations.translate = await this.translateService.getData(this.translations.translate, lang);
|
||||||
this.translations.distance = await this.translateService.getData(this.translations.distance, lang);
|
this.translations.distance = await this.translateService.getData(this.translations.distance, lang);
|
||||||
this.translations.locationName = await this.translateService.getData(this.translations.locationName, lang);
|
this.translations.locationName = await this.translateService.getData(this.translations.locationName, lang);
|
||||||
|
this.translations.positionNotFoundErrorMessage = await this.translateService.getData(this.translations.positionNotFoundErrorMessage, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export class ReadTranslateJsonService {
|
|||||||
this.listTranslation.translate = data.translate;
|
this.listTranslation.translate = data.translate;
|
||||||
this.listTranslation.distance = data.distance;
|
this.listTranslation.distance = data.distance;
|
||||||
this.listTranslation.locationName = data.locationName;
|
this.listTranslation.locationName = data.locationName;
|
||||||
|
this.listTranslation.positionNotFoundErrorMessage = data.positionNotFoundErrorMessage;
|
||||||
console.log("data loaded", this.homeTranslations)
|
console.log("data loaded", this.homeTranslations)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"translate": "Translate",
|
"translate": "Translate",
|
||||||
"locationName": "Position not found: ",
|
"locationName": "Position not found: ",
|
||||||
"distance": "Distance: "
|
"distance": "Distance: ",
|
||||||
|
"positionNotFoundErrorMessage": "Could not retrieve position"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user