diff options
author | Yorhel <git@yorhel.nl> | 2016-02-12 17:45:43 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2016-02-12 17:45:43 +0100 |
commit | 323f1d599316b0c17aa47e97b80cc842e3d90ab5 (patch) | |
tree | b35498d3355a2e54af6cd16131bee7ca93f2f884 /lib | |
parent | 98acc64cabd686c21be7bfe5d90eff87b1f3601a (diff) |
Minor fixes / behaviour reverts related to the removal of L10N
- Fix mouse-over text of language flag on homepage
- Capitalize release types in edit form
- Use plural form of character roles on VN page listing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Handler/Chars.pm | 6 | ||||
-rw-r--r-- | lib/VNDB/Handler/Misc.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/VNDB/Handler/Chars.pm b/lib/VNDB/Handler/Chars.pm index 459bdf21..392bf446 100644 --- a/lib/VNDB/Handler/Chars.pm +++ b/lib/VNDB/Handler/Chars.pm @@ -60,7 +60,7 @@ sub page { [ vns => 'Visual novels', join => '<br />', split => sub { map sprintf('<a href="/v%d">v%d</a> %s %s (%s)', $_->{vid}, $_->{vid}, $_->{rid}?sprintf('[<a href="/r%d">r%d</a>]', $_->{rid}, $_->{rid}):'', - $self->{char_roles}{$_->{role}}, fmtspoil $_->{spoil}), @{$_[0]}; + $self->{char_roles}{$_->{role}}[0], fmtspoil $_->{spoil}), @{$_[0]}; }], ); } @@ -197,7 +197,7 @@ sub charTable { # special case: all releases, no exceptions if(!$vn && @r == 1 && !$r[0]{rid}) { span class => charspoil $r[0]{spoil}; - txt $self->{char_roles}{$r[0]{role}}.' - '; + txt $self->{char_roles}{$r[0]{role}}[0].' - '; a href => "/v$r[0]{vid}/chars", $r[0]{vntitle}; end; next; @@ -211,7 +211,7 @@ sub charTable { span class => charspoil $_->{spoil}; br if !$vn || $_ != $r[0]; b class => 'grayedout', '> '; - txt $self->{char_roles}{$_->{role}}.' - '; + txt $self->{char_roles}{$_->{role}}[0].' - '; if($_->{rid}) { b class => 'grayedout', "r$_->{rid}:"; a href => "/r$_->{rid}", $_->{rtitle}; diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm index fd43c026..9cdbf4e2 100644 --- a/lib/VNDB/Handler/Misc.pm +++ b/lib/VNDB/Handler/Misc.pm @@ -172,7 +172,7 @@ sub homepage { lit fmtdatestr $_->{released}; txt ' '; cssicon $_, $self->{platforms}{$_} for (@{$_->{platforms}}); - cssicon "lang $_", $self->{languages} for (@{$_->{languages}}); + cssicon "lang $_", $self->{languages}{$_} for (@{$_->{languages}}); txt ' '; a href => "/r$_->{id}", title => $_->{original}||$_->{title}, shorten $_->{title}, 30; end; diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index f71d89f4..ded79abb 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -381,7 +381,7 @@ sub _form { $self->htmlForm({ frm => $frm, action => $r ? "/r$r->{id}/".($copy ? 'copy' : 'edit') : "/v$v->{id}/add", editsum => 1 }, rel_geninfo => [ 'General info', [ select => short => 'type', name => 'Type', - options => [ map [ $_, $_ ], @{$self->{release_types}} ] ], + options => [ map [ $_, ucfirst $_ ], @{$self->{release_types}} ] ], [ check => short => 'patch', name => 'This release is a patch to another release.' ], [ check => short => 'freeware', name => 'Freeware (i.e. available at no cost)' ], [ check => short => 'doujin', name => 'Doujin (self-published, not by a company)' ], diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index e0590c37..69b07069 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -891,7 +891,7 @@ sub _chars { next if !@{$rol{$r}}; div class => 'mainbox'; $self->charOps(1) if !$first++; - h1 $self->{char_roles}{$r}; + h1 $self->{char_roles}{$r}[ @{$rol{$r}} > 1 ? 1 : 0 ]; $self->charTable($_, 1, $_ != $rol{$r}[0], 1, _charspoillvl $v->{id}, $_) for (@{$rol{$r}}); end; } @@ -919,7 +919,7 @@ sub _charsum { for my $c (@l) { div class => 'charsum_bubble'.($has_spoilers ? ' '.charspoil(_charspoillvl $v->{id}, $c) : ''); div class => 'name'; - i $self->{char_roles}{$c->{role}}; + i $self->{char_roles}{$c->{role}}[0]; a href => "/c$c->{id}", title => $c->{original}||$c->{name}, $c->{name}; end; if(@{$c->{seiyuu}}) { |