diff options
author | Yorhel <git@yorhel.nl> | 2022-09-28 09:20:45 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2022-09-28 09:35:55 +0200 |
commit | 633080401f3345ea8c08503b27d0579cf95d49f2 (patch) | |
tree | 4b31d28dc99fc741095416d01c8aabc7e0ab56f7 /lib | |
parent | 74250a12772f85822a465b6cbea42d43421f388d (diff) |
Releases::Page: Split language lines again, duplicate the main title instead
Partial revert of 6b2d6d5e0705dbfe3f80d839e7f17ed19def0e0b. Turns out
that wasn't going to work out because we still need to display the MTL
flag somewhere. Duplicating the title is probably less confusing.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/Releases/Page.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/VNWeb/Releases/Page.pm b/lib/VNWeb/Releases/Page.pm index 1e783512..71612c8e 100644 --- a/lib/VNWeb/Releases/Page.pm +++ b/lib/VNWeb/Releases/Page.pm @@ -143,20 +143,21 @@ sub _infotable_ { td_ $r->{titles}->@* == 1 ? 'Title' : 'Titles'; td_ sub { table_ sub { + my($olang) = grep $_->{lang} eq $r->{olang}, $r->{titles}->@*; tr_ class => 'nostripe title', sub { td_ style => 'white-space: nowrap', sub { - abbr_ class => "icons lang $_->{lang}", title => $LANGUAGE{$_->{lang}}, '' - for ($_, $_->{lang} eq $r->{olang} ? grep !defined $_->{title}, $r->{titles}->@* : ()); + abbr_ class => "icons lang $_->{lang}", title => $LANGUAGE{$_->{lang}}, ''; }; td_ sub { - span_ lang_attr($_->{lang}), $_->{title}; + span_ lang_attr($_->{lang}), $_->{title}//$olang->{title}; b_ class => 'grayedout', ' (machine translation)' if $_->{mtl}; - if($_->{latin}) { + my $latin = defined $_->{title} ? $_->{latin} : $olang->{latin}; + if(defined $latin) { br_; - txt_ $_->{latin}; + txt_ $latin; } } - } for grep defined $_->{title}, $r->{titles}->@*; + } for $r->{titles}->@*; }; }; }; |