Skip to content

Commit

Permalink
Use "Steig" rather than "Gleis" for bus platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Aug 30, 2024
1 parent 4d159fe commit 99a8956
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
5 changes: 5 additions & 0 deletions lib/Travelynx/Model/InTransit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ sub postprocess {
$ret->{extra_data} = $ret->{data};
$ret->{comment} = $ret->{user_data}{comment};

$ret->{platform_type} = 'Gleis';
if ( $ret->{train_type} =~ m{ ast | bus | ruf }ix ) {
$ret->{platform_type} = 'Steig';
}

$ret->{visibility_str}
= $ret->{visibility}
? $visibility_itoa{ $ret->{visibility} }
Expand Down
12 changes: 6 additions & 6 deletions templates/_checked_in.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
% }
% if ($journey->{arrival_countdown} < (60 * 15) and $journey->{arr_platform}) {
% if ($journey->{arr_direction} and $journey->{arr_direction} eq 'r') {
<br/>Gleis <%= $journey->{arr_platform} %> ▶
<br/><%= $journey->{platform_type} %> <%= $journey->{arr_platform} %> ▶
% }
% elsif ($journey->{arr_direction} and $journey->{arr_direction} eq 'l') {
<br/>◀ Gleis <%= $journey->{arr_platform} %>
<br/>◀ <%= $journey->{platform_type} %> <%= $journey->{arr_platform} %>
% }
% else {
<br/>auf Gleis <%= $journey->{arr_platform} %>
<br/>auf <%= $journey->{platform_type} %> <%= $journey->{arr_platform} %>
% }
% }
% }
Expand All @@ -57,13 +57,13 @@
% }
% if ($journey->{departure_countdown} > 0 and $journey->{dep_platform}) {
% if ($journey->{dep_direction} and $journey->{dep_direction} eq 'r') {
<br/>Gleis <%= $journey->{dep_platform} %> ▶
<br/><%= $journey->{platform_type} %> <%= $journey->{dep_platform} %> ▶
% }
% elsif ($journey->{dep_direction} and $journey->{dep_direction} eq 'l') {
<br/>◀ Gleis <%= $journey->{dep_platform} %>
<br/>◀ <%= $journey->{platform_type} %> <%= $journey->{dep_platform} %>
% }
% else {
<br/>von Gleis <%= $journey->{dep_platform} %>
<br/>von <%= $journey->{platform_type} %> <%= $journey->{dep_platform} %>
% }
% }
% if (my $wr = $journey->{wagonorder}) {
Expand Down
10 changes: 9 additions & 1 deletion templates/_connections_hafas.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@
</a>
<span class="connect-platform-wrapper">
% if ($train->platform) {
<span>Gleis <%= $train->platform %></span>
<span>
% if (($train->type // q{}) =~ m{ ast | bus | ruf }ix) {
Steig
% }
% else {
Gleis
% }
%= $train->platform
</span>
% }
<span class="dep-line <%= $train->type // q{} %>">
%= $train->line
Expand Down

0 comments on commit 99a8956

Please sign in to comment.