diff options
author | Yorhel <git@yorhel.nl> | 2016-01-17 11:32:03 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2016-01-17 11:39:53 +0100 |
commit | 38a4c36b21b1979a64cb915a80167fb7f8cadb9e (patch) | |
tree | 80f8c4fe110ddffa8a1aaf8d80e774544d38a533 /lib/VNDB/Handler/VNPage.pm | |
parent | b14f137dc5613472eb68ffea2bb76abc3f7172b6 (diff) |
L10N: Intern VN/producer relations + update relation graphs
Now that graphviz knows the actual strings, it has a better opportunity
to create better graphs.
(Most of them still look messy tho)
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index c5635f1d..50f21071 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -33,8 +33,6 @@ sub rg { return if $self->htmlRGHeader($title, 'v', $v); $v->{svg} =~ s/id="node_v$vid"/id="graph_current"/; - # TODO: The relation string can be properly interned in the SVG now - $v->{svg} =~ s/\$___(_vnrel_[a-z]+)____\$/mt $1/eg; div class => 'mainbox'; h1 $title; @@ -534,7 +532,7 @@ sub _revision { [ relations => join => '<br />', split => sub { my @r = map sprintf('[%s] %s: <a href="/v%d" title="%s">%s</a>', mt($_->{official} ? '_vndiff_rel_official' : '_vndiff_rel_unofficial'), - mt("_vnrel_$_->{relation}"), $_->{id}, xml_escape($_->{original}||$_->{title}), xml_escape shorten $_->{title}, 40 + $self->{vn_relations}{$_->{relation}}[2], $_->{id}, xml_escape($_->{original}||$_->{title}), xml_escape shorten $_->{title}, 40 ), sort { $a->{id} <=> $b->{id} } @{$_[0]}; return @r ? @r : (mt '_revision_empty'); }], @@ -617,7 +615,7 @@ sub _relations { td class => 'relations'; dl; for(sort keys %rel) { - dt mt "_vnrel_$_"; + dt $self->{vn_relations}{$_}[2]; dd; for (@{$rel{$_}}) { b class => 'grayedout', mt('_vnpage_relations_unofficial').' ' if !$_->{official}; |