summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-16 12:27:32 +0200
committerYorhel <git@yorhel.nl>2009-08-17 16:27:15 +0200
commita645b404e49ce4b1d90dc05c7da44eb0e8ffc117 (patch)
tree8657c21c0d61b981092d2274d6590cecebcf5c04 /lib
parent596714f864c09d752fc3c72177afaa0138020d6f (diff)
L10N: Converted platform names
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Misc.pm4
-rw-r--r--lib/VNDB/Handler/Releases.pm24
-rw-r--r--lib/VNDB/Handler/Tags.pm2
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm10
-rw-r--r--lib/VNDB/Handler/VNPage.pm2
5 files changed, 21 insertions, 21 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 24bb53a4..20b8c564 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -134,7 +134,7 @@ sub homepage {
li;
lit datestr $_->{released};
txt ' ';
- cssicon $_, $self->{platforms}{$_} for (@{$_->{platforms}});
+ cssicon $_, mt "_plat_$_" for (@{$_->{platforms}});
txt ' ';
a href => "/r$_->{id}", title => $_->{original}||$_->{title}, shorten $_->{title}, 30;
end;
@@ -151,7 +151,7 @@ sub homepage {
li;
lit datestr $_->{released};
txt ' ';
- cssicon $_, $self->{platforms}{$_} for (@{$_->{platforms}});
+ cssicon $_, mt "_plat_$_" for (@{$_->{platforms}});
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 a64d6f27..0012faf4 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -52,7 +52,7 @@ sub page {
[ released => 'Release date', htmlize => sub { datestr $_[0] } ],
[ minage => 'Age rating', serialize => sub { $self->{age_ratings}{$_[0]}[0] } ],
[ notes => 'Notes', diff => 1 ],
- [ platforms => 'Platforms', join => ', ', split => sub { map $self->{platforms}{$_}, @{$_[0]} } ],
+ [ platforms => 'Platforms', join => ', ', split => sub { map mt("_plat_$_"), @{$_[0]} } ],
[ media => 'Media', join => ', ', split => sub {
map {
my $med = $self->{media}{$_->{medium}};
@@ -145,8 +145,8 @@ sub _infotable {
td 'Platform'.($#{$r->{platforms}} ? 's' : '');
td;
for(@{$r->{platforms}}) {
- cssicon $_, $self->{platforms}{$_};
- txt ' '.$self->{platforms}{$_};
+ cssicon $_, mt "_plat_$_";
+ txt ' '.mt("_plat_$_");
br if $_ ne $r->{platforms}[$#{$r->{platforms}}];
}
end;
@@ -310,7 +310,7 @@ sub edit {
{ name => 'released', required => 0, default => 0, template => 'int' },
{ name => 'minage' , required => 0, default => -1, enum => [ keys %{$self->{age_ratings}} ] },
{ name => 'notes', required => 0, default => '', maxlength => 10240 },
- { name => 'platforms', required => 0, default => '', multi => 1, enum => [ keys %{$self->{platforms}} ] },
+ { name => 'platforms', required => 0, default => '', multi => 1, enum => $self->{platforms} },
{ name => 'media', required => 0, default => '' },
{ name => 'resolution',required => 0, default => 0, enum => [ 0..$#{$self->{resolutions}} ] },
{ name => 'voiced', required => 0, default => 0, enum => [ 0..$#{$self->{voiced}} ] },
@@ -418,13 +418,13 @@ sub _form {
[ static => nolabel => 1, content => sub {
h2 'Platforms';
div class => 'platforms';
- for my $p (sort keys %{$self->{platforms}}) {
+ for my $p (sort @{$self->{platforms}}) {
span;
input type => 'checkbox', name => 'platforms', value => $p, id => $p,
$frm->{platforms} && grep($_ eq $p, @{$frm->{platforms}}) ? (checked => 'checked') : ();
label for => $p;
- cssicon $p, $self->{platforms}{$p};
- txt ' '.$self->{platforms}{$p};
+ cssicon $p, mt "_plat_$p";
+ txt ' '.mt("_plat_$p");
end;
end;
}
@@ -480,7 +480,7 @@ sub browse {
{ name => 'o', required => 0, default => 'a', enum => ['a', 'd'] },
{ name => 'q', required => 0, default => '', maxlength => 500 },
{ name => 'ln', required => 0, multi => 1, default => '', enum => $self->{languages} },
- { name => 'pl', required => 0, multi => 1, default => '', enum => [ keys %{$self->{platforms}} ] },
+ { name => 'pl', required => 0, multi => 1, default => '', enum => $self->{platforms} },
{ name => 'me', required => 0, multi => 1, default => '', enum => [ keys %{$self->{media}} ] },
{ name => 'tp', required => 0, default => -1, enum => [ -1..$#{$self->{release_types}} ] },
{ name => 'pa', required => 0, default => 0, enum => [ 0..2 ] },
@@ -544,7 +544,7 @@ sub browse {
end;
td class => 'tc2', $l->{minage} > -1 ? $self->{age_ratings}{$l->{minage}}[0] : '';
td class => 'tc3';
- $_ ne 'oth' && cssicon $_, $self->{platforms}{$_} for (@{$l->{platforms}});
+ $_ ne 'oth' && cssicon $_, mt "_plat_$_" for (@{$l->{platforms}});
cssicon "lang $_", mt "_lang_$_" for (@{$l->{languages}});
cssicon lc(substr($self->{release_types}[$l->{type}],0,3)), $self->{release_types}[$l->{type}];
end;
@@ -642,13 +642,13 @@ sub _filters {
h2;
lit 'Platforms <b>(boolean or, selecting more gives more results)</b>';
end;
- for my $i (sort keys %{$self->{platforms}}) {
+ for my $i (sort @{$self->{platforms}}) {
next if $i eq 'oth';
span;
input type => 'checkbox', name => 'pl', value => $i, id => "plat_$i", grep($_ eq $i, @{$f->{pl}}) ? (checked => 'checked') : ();
label for => "plat_$i";
- cssicon $i, $self->{platforms}{$i};
- txt $self->{platforms}{$i};
+ cssicon $i, mt "_plat_$i";
+ txt mt "_plat_$i";
end;
end;
}
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index ce3ac0ed..fce4fadb 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -209,7 +209,7 @@ sub _vnlist {
a href => '/v'.$l->{vid}, title => $l->{original}||$l->{title}, shorten $l->{title}, 100;
end;
td class => 'tc3';
- $_ ne 'oth' && cssicon $_, $self->{platforms}{$_}
+ $_ ne 'oth' && cssicon $_, mt "_plat_$_"
for (sort split /\//, $l->{c_platforms});
end;
td class => 'tc4';
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index d3d503dc..3b8dc2ab 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -22,7 +22,7 @@ sub list {
{ name => 'q', required => 0, default => '' },
{ name => 'sq', required => 0, default => '' },
{ name => 'ln', required => 0, multi => 1, enum => $self->{languages}, default => '' },
- { name => 'pl', required => 0, multi => 1, enum => [ keys %{$self->{platforms}} ], default => '' },
+ { name => 'pl', required => 0, multi => 1, enum => $self->{platforms}, default => '' },
{ name => 'ti', required => 0, default => '', maxlength => 200 },
{ name => 'te', required => 0, default => '', maxlength => 200 },
{ name => 'sp', required => 0, default => $self->reqCookie('tagspoil') =~ /^([0-2])$/ ? $1 : 1, enum => [0..2] },
@@ -103,7 +103,7 @@ sub list {
a href => '/v'.$l->{id}, title => $l->{original}||$l->{title}, shorten $l->{title}, 100;
end;
td class => 'tc2';
- $_ ne 'oth' && cssicon $_, $self->{platforms}{$_}
+ $_ ne 'oth' && cssicon $_, mt "_plat_$_"
for (sort split /\//, $l->{c_platforms});
end;
td class => 'tc3';
@@ -174,14 +174,14 @@ sub _filters {
h2;
lit 'Platforms <b>(boolean or, selecting more gives more results)</b>';
end;
- for my $i (sort keys %{$self->{platforms}}) {
+ for my $i (sort @{$self->{platforms}}) {
next if $i eq 'oth';
span;
input type => 'checkbox', id => "plat_$i", name => 'pl', value => $i,
(scalar grep $_ eq $i, @{$f->{pl}}) ? (checked => 'checked') : ();
label for => "plat_$i";
- cssicon $i, $self->{platforms}{$i};
- txt $self->{platforms}{$i};
+ cssicon $i, mt "_plat_$i";
+ txt mt "_plat_$i";
end;
end;
}
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index a3b56fe2..a2d64297 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -383,7 +383,7 @@ sub _releases {
td class => 'tc3';
for (sort @{$rel->{platforms}}) {
next if $_ eq 'oth';
- cssicon $_, $self->{platforms}{$_};
+ cssicon $_, mt "_plat_$_";
}
cssicon lc(substr($self->{release_types}[$rel->{type}],0,3)), $self->{release_types}[$rel->{type}];
end;