From 14def396a3f2f148ad48d04740d0f022d80e8cf8 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 16 Aug 2009 14:23:27 +0200 Subject: 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... --- lib/VNDB/Handler/Producers.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/VNDB/Handler/Producers.pm') 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.| ], -- cgit v1.2.3