diff options
-rw-r--r-- | data/lang.txt | 22 | ||||
-rw-r--r-- | lib/VNDB/Util/CommonHTML.pm | 12 |
2 files changed, 28 insertions, 6 deletions
diff --git a/data/lang.txt b/data/lang.txt index a31c8831..57f93e2e 100644 --- a/data/lang.txt +++ b/data/lang.txt @@ -2629,6 +2629,8 @@ ru : Тегов ############################################################################# # Handler::VNBrowse # Handler::VNEdit +# Handler::VNPage +# Util::CommonHTML::htmlVoteStats # VN browser (/v/all) @@ -3122,6 +3124,26 @@ ru : Статистика пользователей en : Nobody has voted on this visual novel yet... ru : Никто пока не голосовал за эту новеллу... +:_votestats_title +en : Vote stats +ru*: + +:_votestats_sum +en : [_1] [quant,_1,vote,votes] total, average [_1] +ru*: + +:_votestats_recent +en : Recent votes +ru*: + +:_votestats_pop_title +en : Popularity +ru*: + +:_votestats_pop_sum +en : Ranked #[_1] out of [_2] with a score of [_3]. +ru*: + diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index 6a1f86e6..176f2960 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -432,11 +432,11 @@ sub htmlVoteStats { div class => 'votestats'; table class => 'votegraph'; thead; Tr; - td colspan => 2, 'Vote graph'; + td colspan => 2, mt '_votestats_title'; end; end; tfoot; Tr; - td colspan => 2, sprintf '%d vote%s total, average %.2f%s', $count, $count != 1 ? 's' : '', $total/$count, - $type eq 'v' ? ' ('.mt('_vote_'.ceil($total/$count-1)).')' : ''; + td colspan => 2, mt('_votestats_sum', $count, sprintf('%.2f', $total/$count)) + .($type eq 'v' ? ' ('.mt('_vote_'.ceil($total/$count-1)).')' : ''); end; end; for (reverse 0..$#$stats) { Tr; @@ -460,7 +460,7 @@ sub htmlVoteStats { if(@$recent) { table class => 'recentvotes'; thead; Tr; - td colspan => 3, 'Recent votes'; + td colspan => 3, mt '_votestats_recent'; end; end; for (0..$#$recent) { Tr $_ % 2 == 0 ? (class => 'odd') : (); @@ -481,8 +481,8 @@ sub htmlVoteStats { clearfloat; if($type eq 'v') { div; - h3 'Popularity'; - p sprintf 'Ranked #%d out of %d with a score of %.2f.', $obj->{ranking}, $self->{stats}{vn}, $obj->{c_popularity}*100; + h3 mt '_votestats_pop_title'; + p mt '_votestats_pop_sum', $obj->{ranking}, $self->{stats}{vn}, sprintf('%0.2f',$obj->{c_popularity}*100); end; } end; |