summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-07 14:16:36 +0200
committerYorhel <git@yorhel.nl>2009-10-07 14:16:36 +0200
commit246165b399856e207295773da2c03b135c1ca86a (patch)
tree2c3d25b2c23e40e2f4806f574ff4bdde9708fbe7 /lib
parentde8d188a37b651a59a6460c0ead0e7aa4edab858 (diff)
L10N: Extracted release list statuses
Should be converted to enums at some point... integers don't do the trick here.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Func.pm4
-rw-r--r--lib/VNDB/Handler/Releases.pm10
-rw-r--r--lib/VNDB/Handler/ULists.pm12
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index cd4c4b62..ad38215e 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -149,10 +149,10 @@ sub gtintype {
sub liststat {
my $l = shift;
return '' if !$l;
- my $rs = $YAWF::OBJ->{vn_rstat}[$l->{rstat}];
+ my $rs = mt('_rlst_rstat_'.$l->{rstat});
$rs = qq|<b class="done">$rs</b>| if $l->{rstat} == 2; # Obtained
$rs = qq|<b class="todo">$rs</b>| if $l->{rstat} < 2; # Unknown/pending
- my $vs = $YAWF::OBJ->{vn_vstat}[$l->{vstat}];
+ my $vs = mt('_rlst_vstat_'.$l->{vstat});
$vs = qq|<b class="done">$vs</b>| if $l->{vstat} == 2; # Finished
$vs = qq|<b class="todo">$vs</b>| if $l->{vstat} == 0 || $l->{vstat} == 4; # Unknown/dropped
return "$rs / $vs";
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index e7442845..e3656cc3 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -241,14 +241,14 @@ sub _infotable {
td;
Select id => 'listsel', name => 'listsel';
option mt !$rl ? '_relinfo_user_notlist' :
- ('_relinfo_user_inlist', $self->{vn_rstat}[$rl->{rstat}], $self->{vn_vstat}[$rl->{vstat}]);
+ ('_relinfo_user_inlist', mt('_rlst_rstat_'.$rl->{rstat}), mt('_rlst_vstat_'.$rl->{vstat}));
optgroup label => mt '_relinfo_user_setr';
- option value => "r$_", $self->{vn_rstat}[$_]
- for (0..$#{$self->{vn_rstat}});
+ option value => "r$_", mt '_rlst_rstat_'.$_
+ for (@{$self->{rlst_rstat}});
end;
optgroup label => mt '_relinfo_user_setv';
- option value => "v$_", $self->{vn_vstat}[$_]
- for (0..$#{$self->{vn_vstat}});
+ option value => "v$_", mt '_rlst_vstat_'.$_
+ for (@{$self->{rlst_vstat}});
end;
option value => 'del', mt '_relinfo_user_del' if $rl;
end;
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm
index 049ef48a..19db9f1e 100644
--- a/lib/VNDB/Handler/ULists.pm
+++ b/lib/VNDB/Handler/ULists.pm
@@ -69,7 +69,7 @@ sub rlist {
return $self->htmlDenied() if !$uid;
my $f = $self->formValidate(
- { name => 'e', required => 1, enum => [ 'del', map("r$_", 0..$#{$self->{vn_rstat}}), map("v$_", 0..$#{$self->{vn_vstat}}) ] },
+ { name => 'e', required => 1, enum => [ 'del', map("r$_", @{$self->{rlst_rstat}}), map("v$_", @{$self->{rlst_vstat}}) ] },
);
return 404 if $f->{_err};
@@ -212,7 +212,7 @@ sub vnlist {
if($own && $self->reqMethod eq 'POST') {
my $frm = $self->formValidate(
{ name => 'sel', required => 0, default => 0, multi => 1, template => 'int' },
- { name => 'batchedit', required => 1, enum => [ 'del', map("r$_", 0..$#{$self->{vn_rstat}}), map("v$_", 0..$#{$self->{vn_vstat}}) ] },
+ { name => 'batchedit', required => 1, enum => [ 'del', map("r$_", @{$self->{rlst_rstat}}), map("v$_", @{$self->{rlst_vstat}}) ] },
);
if(!$frm->{_err} && @{$frm->{sel}} && $frm->{sel}[0]) {
$self->dbVNListDel($uid, $frm->{sel}) if $frm->{batchedit} eq 'del';
@@ -333,12 +333,12 @@ sub _vnlist_browse {
Select id => 'batchedit', name => 'batchedit';
option mt '_rlist_selection';
optgroup label => mt '_rlist_changerel';
- option value => "r$_", $self->{vn_rstat}[$_]
- for (0..$#{$self->{vn_rstat}});
+ option value => "r$_", mt "_rlst_rstat_$_"
+ for (@{$self->{rlst_rstat}});
end;
optgroup label => mt '_rlist_changeplay';
- option value => "v$_", $self->{vn_vstat}[$_]
- for (0..$#{$self->{vn_vstat}});
+ option value => "v$_", mt "_rlst_vstat_$_"
+ for (@{$self->{rlst_vstat}});
end;
option value => 'del', mt '_rlist_del';
end;