summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen/Controller/Stationboard.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-10-31 14:50:32 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-10-31 14:50:32 +0100
commitea80109aeab7df8fa0c6432a1392ced2689c40af (patch)
tree605a8e3b8b59162389723e5044f6ef0b1c3b8199 /lib/DBInfoscreen/Controller/Stationboard.pm
parentebcdd7b5c58855cee833bc7086dc6a431b438d0a (diff)
i18n: pass language on to HAFAS backend
Diffstat (limited to 'lib/DBInfoscreen/Controller/Stationboard.pm')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 6d75d2c..475b4fb 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -805,7 +805,13 @@ sub render_train {
}
)->wait;
- $self->hafas->get_route_timestamps_p( train => $result )->then(
+ my %opt = ( train => $result );
+
+ if ( $self->languages =~ m{^en} ) {
+ $opt{language} = 'en';
+ }
+
+ $self->hafas->get_route_timestamps_p(%opt)->then(
sub {
my ( $route_ts, $journey ) = @_;
@@ -1147,6 +1153,10 @@ sub train_details {
$opt{train_no} = $train_no;
}
+ if ( $self->languages =~ m{^en} ) {
+ $opt{language} = 'en';
+ }
+
$self->stash( hide_opts => 1 );
$self->render_later;