diff options
author | Yorhel <git@yorhel.nl> | 2016-01-17 10:13:54 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2016-01-17 10:59:43 +0100 |
commit | b14f137dc5613472eb68ffea2bb76abc3f7172b6 (patch) | |
tree | 81c90b7bb167926bfaaa091751bea8ef7e55b4ba /lib/VNDB/Handler/ULists.pm | |
parent | d7dfc891b9156f3c85c859fa02b18401abef6919 (diff) |
L10N: Intern tag_cats/voiced/animated/*_status
Diffstat (limited to 'lib/VNDB/Handler/ULists.pm')
-rw-r--r-- | lib/VNDB/Handler/ULists.pm | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm index 888e0b8b..9a54e852 100644 --- a/lib/VNDB/Handler/ULists.pm +++ b/lib/VNDB/Handler/ULists.pm @@ -47,7 +47,7 @@ sub vnwish { return if !$self->authCheckCode; my $f = $self->formValidate( - { get => 's', enum => [ -1, @{$self->{wishlist_status}} ] }, + { get => 's', enum => [ -1..$#{$self->{wishlist_status}} ] }, { get => 'ref', required => 0, default => "/v$id" } ); return $self->resNotFound if $f->{_err}; @@ -67,7 +67,7 @@ sub vnlist_e { return if !$self->authCheckCode; my $f = $self->formValidate( - { get => 'e', enum => [ -1, @{$self->{vnlist_status}} ] }, + { get => 'e', enum => [ -1..$#{$self->{vnlist_status}} ] }, { get => 'ref', required => 0, default => "/v$id" } ); return $self->resNotFound if $f->{_err}; @@ -94,7 +94,7 @@ sub rlist_e { return if !$self->authCheckCode; my $f = $self->formValidate( - { get => 'e', required => 1, enum => [ -1, @{$self->{rlist_status}} ] }, + { get => 'e', required => 1, enum => [ -1..$#{$self->{rlist_status}} ] }, { get => 'ref', required => 0, default => "/r$rid" } ); return $self->resNotFound if $f->{_err}; @@ -230,7 +230,7 @@ sub wishlist { { get => 'p', required => 0, default => 1, template => 'page' }, { get => 'o', required => 0, default => 'd', enum => [ 'a', 'd' ] }, { get => 's', required => 0, default => 'wstat', enum => [qw|title added wstat|] }, - { get => 'f', required => 0, default => -1, enum => [ -1, @{$self->{wishlist_status}} ] }, + { get => 'f', required => 0, default => -1, enum => [ -1..$#{$self->{wishlist_status}} ] }, ); return $self->resNotFound if $f->{_err}; @@ -238,7 +238,7 @@ sub wishlist { return if !$self->authCheckCode; my $frm = $self->formValidate( { post => 'sel', required => 0, default => 0, multi => 1, template => 'id' }, - { post => 'batchedit', required => 1, enum => [ -1, @{$self->{wishlist_status}} ] }, + { post => 'batchedit', required => 1, enum => [ -1..$#{$self->{wishlist_status}} ] }, ); $frm->{sel} = [ grep $_, @{$frm->{sel}} ]; # weed out "select all" checkbox if(!$frm->{_err} && @{$frm->{sel}} && $frm->{sel}[0]) { @@ -268,8 +268,8 @@ sub wishlist { } p class => 'browseopts'; a $f->{f} == $_ ? (class => 'optselected') : (), href => "/u$uid/wish?f=$_", - $_ == -1 ? mt '_wishlist_prio_all' : mt "_wish_$_" - for (-1, @{$self->{wishlist_status}}); + $_ == -1 ? mt '_wishlist_prio_all' : $self->{wishlist_status}[$_] + for (-1..$#{$self->{wishlist_status}}); end; end 'div'; @@ -298,7 +298,7 @@ sub wishlist { if $own; a href => "/v$i->{vid}", title => $i->{original}||$i->{title}, ' '.shorten $i->{title}, 70; end; - td class => 'tc2', mt "_wish_$i->{wstat}"; + td class => 'tc2', $self->{wishlist_status}[$i->{wstat}]; td class => 'tc3', $self->{l10n}->date($i->{added}, 'compact'); end; }, @@ -310,8 +310,8 @@ sub wishlist { Select name => 'batchedit', id => 'batchedit'; option mt '_wishlist_select'; optgroup label => mt '_wishlist_changeprio'; - option value => $_, mt "_wish_$_" - for (@{$self->{wishlist_status}}); + option value => $_, $self->{wishlist_status}[$_] + for (0..$#{$self->{wishlist_status}}); end; option value => -1, mt '_wishlist_remove'; end; @@ -337,7 +337,7 @@ sub vnlist { { get => 's', required => 0, default => 'title', enum => [ 'title', 'vote' ] }, { get => 'c', required => 0, default => 'all', enum => [ 'all', 'a'..'z', 0 ] }, { get => 'v', required => 0, default => 0, enum => [ -1..1 ] }, - { get => 't', required => 0, default => -1, enum => [ -1, @{$self->{vnlist_status}} ] }, + { get => 't', required => 0, default => -1, enum => [ -1..$#{$self->{vnlist_status}} ] }, ); return $self->resNotFound if $f->{_err}; @@ -347,8 +347,8 @@ sub vnlist { { post => 'vid', required => 0, default => 0, multi => 1, template => 'id' }, { post => 'rid', required => 0, default => 0, multi => 1, template => 'id' }, { post => 'not', required => 0, default => '', maxlength => 2000 }, - { post => 'vns', required => 1, enum => [ -2, -1, @{$self->{vnlist_status}}, 999 ] }, - { post => 'rel', required => 1, enum => [ -2, -1, @{$self->{rlist_status}} ] }, + { post => 'vns', required => 1, enum => [ -2..$#{$self->{vnlist_status}}, 999 ] }, + { post => 'rel', required => 1, enum => [ -2..$#{$self->{rlist_status}} ] }, ); my @vid = grep $_ > 0, @{$frm->{vid}}; my @rid = grep $_ > 0, @{$frm->{rid}}; @@ -406,7 +406,7 @@ sub vnlist { end; p class => 'browseopts'; a href => $url->(t => -1), -1 == $f->{t} ? (class => 'optselected') : (), mt '_rlist_all'; - a href => $url->(t => $_), $_ == $f->{t} ? (class => 'optselected') : (), mtvnlstat $_ for @{$self->{vnlist_status}}; + a href => $url->(t => $_), $_ == $f->{t} ? (class => 'optselected') : (), $self->{vnlist_status}[$_] for 0..$#{$self->{vnlist_status}}; end; end 'div'; @@ -452,7 +452,7 @@ sub _vnlist_browse { a href => "/v$i->{vid}", title => $i->{original}||$i->{title}, shorten $i->{title}, 70; b class => 'grayedout', $i->{notes} if $i->{notes}; end; - td class => 'tc6', $i->{status} ? mtvnlstat $i->{status} : ''; + td class => 'tc6', $i->{status} ? $self->{vnlist_status}[$i->{status}] : ''; td class => 'tc7'; my $obtained = grep $_->{status}==2, @{$i->{rels}}; my $total = scalar @{$i->{rels}}; @@ -480,7 +480,7 @@ sub _vnlist_browse { td class => 'tc5'; a href => "/r$_->{rid}", title => $_->{original}||$_->{title}, shorten $_->{title}, 50; end; - td class => 'tc6', $_->{status} ? mtrlstat $_->{status} : ''; + td class => 'tc6', $_->{status} ? $self->{rlist_status}[$_->{status}] : ''; td class => 'tc7_8', colspan => 2, ''; end 'tr'; } @@ -494,8 +494,8 @@ sub _vnlist_browse { Select id => 'vns', name => 'vns'; option value => -2, mt '_rlist_withvn'; optgroup label => mt '_rlist_changestat'; - option value => $_, mtvnlstat $_ - for (@{$self->{vnlist_status}}); + option value => $_, $self->{vnlist_status}[$_] + for (0..$#{$self->{vnlist_status}}); end; option value => 999, mt '_rlist_setnote'; option value => -1, mt '_rlist_del'; @@ -503,8 +503,8 @@ sub _vnlist_browse { Select id => 'rel', name => 'rel'; option value => -2, mt '_rlist_withrel'; optgroup label => mt '_rlist_changestat'; - option value => $_, mtrlstat $_ - for (@{$self->{rlist_status}}); + option value => $_, $self->{rlist_status}[$_] + for (0..$#{$self->{rlist_status}}); end; option value => -1, mt '_rlist_del'; end; |