summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm12
-rw-r--r--lib/DBInfoscreen/Helper/HAFAS.pm2
2 files changed, 13 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;
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm
index 11878ff..66a43df 100644
--- a/lib/DBInfoscreen/Helper/HAFAS.pm
+++ b/lib/DBInfoscreen/Helper/HAFAS.pm
@@ -188,6 +188,7 @@ sub get_route_timestamps_p {
journey => {
id => $opt{trip_id},
},
+ language => $opt{language},
cache => $self->{realtime_cache},
promise => 'Mojo::Promise',
user_agent => $self->{user_agent}->request_timeout(10)
@@ -215,6 +216,7 @@ sub get_route_timestamps_p {
# name => $opt{train_no},
},
+ language => $opt{language},
cache => $self->{realtime_cache},
promise => 'Mojo::Promise',
user_agent => $self->{user_agent}->request_timeout(10)