summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-03-27 18:43:31 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-03-27 18:43:31 +0100
commit6c552af10823c69dc740fea696622d543e297a1e (patch)
tree33c90615ae8351ee3f986e471dcd7ab668891dd9 /lib
parent1d9f62e14a7da11fa51e04854efbc6d5fd72a6ac (diff)
Remove I18N for now. It's incompatible with caching proxy setups.
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen.pm18
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm12
-rw-r--r--lib/DBInfoscreen/Controller/Wagenreihung.pm6
3 files changed, 9 insertions, 27 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm
index a3f22bf..c33a703 100644
--- a/lib/DBInfoscreen.pm
+++ b/lib/DBInfoscreen.pm
@@ -38,12 +38,6 @@ sub startup {
chomp $self->config->{version};
$self->defaults( version => $self->config->{version} // 'UNKNOWN' );
- $self->plugin(
- I18N => {
- default => 'de',
- },
- );
-
# Generally, the reverse proxy handles compression.
# Also, Mojolicious compression breaks legacy callback-based JSON endpoints
# for some clients.
@@ -62,18 +56,6 @@ sub startup {
if ( $cookie->name eq 'theme' ) {
$self->session( theme => $cookie->value );
}
- elsif ( $cookie->name eq 'lang' ) {
- my $l = $cookie->value;
- if ( $l eq 'de' or $l eq 'en' ) {
- $self->languages($l);
- }
- }
- }
-
- if ( my $l = $self->param('lang') ) {
- if ( $l eq 'de' or $l eq 'en' ) {
- $self->languages($l);
- }
}
}
);
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 757790d..cff1ff8 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -833,9 +833,9 @@ sub render_train {
my %opt = ( train => $result );
- if ( $self->languages =~ m{^en} ) {
- $opt{language} = 'en';
- }
+ #if ( $self->languages =~ m{^en} ) {
+ # $opt{language} = 'en';
+ #}
$self->hafas->get_route_p(%opt)->then(
sub {
@@ -1117,9 +1117,9 @@ sub train_details {
$opt{service} = $hafas;
}
- if ( $self->languages =~ m{^en} ) {
- $opt{language} = 'en';
- }
+ #if ( $self->languages =~ m{^en} ) {
+ # $opt{language} = 'en';
+ #}
if ( my $date = $self->param('date') ) {
if ( $date
diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm
index 35df7a2..1708285 100644
--- a/lib/DBInfoscreen/Controller/Wagenreihung.pm
+++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm
@@ -225,15 +225,15 @@ sub wagen {
);
}
- my $title = $self->l('Wagen ') . $wagon_id;
+ my $title = 'Wagen ' . $wagon_id;
if ( $wref->{tt} and $wref->{tn} ) {
$title = sprintf( '%s %s', $wref->{tt}, $wref->{tn} );
if ($wagon_no) {
- $title .= ' ' . $self->l('Wagen ') . $wagon_no;
+ $title .= ' Wagen ' . $wagon_no;
}
else {
- $title .= ' ' . $self->l('Wagen ') . $wagon_id;
+ $title .= ' Wagen ' . $wagon_id;
}
}