From dd0d7897cf81817b3f615a2d3bd56445bf2b707f Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 4 Jul 2025 17:12:38 +0200 Subject: [PATCH] chore: better descriptions for active timetables statuses in scenery view --- .../SceneryView/SceneryTimetable.vue | 7 +++-- .../SceneryView/ScheduledTrainStatus.vue | 30 ++++++------------- src/locales/en.json | 18 +++++------ src/locales/pl.json | 20 ++++++------- 4 files changed, 32 insertions(+), 43 deletions(-) diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue index cb34fb7..d7b4395 100644 --- a/src/components/SceneryView/SceneryTimetable.vue +++ b/src/components/SceneryView/SceneryTimetable.vue @@ -134,9 +134,9 @@  {{ row.train.trainNo }} -  •  - {{ row.train.driverName }} + + {{ row.train.driverName }} .train-badge { diff --git a/src/components/SceneryView/ScheduledTrainStatus.vue b/src/components/SceneryView/ScheduledTrainStatus.vue index 90755f6..4610e6c 100644 --- a/src/components/SceneryView/ScheduledTrainStatus.vue +++ b/src/components/SceneryView/ScheduledTrainStatus.vue @@ -2,11 +2,9 @@
- {{ computedScheduledTrain.stopStatusIndicator }}
@@ -41,8 +39,7 @@ export default defineComponent({ switch (status) { case StopStatus.ARRIVING: - stopStatusIndicator = `${this.$t('timetables.from')}: ${prevDepartureIndicator}`; - stopStatusDescription = this.$t('timetables.desc-arriving', { + stopStatusIndicator = this.$t('timetables.desc-arriving', { prevStationName: prevElement?.stationName ?? '', prevDepartureLine: prevElement?.departureRouteExt ?? '' }); @@ -51,9 +48,6 @@ export default defineComponent({ case StopStatus.ONLINE: case StopStatus.STOPPED: stopStatusIndicator = nextElement?.arrivalRouteExt - ? `${this.$t('timetables.to')}: ${nextArrivalIndicator}` - : `${this.$t('timetables.desc-end')}`; - stopStatusDescription = nextElement?.arrivalRouteExt ? this.$t(`timetables.desc-${status}`, { nextStationName: nextElement?.stationName, nextArrivalLine: nextElement?.arrivalRouteExt @@ -62,14 +56,14 @@ export default defineComponent({ break; case StopStatus.DEPARTED: - stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; + // stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; if (!nextElement?.stationName) { - stopStatusDescription = this.$t('timetables.desc-departed-ends', { + stopStatusIndicator = this.$t('timetables.desc-departed-ends', { nextStationName: currentElement.stationName }); } else { - stopStatusDescription = this.$t('timetables.desc-departed', { + stopStatusIndicator = this.$t('timetables.desc-departed', { nextStationName: nextElement?.stationName ?? currentElement.stationName, nextArrivalLine: nextElement?.arrivalRouteExt }); @@ -78,16 +72,16 @@ export default defineComponent({ break; case StopStatus.DEPARTED_AWAY: - stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; - stopStatusDescription = this.$t('timetables.desc-departed-away', { + // stopStatusIndicator = `${this.$t('timetables.to')}: ${nextArrivalIndicator}`; + stopStatusIndicator = this.$t('timetables.desc-departed-away', { nextStationName: nextElement?.stationName, nextArrivalLine: nextElement?.arrivalRouteExt }); break; case StopStatus.TERMINATED: - stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`; - stopStatusDescription = this.$t('timetables.desc-terminated'); + // stopStatusIndicator = `X ${this.$t('timetables.desc-terminated')}`; + stopStatusIndicator = this.$t('timetables.desc-terminated'); break; default: @@ -95,7 +89,6 @@ export default defineComponent({ } return { ...this.sceneryTimetableRow, - stopStatusDescription, stopStatusIndicator }; } @@ -106,7 +99,6 @@ export default defineComponent({ diff --git a/src/locales/en.json b/src/locales/en.json index 329a9ac..0c8f1d2 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -589,15 +589,15 @@ "terminated": "Timetable terminated", "begins": "BEGINS HERE", "terminates": "TERMINATES\nHERE", - "from": "FROM", - "to": "TO", - "desc-arriving": "The train is not here yet.\nIt's going to come from: {prevStationName} (route {prevDepartureLine})", - "desc-online": "The train is at the station.\nIt's going to leave to: {nextStationName} (route {nextArrivalLine})", - "desc-stopped": "The train is at the station and is stopped.\nIt's going to leave towards: {nextStationName} (route {nextArrivalLine})", - "desc-next-arrival": "Leaves towards: {nextStationName} (route {nextArrivalLine})", - "desc-departed": "The train is at the station and it's been departed.\nLeaves towards: {nextStationName} (route {nextArrivalLine})", - "desc-departed-ends": "The train is at the station and it's been departed.\nLeaves towards station: {nextStationName}", - "desc-departed-away": "The train has been departed to:\n{nextStationName} (route {nextArrivalLine})", + "from": "Arrives from", + "to": "Departs to", + "desc-arriving": "Arrives from: {prevStationName} ({prevDepartureLine})", + "desc-online": "On scenery / direction: {nextStationName} ({nextArrivalLine})", + "desc-stopped": "On scenery - stopped / direction: {nextStationName} ({nextArrivalLine})", + "desc-next-arrival": "On scenery / direction: {nextStationName} ({nextArrivalLine})", + "desc-departed": "On scenery / departed to: {nextStationName} ({nextArrivalLine})", + "desc-departed-ends": "On scenery / departed to: {nextStationName}", + "desc-departed-away": "Departed to: {nextStationName} ({nextArrivalLine})", "desc-end": "The train terminates here", "desc-terminated": "The train has been terminated" }, diff --git a/src/locales/pl.json b/src/locales/pl.json index e79c60b..350a6bf 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -575,17 +575,17 @@ "terminated": "Rozkład jazdy zakończony", "begins": "ROZPOCZYNA\nBIEG", "terminates": "KOŃCZY BIEG", - "from": "Z", - "to": "DO", - "desc-arriving": "Pociągu nie ma jeszcze na tej scenerii.\nPrzyjedzie z: {prevStationName} (szlak {prevDepartureLine})", - "desc-online": "Pociąg jest na tej scenerii.\nOdjedzie w kierunku: {nextStationName} (szlak {nextArrivalLine})", - "desc-stopped": "Pociąg jest na tej scenerii i odbywa postój.\nOdjedzie w kierunku: {nextStationName} (szlak {nextArrivalLine})", - "desc-next-arrival": "Odjeżdża do:\n{nextStationName} (szlak {nextArrivalLine})", - "desc-departed": "Pociąg jest na tej scenerii i został odprawiony.\nOdjeżdża w kierunku: {nextStationName} (szlak {nextArrivalLine})", - "desc-departed-ends": "Pociąg jest na tej scenerii i został odprawiony.\nOdjechał w kierunku stacji: {nextStationName}", - "desc-departed-away": "Pociąg został odprawiony i odjechał do:\n{nextStationName} (szlak {nextArrivalLine})", + "from": "Przyjedzie z", + "to": "Odjeżdża do", + "desc-arriving": "Przyjedzie z: {prevStationName} ({prevDepartureLine})", + "desc-online": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-stopped": "Na scenerii - postój / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-next-arrival": "Na scenerii / kierunek: {nextStationName} ({nextArrivalLine})", + "desc-departed": "Na scenerii / odprawiony do: {nextStationName} ({nextArrivalLine})", + "desc-departed-ends": "Na scenerii / odprawiony do: {nextStationName}", + "desc-departed-away": "Odprawiony do: {nextStationName} ({nextArrivalLine})", "desc-end": "Pociąg kończy bieg", - "desc-terminated": "Pociąg skończył bieg" + "desc-terminated": "Pociąg zaskończył bieg" }, "history": { "title": "DZIENNIK ROZKŁADÓW JAZDY"