summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-08-16 14:23:27 +0200
committerYorhel <git@yorhel.nl>2009-08-17 16:27:15 +0200
commit14def396a3f2f148ad48d04740d0f022d80e8cf8 (patch)
treefa3cc984f8fe5f1a1cc922a43c25bc32dd50c8c1 /lib/VNDB/Handler/Producers.pm
parenta645b404e49ce4b1d90dc05c7da44eb0e8ffc117 (diff)
L10N: Converted producer and release types
And replaced the ugly release type cssicon class hack. The class is now 'tr'.$type_numer, instead of the first three characters of their English representation in lowercase. No idea why I haven't done it this way in the first place...
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index f9119b72..57e79490 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -33,7 +33,7 @@ sub page {
if($rev) {
my $prev = $rev && $rev > 1 && $self->dbProducerGet(id => $pid, rev => $rev-1, what => 'changes extended')->[0];
$self->htmlRevision('p', $prev, $p,
- [ type => 'Type', serialize => sub { $self->{producer_types}{$_[0]} } ],
+ [ type => 'Type', serialize => sub { mt "_ptype_$_[0]" } ],
[ name => 'Name (romaji)', diff => 1 ],
[ original => 'Original name', diff => 1 ],
[ alias => 'Aliases', diff => 1 ],
@@ -48,7 +48,7 @@ sub page {
h1 $p->{name};
h2 class => 'alttitle', $p->{original} if $p->{original};
p class => 'center';
- txt mt("_lang_$p->{lang}")." \L$self->{producer_types}{$p->{type}}";
+ txt mt("_lang_$p->{lang}")." ".lc(mt "_ptype_$p->{type}");
txt "\na.k.a. $p->{alias}" if $p->{alias};
if($p->{website}) {
txt "\n";
@@ -101,7 +101,7 @@ sub edit {
if($self->reqMethod eq 'POST') {
$frm = $self->formValidate(
- { name => 'type', enum => [ keys %{$self->{producer_types}} ] },
+ { name => 'type', enum => $self->{producer_types} },
{ name => 'name', maxlength => 200 },
{ name => 'original', required => 0, maxlength => 200, default => '' },
{ name => 'alias', required => 0, maxlength => 500, default => '' },
@@ -134,7 +134,7 @@ sub edit {
$self->htmlEditMessage('p', $p);
$self->htmlForm({ frm => $frm, action => $pid ? "/p$pid/edit" : '/p/new', editsum => 1 }, "General info" => [
[ select => name => 'Type', short => 'type',
- options => [ map [ $_, $self->{producer_types}{$_} ], sort keys %{$self->{producer_types}} ] ],
+ options => [ map [ $_, mt "_ptype_$_" ], sort @{$self->{producer_types}} ] ],
[ input => name => 'Name (romaji)', short => 'name' ],
[ input => name => 'Original name', short => 'original' ],
[ static => content => q|The original name of the producer, leave blank if it is already in the Latin alphabet.| ],