summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-31 20:41:06 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-31 20:41:06 +0200
commit2be390cbb3a94c622cf48618f791da1f78b248e0 (patch)
treebdd4f3ad3daebf03ab6a29a6005b0603427c783b
parent9504a680be2916aeb8627b367c7f5dabcf2a9619 (diff)
fix trailing ":" after cancellation messages without reason4.1.0
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index ccd9be2..f7c469a 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -374,10 +374,16 @@ sub format_iris_result_info {
= join( ', ', map { $_->[1] } $result->delay_messages );
my $qosmsg = join( ' +++ ', map { $_->[1] } $result->qos_messages );
if ( $result->is_cancelled ) {
- $info = "Fahrt fällt aus: ${delaymsg}";
+ $info = "Fahrt fällt aus";
+ if ($delaymsg) {
+ $info .= ": ${delaymsg}";
+ }
}
elsif ( $result->departure_is_cancelled ) {
- $info = "Zug endet hier: ${delaymsg}";
+ $info = "Zug endet hier";
+ if ($delaymsg) {
+ $info .= ": ${delaymsg}";
+ }
}
elsif ( $result->delay and $result->delay > 0 ) {
if ( $template eq 'app' or $template eq 'infoscreen' ) {