From b31c75334c0054ddae213defdb3f38280ced3aef Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 31 Oct 2023 14:37:33 +0100 Subject: i18n for map and wagon order --- templates/_map_infobox.html.ep | 34 +++++++++++++++++----------------- templates/_train_details.html.ep | 4 ++-- templates/route_map.html.ep | 2 +- templates/wagen.html.ep | 6 +++--- templates/wagenreihung.html.ep | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'templates') diff --git a/templates/_map_infobox.html.ep b/templates/_map_infobox.html.ep index 42e121d..a94cb27 100644 --- a/templates/_map_infobox.html.ep +++ b/templates/_map_infobox.html.ep @@ -4,40 +4,40 @@ data-req="<%= stash('ajax_req') %>" data-route="<%= stash('ajax_route') %>" data-poly="<%= stash('ajax_polyline') %>" > - Fahrt + %= l 'Fahrt' % if (stash('train_no')) { <%= stash('train_no') %> % } - von <%= stash('origin')->{name} %> - nach <%= stash('destination')->{name} %> + <%= l 'von' %> <%= stash('origin')->{name} %> + <%= l 'nach' %> <%= stash('destination')->{name} %> % if (my $next = stash('next_stop')) {
% if ($next->{type} eq 'present' and $next->{station}{dep} and $next->{station}{arr}) { - Aufenthalt in <%= $next->{station}{name} %> + <%= l 'Aufenthalt in' %> <%= $next->{station}{name} %> % if ($next->{station}{platform}) { - an Gleis <%= $next->{station}{platform} %> + <%= l 'an Gleis' %> <%= $next->{station}{platform} %> % } - bis <%= $next->{station}{dep}->strftime('%H:%M') %> + <%= l 'bis' %> <%= $next->{station}{dep}->strftime('%H:%M') %> % if ($next->{station}{dep_delay}) { %= sprintf('(%+d)', $next->{station}{dep_delay}) % } % } % elsif ($next->{type} eq 'present' and $next->{station}{dep}) { - Abfahrt in <%= $next->{station}{name} %> + <%= l 'Abfahrt in' %> <%= $next->{station}{name} %> % if ($next->{station}{platform}) { - von Gleis <%= $next->{station}{platform} %> + <%= l 'von Gleis' %> <%= $next->{station}{platform} %> % } - um <%= $next->{station}{dep}->strftime('%H:%M') %> + <%= l 'um' %> <%= $next->{station}{dep}->strftime('%H:%M') %> % if ($next->{station}{dep_delay}) { %= sprintf('(%+d)', $next->{station}{dep_delay}) % } % } % elsif ($next->{type} eq 'present' and $next->{station}{arr}) { - Endstation erreicht um + %= l 'Endstation erreicht um' <%= $next->{station}{arr}->strftime('%H:%M') %> % if ($next->{station}{platform}) { - auf Gleis <%= $next->{station}{platform} %> + <%= l 'auf Gleis' %> <%= $next->{station}{platform} %> % } % if ($next->{station}{arr_delay}) { %= sprintf('(%+d)', $next->{station}{arr_delay}) @@ -47,25 +47,25 @@ data-poly="<%= stash('ajax_polyline') %>" Zug steht in <%= $next->{station}{arr}->strftime('%H:%M') %> % if ($next->{station}{platform}) { - auf Gleis <%= $next->{station}{platform} %> + <%= l 'auf Gleis' %> <%= $next->{station}{platform} %> % } % } % elsif ($next->{type} eq 'next' and $next->{station}{arr}) { - Nächster Halt: + %= l 'Nächster Halt:' <%= $next->{station}{name} %> - um <%= $next->{station}{arr}->strftime('%H:%M') %> + <%= l 'um' %> <%= $next->{station}{arr}->strftime('%H:%M') %> % if ($next->{station}{arr_delay}) { %= sprintf('(%+d)', $next->{station}{arr_delay}) % } % if ($next->{station}{platform}) { - auf Gleis <%= $next->{station}{platform} %> + <%= l 'auf Gleis' %> <%= $next->{station}{platform} %> % } % } % elsif ($next->{type} eq 'next') { - Nächster Halt: + %= l 'Nächster Halt:' <%= $next->{station}{name} %> % if ($next->{station}{platform}) { - auf Gleis <%= $next->{station}{platform} %> + <%= l 'auf Gleis' %> <%= $next->{station}{platform} %> % } % }
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 80e1a74..849af3b 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -43,7 +43,7 @@ % } % } % elsif ($departure->{sched_arrival}) { - <%= l 'An:' %><%= $departure->{sched_arrival} %> + <%= l 'An:' %> <%= $departure->{sched_arrival} %> % } % elsif ($departure->{prep_time}) { Ein: <%= $departure->{prep_time} %> @@ -150,7 +150,7 @@ % elsif (my $o = $departure->{occupancy}) {
% my ($text, $icon) = occupancy_icon($o); - <%= $text %>. + <%= l $text %>.
% } % } diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep index 2f35b54..2822b6c 100644 --- a/templates/route_map.html.ep +++ b/templates/route_map.html.ep @@ -94,6 +94,6 @@ nicht implementiert. % if (my $op = stash('operator')) {
-Betrieb: <%= $op %> +<%= l 'Betrieb' %>: <%= $op %>
% } diff --git a/templates/wagen.html.ep b/templates/wagen.html.ep index efc2e32..0bb88c4 100644 --- a/templates/wagen.html.ep +++ b/templates/wagen.html.ep @@ -1,13 +1,13 @@
% if (not $wref->{e} and $wref->{s} and $wref->{p} and $wref->{ws}) {

- <%= $wref->{s} %> Gleis <%= $wref->{p} %> <%= $wref->{ws} %> + <%= $wref->{s} %> <%= l 'Gleis' %> <%= $wref->{p} %> <%= $wref->{ws} %>

% } % if ($wref->{e} eq 'u') { % if ($wref->{s} and $wref->{p} and $wref->{ws}) {
- <%= $wref->{s} %>
Gleis <%= $wref->{p} %> <%= $wref->{ws} %> + <%= $wref->{s} %>
<%= l 'Gleis' %> <%= $wref->{p} %> <%= $wref->{ws} %>
arrow_upward
arrow_upward
@@ -47,7 +47,7 @@
arrow_downward
% if ($wref->{s} and $wref->{p} and $wref->{ws}) {
- <%= $wref->{s} %>
Gleis <%= $wref->{p} %> <%= $wref->{ws} %> + <%= $wref->{s} %>
<%= l 'Gleis' %> <%= $wref->{p} %> <%= $wref->{ws} %>
% } % } diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index 493d9c6..7d2e278 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -24,16 +24,16 @@ % if ($has_multi_dest) {
% for my $destination ($wr->destinations) { - Nach <%= $destination->{name} %> in Abschnitt <%= join(q{}, sort @{$destination->{sections} // []}) %>
+ <%= l 'Nach' %> <%= $destination->{name} %> <%= l 'in Abschnitt' %> <%= join(q{}, sort @{$destination->{sections} // []}) %>
% }
% } - <%= $wr->station_name %> Gleis <%= $wr->platform %>
+ <%= $wr->station_name %> <%= l 'Gleis' %> <%= $wr->platform %>
% for my $desc ($wr->train_descriptions) { % if ($desc->{text}) { %= $desc->{text} % if ($has_multi_desc and length(join(q{}, sort @{$desc->{sections}}))) { - in Abschnitt <%= join(q{}, sort @{$desc->{sections}}) %> + <%= l 'in Abschnitt' %> <%= join(q{}, sort @{$desc->{sections}}) %> % }
% } -- cgit v1.2.3