From 48fc79e9f5e498dbc4d8db061757c4d7eeb767b9 Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 18 Jun 2021 00:26:27 +0200 Subject: [PATCH] =?UTF-8?q?Liczba=20wagon=C3=B3w=20pod=20ikon=C4=85=20loko?= =?UTF-8?q?motywy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TrainsView/TrainTable.vue | 30 ++++++++++-------------- src/lang/en.json | 3 ++- src/lang/pl.json | 3 ++- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/components/TrainsView/TrainTable.vue b/src/components/TrainsView/TrainTable.vue index 0762d43..8d65cfe 100644 --- a/src/components/TrainsView/TrainTable.vue +++ b/src/components/TrainsView/TrainTable.vue @@ -226,18 +226,11 @@ /> -
- +
+
@@ -424,15 +417,18 @@ export default class TrainTable extends Vue { !stop.stopNameRAW.includes("po.") && !stop.stopNameRAW.includes("SBL") ) - acc.push( - `${stop.stopName}` - ); + acc.push(`${stop.stopName}`); return acc; }, []) .join(" > "); } + + calculateCars(locoType: string, cars: string[]) { + if (cars.length == 0 && locoType.includes("EN")) return "EZT"; + else if (cars.length == 0) return "LOK"; + + return `${this.$t("trains.cars")}: ${cars.length}`; + } } diff --git a/src/lang/en.json b/src/lang/en.json index 6a6ade8..55f3bbc 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -107,7 +107,8 @@ "detailed-timetable": "Detailed timetable for train no. ", "via-title": "Via: ", "no-timetable": "no current timetable", - "distance-exceeded": "Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!" + "distance-exceeded": "Attention! Due to an internal error, timetables with route distance greater than 200km might be incorrect!", + "cars": "Cars" }, "journal": { "title": "SCENERY ACTIVITY JOURNAL", diff --git a/src/lang/pl.json b/src/lang/pl.json index 4d91af2..fa520fd 100644 --- a/src/lang/pl.json +++ b/src/lang/pl.json @@ -107,7 +107,8 @@ "detailed-timetable": "Szczegółowy rozkład jazdy pociągu ", "via-title": "Przez: ", "no-timetable": "brak rozkładu jazdy", - "distance-exceeded": "Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!" + "distance-exceeded": "Uwaga! Z powodu wewnętrznego błędu serwera TD2, rozkłady jazdy o kilometrażu powyżej 200km mogą być niepoprawne!", + "cars": "Wagony" }, "journal": { "title": "DZIENNIK AKTYWNOŚCI SCENERII",