summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-09-06 16:12:16 +0200
committerYorhel <git@yorhel.nl>2009-09-06 16:12:16 +0200
commit9fa6e9b3c112a1a5539b03f021e3826df43bbe4d (patch)
treebef827149f9cf8d502a140949ad7876dcb338dbf
parent5323a0c62ad471b1f2c4a77e6fc0e890792e9399 (diff)
L10N: Converted wishlist_status in global.pl
This is one of the last easy-to-extract unextracted texts... the rest is slightly harder to extract. Either because it's in JS, used in Multi, or used in some creative way that doesn't work well together with extraction... :/
-rw-r--r--data/global.pl7
-rw-r--r--data/lang.txt19
-rw-r--r--lib/VNDB/Handler/ULists.pm16
-rw-r--r--lib/VNDB/Handler/VNPage.pm4
4 files changed, 30 insertions, 16 deletions
diff --git a/data/global.pl b/data/global.pl
index 79978c5e..7abfa43c 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -114,12 +114,7 @@ our %S = (%S,
],
voiced => [ 0..4 ],
animated => [ 0..4 ],
- wishlist_status => [
- 'high',
- 'medium',
- 'low',
- 'blacklist',
- ],
+ wishlist_status => [ 0..3 ],
# note: keep these synchronised in script.js
vn_rstat => [
'Unknown',
diff --git a/data/lang.txt b/data/lang.txt
index 9277f334..89452dcd 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -338,6 +338,25 @@ en : Users
ru : Пользователи
+# Wishlist statuses
+
+:_wish_0
+en : high
+ru*:
+
+:_wish_1
+en : medium
+ru*:
+
+:_wish_2
+en : low
+ru*:
+
+:_wish_3
+en : blacklist
+ru*:
+
+
# 'Voiced' information for releases
:_voiced_0
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm
index 8e6c4744..7d1a9304 100644
--- a/lib/VNDB/Handler/ULists.pm
+++ b/lib/VNDB/Handler/ULists.pm
@@ -42,7 +42,7 @@ sub vnwish {
return $self->htmlDenied() if !$uid;
my $f = $self->formValidate(
- { name => 's', enum => [ -1..$#{$self->{wishlist_status}} ] }
+ { name => 's', enum => [ -1, @{$self->{wishlist_status}} ] }
);
return 404 if $f->{_err};
@@ -105,14 +105,14 @@ sub wishlist {
{ name => 'p', required => 0, default => 1, template => 'int' },
{ name => 'o', required => 0, default => 'd', enum => [ 'a', 'd' ] },
{ name => 's', required => 0, default => 'wstat', enum => [qw|title added wstat|] },
- { name => 'f', required => 0, default => -1, enum => [ -1..$#{$self->{wishlist_status}} ] },
+ { name => 'f', required => 0, default => -1, enum => [ -1, @{$self->{wishlist_status}} ] },
);
return 404 if $f->{_err};
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 => [ -1..$#{$self->{wishlist_status}} ] },
+ { name => 'batchedit', required => 1, enum => [ -1, @{$self->{wishlist_status}} ] },
);
if(!$frm->{_err} && @{$frm->{sel}} && $frm->{sel}[0]) {
$self->dbWishListDel($uid, $frm->{sel}) if $frm->{batchedit} == -1;
@@ -141,8 +141,8 @@ sub wishlist {
}
p class => 'browseopts';
a $f->{f} == $_ ? (class => 'optselected') : (), href => "/u$uid/wish?f=$_",
- $_ == -1 ? mt '_wishlist_prio_all' : ucfirst $self->{wishlist_status}[$_]
- for (-1..$#{$self->{wishlist_status}});
+ $_ == -1 ? mt '_wishlist_prio_all' : mt "_wish_$_"
+ for (-1, @{$self->{wishlist_status}});
end;
end;
@@ -169,7 +169,7 @@ sub wishlist {
if $own;
a href => "/v$i->{vid}", title => $i->{original}||$i->{title}, ' '.shorten $i->{title}, 70;
end;
- td class => 'tc2', ucfirst $self->{wishlist_status}[$i->{wstat}];
+ td class => 'tc2', mt "_wish_$i->{wstat}";
td class => 'tc3', $self->{l10n}->date($i->{added}, 'compact');
end;
},
@@ -179,8 +179,8 @@ sub wishlist {
Select name => 'batchedit', id => 'batchedit';
option mt '_wishlist_select';
optgroup label => mt '_wishlist_changeprio';
- option value => $_, $self->{wishlist_status}[$_]
- for (0..$#{$self->{wishlist_status}});
+ option value => $_, mt "_wish_$_"
+ for (@{$self->{wishlist_status}});
end;
option value => -1, mt '_wishlist_remove';
end;
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index b6633247..510d2dfc 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -333,9 +333,9 @@ sub _useroptions {
}
if(!$vote || $wish) {
Select id => 'wishsel';
- option $wish ? mt '_vnpage_uopt_wishlisted', $self->{wishlist_status}[$wish->{wstat}] : mt '_vnpage_uopt_nowish';
+ option $wish ? mt '_vnpage_uopt_wishlisted', mt '_wish_'.$wish->{wstat} : mt '_vnpage_uopt_nowish';
optgroup label => $wish ? mt '_vnpage_uopt_changewish' : mt '_vnpage_uopt_addwish';
- option value => $_, $self->{wishlist_status}[$_] for (0..$#{$self->{wishlist_status}});
+ option value => $_, mt "_wish_$_" for (@{$self->{wishlist_status}});
end;
option value => -1, mt '_vnpage_uopt_delwish';
end;