diff --git a/src/app/interface/WaypointsEntity.ts b/src/app/interface/WaypointsEntity.ts
index 3c98648..7c52dba 100644
--- a/src/app/interface/WaypointsEntity.ts
+++ b/src/app/interface/WaypointsEntity.ts
@@ -1,5 +1,5 @@
export interface WaypointsEntity {
- id: number;
+ id?: number;
name: string;
lat: number;
lon: number;
diff --git a/src/app/interface/translations.ts b/src/app/interface/translations.ts
index f944289..a56c7d7 100644
--- a/src/app/interface/translations.ts
+++ b/src/app/interface/translations.ts
@@ -13,3 +13,24 @@ export interface listTranslations {
positionNotFoundErrorMessage: string;
}
+export interface managementTranslations {
+ users: string;
+ locations: string;
+ waypoints: string;
+ name: string;
+ username: string;
+ password: string;
+ location: string;
+ region: string;
+ lat: string;
+ lon: string;
+ description: string;
+ locationName: string;
+ image: string;
+ translate: string;
+ addUserButton: string;
+ addLocationButton: string;
+ addWaypointButton: string;
+ add: string;
+ close: string;
+}
diff --git a/src/app/service/language/readTranslateJson.service.ts b/src/app/service/language/readTranslateJson.service.ts
index 172c6a6..90b6ff2 100644
--- a/src/app/service/language/readTranslateJson.service.ts
+++ b/src/app/service/language/readTranslateJson.service.ts
@@ -1,6 +1,6 @@
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
-import {homeTranslations} from "../../interface/translations";
+import {homeTranslations, managementTranslations} from "../../interface/translations";
import {listTranslations} from "../../interface/translations";
@Injectable({
@@ -9,6 +9,7 @@ import {listTranslations} from "../../interface/translations";
export class ReadTranslateJsonService {
private homeTranslations: homeTranslations = {} as homeTranslations; // declares a private object to hold the home translations
private listTranslation: listTranslations = {} as listTranslations; // declares a private object to hold the list translations
+ private managementTransaltion: managementTranslations = {} as managementTranslations; // declares a private object to hold the management translations
constructor(private http: HttpClient) {
// loads the home translations from the assets file for the English language
@@ -29,6 +30,29 @@ export class ReadTranslateJsonService {
this.listTranslation.positionNotFoundErrorMessage = data.positionNotFoundErrorMessage;
console.log("data loaded", this.homeTranslations)
});
+
+ this.http.get('assets/i18n/management/en.json').subscribe(data => {
+ this.managementTransaltion.translate = data.translate;
+ this.managementTransaltion.users = data.users;
+ this.managementTransaltion.locations = data.locations;
+ this.managementTransaltion.waypoints = data.waypoints;
+ this.managementTransaltion.name = data.name;
+ this.managementTransaltion.username = data.username;
+ this.managementTransaltion.password = data.password;
+ this.managementTransaltion.location = data.location;
+ this.managementTransaltion.region = data.region;
+ this.managementTransaltion.lat = data.lat;
+ this.managementTransaltion.lon = data.lon;
+ this.managementTransaltion.description = data.description;
+ this.managementTransaltion.locationName = data.locationName;
+ this.managementTransaltion.image = data.image;
+ this.managementTransaltion.addUserButton = data.addUserButton;
+ this.managementTransaltion.addLocationButton = data.addLocationButton;
+ this.managementTransaltion.addWaypointButton = data.addWaypointButton;
+ this.managementTransaltion.add = data.add;
+ this.managementTransaltion.close = data.close;
+ console.log("data loaded", this.homeTranslations)
+ });
}
// returns the home translations object
@@ -40,4 +64,8 @@ export class ReadTranslateJsonService {
getListTransaltions(): listTranslations {
return this.listTranslation;
}
+
+ getManagementTranslations(): managementTranslations {
+ return this.managementTransaltion;
+ }
}
diff --git a/src/assets/i18n/management/en.json b/src/assets/i18n/management/en.json
new file mode 100644
index 0000000..ab6df28
--- /dev/null
+++ b/src/assets/i18n/management/en.json
@@ -0,0 +1,21 @@
+{
+ "users": "Users",
+ "locations": "Locations",
+ "waypoints": "Waypoints",
+ "name": "Name",
+ "username": "Username",
+ "password": "Password",
+ "location": "Location",
+ "region": "Region",
+ "lat": "Latitude",
+ "lon": "Longitude",
+ "description": "Description",
+ "locationName": "Location Name",
+ "image": "Image",
+ "translate": "Translate",
+ "addUserButton": "Add User",
+ "addLocationButton": "Add Location",
+ "addWaypointButton": "Add Waypoint",
+ "add": "Add",
+ "close": "Close"
+}