summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-01-21 18:44:49 +0100
committerYorhel <git@yorhel.nl>2016-01-23 13:08:59 +0100
commitc5879de315c4fdaf5be0ca85116acaaee5cc57f0 (patch)
treef0740431e4b9e1fa5cacc8cbe8836e59fc90dbdd /lib/VNDB/Handler/Producers.pm
parenta6836df277867d73a71c55797984c947449772cc (diff)
L10N: Intern all VNDB::Handler::* stuff
Most of these replacements were automated. This ended up being less work than I had anticipated. I also fixed a few minor bugs along the way, but probably introduced more than I fixed.
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm74
1 files changed, 37 insertions, 37 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index 4d8c985d..f3a167c2 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -23,7 +23,7 @@ sub rg {
my $p = $self->dbProducerGet(id => $pid, what => 'relgraph')->[0];
return $self->resNotFound if !$p->{id} || !$p->{rgraph};
- my $title = mt '_prodrg_title', $p->{name};
+ my $title = "Relation graph for $p->{name}";
return if $self->htmlRGHeader($title, 'p', $p);
$p->{svg} =~ s/id="node_p$pid"/id="graph_current"/;
@@ -63,14 +63,14 @@ sub page {
[ lang => 'Language', serialize => sub { "$_[0] ($self->{languages}{$_[0]})" } ],
[ website => 'Website', diff => 1 ],
[ l_wp => 'Wikipedia link',htmlize => sub {
- $_[0] ? sprintf '<a href="http://en.wikipedia.org/wiki/%s">%1$s</a>', xml_escape $_[0] : mt '_revision_nolink'
+ $_[0] ? sprintf '<a href="http://en.wikipedia.org/wiki/%s">%1$s</a>', xml_escape $_[0] : '[empty]'
}],
[ desc => 'Description', diff => qr/[ ,\n\.]/ ],
[ relations => 'Relations', join => '<br />', split => sub {
my @r = map sprintf('%s: <a href="/p%d" title="%s">%s</a>',
$self->{prod_relations}{$_->{relation}}[1], $_->{id}, xml_escape($_->{original}||$_->{name}), xml_escape shorten $_->{name}, 40
), sort { $a->{id} <=> $b->{id} } @{$_[0]};
- return @r ? @r : (mt '_revision_empty');
+ return @r ? @r : ('[empty]');
}],
);
}
@@ -80,16 +80,16 @@ sub page {
h1 $p->{name};
h2 class => 'alttitle', $p->{original} if $p->{original};
p class => 'center';
- txt mt '_prodpage_langtype', $self->{languages}{$p->{lang}}, $self->{producer_types}{$p->{type}};
- lit '<br />'.html_escape mt '_prodpage_aliases', $p->{alias} if $p->{alias};
+ txt "$self->{languages}{$p->{lang}} $self->{producer_types}{$p->{type}}";
+ lit '<br />a.k.a. '.html_escape $p->{alias} if $p->{alias};
my @links = (
- $p->{website} ? [ 'homepage', $p->{website} ] : (),
- $p->{l_wp} ? [ 'wikipedia', "http://en.wikipedia.org/wiki/$p->{l_wp}" ] : (),
+ $p->{website} ? [ 'Homepage', $p->{website} ] : (),
+ $p->{l_wp} ? [ 'Wikipedia', "http://en.wikipedia.org/wiki/$p->{l_wp}" ] : (),
);
br if @links;
for(@links) {
- a href => $_->[1], mt "_prodpage_$_->[0]";
+ a href => $_->[1], $_->[0];
txt ' - ' if $_ ne $links[$#links];
}
end 'p';
@@ -130,10 +130,10 @@ sub _releases {
# prodpage_(dev|pub)
my $r = $self->dbReleaseGet(pid => $p->{id}, results => 999, what => 'vn platforms');
div class => 'mainbox';
- a href => '#', id => 'expandprodrel', mt '_js_collapse';
- h1 mt '_prodpage_rel';
+ a href => '#', id => 'expandprodrel', 'collapse';
+ h1 'Releases';
if(!@$r) {
- p mt '_prodpage_norel';
+ p 'We have currently no visual novels by this producer.';
end;
return;
}
@@ -154,8 +154,8 @@ sub _releases {
i; lit fmtdatestr $vn{$v->{vid}}[0]{released}; end;
a href => "/v$v->{vid}", title => $v->{original}, $v->{title};
span '('.join(', ',
- (grep($_->{developer}, @{$vn{$v->{vid}}}) ? mt '_prodpage_dev' : ()),
- (grep($_->{publisher}, @{$vn{$v->{vid}}}) ? mt '_prodpage_pub' : ())
+ (grep($_->{developer}, @{$vn{$v->{vid}}}) ? 'developer' : ()),
+ (grep($_->{publisher}, @{$vn{$v->{vid}}}) ? 'publisher' : ())
).')';
end;
end;
@@ -173,14 +173,14 @@ sub _releases {
end;
td class => 'tc4';
a href => "/r$rel->{id}", title => $rel->{original}||$rel->{title}, $rel->{title};
- b class => 'grayedout', ' '.mt '_vnpage_rel_patch' if $rel->{patch};
+ b class => 'grayedout', ' (patch)' if $rel->{patch};
end;
td class => 'tc5', join ', ',
- ($rel->{developer} ? mt '_prodpage_dev' : ()), ($rel->{publisher} ? mt '_prodpage_pub' : ());
+ ($rel->{developer} ? 'developer' : ()), ($rel->{publisher} ? 'publisher' : ());
td class => 'tc6';
if($rel->{website}) {
a href => $rel->{website}, rel => 'nofollow';
- cssicon 'external', mt '_vnpage_rel_extlink';
+ cssicon 'external', 'External link';
end;
} else {
txt ' ';
@@ -262,35 +262,35 @@ sub edit {
$frm->{lang} = 'ja' if !$pid && !defined $frm->{lang};
$frm->{editsum} = sprintf 'Reverted to revision p%d.%d', $pid, $rev if $rev && !defined $frm->{editsum};
- my $title = mt $pid ? ('_pedit_title_edit', $p->{name}) : '_pedit_title_add';
+ my $title = $pid ? "Edit $p->{name}" : 'Add new producer';
$self->htmlHeader(title => $title, noindex => 1);
$self->htmlMainTabs('p', $p, 'edit') if $pid;
$self->htmlEditMessage('p', $p, $title);
$self->htmlForm({ frm => $frm, action => $pid ? "/p$pid/edit" : '/p/new', editsum => 1 },
- 'pedit_geninfo' => [ mt('_pedit_form_generalinfo'),
- [ select => name => mt('_pedit_form_type'), short => 'type',
+ 'pedit_geninfo' => [ 'General info',
+ [ select => name => 'Type', short => 'type',
options => [ map [ $_, $self->{producer_types}{$_} ], keys %{$self->{producer_types}} ] ],
- [ input => name => mt('_pedit_form_name'), short => 'name' ],
- [ input => name => mt('_pedit_form_original'), short => 'original' ],
- [ static => content => mt('_pedit_form_original_note') ],
- [ input => name => mt('_pedit_form_alias'), short => 'alias', width => 400 ],
- [ static => content => mt('_pedit_form_alias_note') ],
- [ select => name => mt('_pedit_form_lang'), short => 'lang',
+ [ input => name => 'Name (romaji)', short => 'name' ],
+ [ input => name => 'Original name', short => 'original' ],
+ [ static => content => 'The original name of the producer, leave blank if it is already in the Latin alphabet.' ],
+ [ input => name => 'Aliases', short => 'alias', width => 400 ],
+ [ static => content => '(Un)official aliases, separated by a comma.' ],
+ [ select => name => 'Primary language', short => 'lang',
options => [ map [ $_, "$_ ($self->{languages}{$_})" ], keys %{$self->{languages}} ] ],
- [ input => name => mt('_pedit_form_website'), short => 'website' ],
- [ input => name => mt('_pedit_form_wikipedia'), short => 'l_wp', pre => 'http://en.wikipedia.org/wiki/' ],
- [ text => name => mt('_pedit_form_desc').'<br /><b class="standout">'.mt('_inenglish').'</b>', short => 'desc', rows => 6 ],
- ], 'pedit_rel' => [ mt('_pedit_form_rel'),
+ [ input => name => 'Website', short => 'website' ],
+ [ input => name => 'Wikipedia link', short => 'l_wp', pre => 'http://en.wikipedia.org/wiki/' ],
+ [ text => name => 'Description<br /><b class="standout">English please!</b>', short => 'desc', rows => 6 ],
+ ], 'pedit_rel' => [ 'Relations',
[ hidden => short => 'prodrelations' ],
[ static => nolabel => 1, content => sub {
- h2 mt '_pedit_rel_sel';
+ h2 'Selected producers';
table;
tbody id => 'relation_tbl';
# to be filled using javascript
end;
end;
- h2 mt '_pedit_rel_add';
+ h2 'Add producer';
table;
Tr id => 'relation_new';
td class => 'tc_prod';
@@ -303,7 +303,7 @@ sub edit {
end;
end;
td class => 'tc_add';
- a href => '#', mt '_js_add';
+ a href => '#', 'add';
end;
end;
end 'table';
@@ -356,16 +356,16 @@ sub list {
page => $f->{p}
);
- $self->htmlHeader(title => mt '_pbrowse_title');
+ $self->htmlHeader(title => 'Browse producers');
div class => 'mainbox';
- h1 mt '_pbrowse_title';
+ h1 'Browse producers';
form action => '/p/all', 'accept-charset' => 'UTF-8', method => 'get';
$self->htmlSearchBox('p', $f->{q});
end;
p class => 'browseopts';
for ('all', 'a'..'z', 0) {
- a href => "/p/$_", $_ eq $char ? (class => 'optselected') : (), $_ eq 'all' ? mt('_char_all') : $_ ? uc $_ : '#';
+ a href => "/p/$_", $_ eq $char ? (class => 'optselected') : (), $_ eq 'all' ? 'ALL' : $_ ? uc $_ : '#';
}
end;
end;
@@ -373,9 +373,9 @@ sub list {
my $pageurl = "/p/$char" . ($f->{q} ? "?q=$f->{q}" : '');
$self->htmlBrowseNavigate($pageurl, $f->{p}, $np, 't');
div class => 'mainbox producerbrowse';
- h1 mt $f->{q} ? '_pbrowse_searchres' : '_pbrowse_list';
+ h1 $f->{q} ? 'Search results' : 'Producer list';
if(!@$list) {
- p mt '_pbrowse_noresults';
+ p 'No results found';
} else {
# spread the results over 3 equivalent-sized lists
my $perlist = @$list/3 < 1 ? 1 : @$list/3;