Liczba wagonów pod ikoną lokomotywy

This commit is contained in:
2021-06-18 00:26:27 +02:00
parent 539a3db48b
commit 48fc79e9f5
3 changed files with 17 additions and 19 deletions
+13 -17
View File
@@ -226,18 +226,11 @@
/>
</span>
<div class="driver-cars">
<!-- {{
train.cars.length == 0
? "EZT"
: `${train.cars.length} wagon${
train.cars.length % 10 >= 5
? "ów"
: train.cars.length == 1
? ""
: "y"
}`
}} -->
<div
class="driver-cars"
v-html="calculateCars(train.locoType, train.cars) "
>
</div>
</span>
@@ -424,15 +417,18 @@ export default class TrainTable extends Vue {
!stop.stopNameRAW.includes("po.") &&
!stop.stopNameRAW.includes("SBL")
)
acc.push(
`<span style='color:${
stop.confirmed ? "springgreen" : "lightgray"
}'>${stop.stopName}</span>`
);
acc.push(`<span style='color:${ stop.confirmed ? "springgreen" : "lightgray" }'>${stop.stopName}</span>`);
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")}: <span style='color:gold'> ${cars.length}</span>`;
}
}
</script>
+2 -1
View File
@@ -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",
+2 -1
View File
@@ -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",