diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-30 10:54:01 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-30 10:54:01 +0100 |
commit | a4dabd1b6b13592e9ca07a5bbcbeff2c01e9de18 (patch) | |
tree | dbebf2bf65d95c42369e4a5ef19dd5fa4dd9566b | |
parent | 8691069a2bc58e17403e0ad9f7c963aff3706525 (diff) |
train details: i18n
-rw-r--r-- | lib/DBInfoscreen/I18N/en.pm | 15 | ||||
-rw-r--r-- | templates/_train_details.html.ep | 44 |
2 files changed, 37 insertions, 22 deletions
diff --git a/lib/DBInfoscreen/I18N/en.pm b/lib/DBInfoscreen/I18N/en.pm index 698f04f..d009b12 100644 --- a/lib/DBInfoscreen/I18N/en.pm +++ b/lib/DBInfoscreen/I18N/en.pm @@ -35,6 +35,21 @@ our %Lexicon = ( 'Impressum' => 'Imprint', # landing page 'Oder hier angeben:' => 'Or enter manually:', +# train details + 'Gleis' => 'Platform', + 'An:' => 'Arr', + 'Ab:' => 'Dep', + 'Plan:' => 'Sched', + 'Auslastung unbekannt' => 'Occupancy unknown', + 'Geringe Auslastung' => 'Low occupancy', + 'Hohe Auslastung' => 'High occupancy', + 'Sehr hohe Auslastung' => 'Very high occupancy', + 'Zug ist ausgebucht' => 'Fully booked', + 'Meldungen' => 'Messages', + 'Fahrtverlauf' => 'Route', + 'Betrieb' => 'Operator', + 'Karte' => 'Map', + 'Wagen' => 'Composition', ); 1; diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 2ed3dd4..80e1a74 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -23,27 +23,27 @@ <div> <div class="arrival <%= $departure->{arrival_hidden} ? 'timehidden' : q{} %>"> % if ($departure->{is_cancelled} and $departure->{sched_arrival}) { - <span class="minfo">An: ––:––</span><br/>Plan: <%= $departure->{sched_arrival} %> + <span class="minfo"><%= l 'An:' %> ––:––</span><br/><%= l 'Plan:' %> <%= $departure->{sched_arrival} %> % } % elsif ($departure->{arrival_is_cancelled}) { - <span class="minfo">Beginnt hier</span><br/>Plan: <%= $departure->{sched_arrival} %> + <span class="minfo">Beginnt hier</span><br/><%= l 'Plan:' %> <%= $departure->{sched_arrival} %> % } % elsif ($departure->{arrival}) { % if ($departure->{arrival} ne $departure->{sched_arrival}) { % if (($departure->{delay} // 0) < 0) { - An: <span class="undelay"><%= $departure->{arrival} %></span> + <%= l 'An:' %> <span class="undelay"><%= $departure->{arrival} %></span> % } % else { - An: <span class="minfo"><%= $departure->{arrival} %></span> + <%= l 'An:' %> <span class="minfo"><%= $departure->{arrival} %></span> % } - <br/>Plan: <%= $departure->{sched_arrival} %> + <br/><%= l 'Plan:' %> <%= $departure->{sched_arrival} %> % } % else { - An: <%= $departure->{arrival} %> + <%= l 'An:' %> <%= $departure->{arrival} %> % } % } % elsif ($departure->{sched_arrival}) { - An: <%= $departure->{sched_arrival} %> + <%= l 'An:' %><%= $departure->{sched_arrival} %> % } % elsif ($departure->{prep_time}) { Ein: <%= $departure->{prep_time} %> @@ -76,10 +76,10 @@ % } % if ($departure->{scheduled_platform} and $departure->{platform} % and $departure->{scheduled_platform} ne $departure->{platform}) { - <span class="minfo"><%= $left %>Gleis <%= $departure->{platform} %><%= $right %></span> + <span class="minfo"><%= $left %><%= l 'Gleis' %> <%= $departure->{platform} %><%= $right %></span> % } % elsif ($departure->{scheduled_platform} or $departure->{platform}) { - <%= $left %>Gleis <%= $departure->{platform} // $departure->{scheduled_platform} %><%= $right %> + <%= $left %><%= l 'Gleis' %> <%= $departure->{platform} // $departure->{scheduled_platform} %><%= $right %> % } % } % if ($departure->{arrival_hidden} and not $departure->{prep_time}) { @@ -93,22 +93,22 @@ <div> <div class="departure <%= $departure->{departure_hidden} ? 'timehidden' : q{} %>"> % if ($departure->{is_cancelled} and $departure->{sched_departure}) { - <span class="minfo">Ab: ––:––</span><br/>Plan: <%= $departure->{sched_departure} %> + <span class="minfo"><%= l 'Ab:' %> ––:––</span><br/><%= l 'Plan:' %> <%= $departure->{sched_departure} %> % } % elsif ($departure->{departure_is_cancelled}) { - <span class="minfo">Endet hier</span><br/>Plan: <%= $departure->{sched_departure} %> + <span class="minfo">Endet hier</span><br/><%= l 'Plan:' %> <%= $departure->{sched_departure} %> % } % elsif ($departure->{departure}) { % if ($departure->{departure} ne $departure->{sched_departure}) { - Ab: <span class="minfo"><%= $departure->{departure} %></span> - <br/>Plan: <%= $departure->{sched_departure} %> + <%= l 'Ab:' %> <span class="minfo"><%= $departure->{departure} %></span> + <br/><%= l 'Plan:' %> <%= $departure->{sched_departure} %> % } % else { - Ab: <%= $departure->{departure} %> + <%= l 'Ab:' %> <%= $departure->{departure} %> % } % } % elsif ($departure->{sched_departure}) { - Ab: <%= $departure->{sched_departure} %> + <%= l 'Ab:' %> <%= $departure->{sched_departure} %> % } </div> </div> @@ -116,14 +116,14 @@ <div class="verbose"> % if ($departure->{trip_id}) { % if (stash('station_name')) { - <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= stash('station_name') %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a> + <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= stash('station_name') %>"><i class="material-icons" aria-hidden="true">map</i> <%= l 'Karte' %></a> % } % else { - <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a> + <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>"><i class="material-icons" aria-hidden="true">map</i> <%= l 'Karte' %></a> % } % } % if ($departure->{wr_link}) { - <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> Wagen + <a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> <%= l 'Wagen' %> </a> % } % elsif ($icetype and $icetype->[2] and ($linetype eq 'fern' or $departure->{train_type} =~ m{NJ})) { @@ -144,7 +144,7 @@ % if (my $u = $departure->{utilization}) { <div class="verbose"> % my ($text, $icon1, $icon2) = utilization_icon($u); - <%= $text %><span style="padding-right: 0.5em;">.</span> 1. <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon1 %></i> 2. <i class="material-icons" aria-hidden="true" style="vertical-align: bottom;"><%= $icon2 %></i> + <%= l $text %><span style="padding-right: 0.5em;">.</span> 1. <i class="material-icons" aria-hidden="true" style="padding-right: 0.5em; vertical-align: bottom;"><%= $icon1 %></i> 2. <i class="material-icons" aria-hidden="true" style="vertical-align: bottom;"><%= $icon2 %></i> </div> % } % elsif (my $o = $departure->{occupancy}) { @@ -167,7 +167,7 @@ % } % if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { - Meldungen: +%= l 'Meldungen' <ul class="messages"> % for my $pair (@{$departure->{moreinfo}}) { <li> @@ -203,7 +203,7 @@ </ul> % } % if ($departure->{route_pre_diff} and $departure->{route_post_diff}) { - Fahrtverlauf: +%= l 'Fahrtverlauf' <ul class="mroute"> % for my $stop (@{$departure->{route_pre_diff}}) { <li class="<%= $stop->{isPast} ? 'past-stop' : 'future-stop' %>"> @@ -291,7 +291,7 @@ </ul> <!-- mroute --> % } % if ($departure->{operator}) { - <div class="details">Betrieb: <%= $departure->{operator} %></div> + <div class="details"><%= l 'Betrieb' %>: <%= $departure->{operator} %></div> % } % if ($departure->{details} and @{$departure->{details}}) { <div class="details">Details: |