Просмотр исходного кода

Add new templates to translate the bottom of the stats page..

Morten Brix Pedersen 24 лет назад
Родитель
Сommit
c4db0e21d1
2 измененных файлов с 20 добавлено и 3 удалено
  1. 3 0
      lang.txt
  2. 17 3
      modules/Pisg/HTMLGenerator.pm

+ 3 - 0
lang.txt

@@ -148,6 +148,9 @@ today = "Today"
 pagetitle1 = "[:channel] @ [:network] stats by [:maintainer]"
 pagetitle2 = "Statistics generated on "
 pagetitle3 = "During this [:days]-day reporting period, a total of <b>[:nicks]</b> different nicks were represented on [:channel]."
+stats_gen_by = "Stats generated by [:pisg_url] v[:version]"
+author = "pisg by [:author_url] and others"
+stats_gen_in = "Stats generated in [:time]"
 
 # Mouse-over titles
 pisghomepage = "Go to the pisg homepage"

+ 17 - 3
modules/Pisg/HTMLGenerator.pm

@@ -247,13 +247,27 @@ sub get_time
 sub _htmlfooter
 {
     my $self = shift;
+
+    my %hash;
+
     my $pisg_hp = $self->_template_text('pisghomepage');
+    $hash{pisg_url} = "<a href=\"http://pisg.sourceforge.net/\" title=\"$pisg_hp\" class=\"background\">pisg</a>";
+
     my $author_hp = $self->_template_text('authorhomepage');
+    $hash{author_url} = "<a href=\"http://www.wtf.dk/hp/\" title=\"$author_hp\" class=\"background\">Morten Brix Pedersen</a>";
+
+    $hash{version} = $self->{cfg}->{version};
+    $hash{time} = $self->{stats}->{processtime};
+
+    my $stats_gen = $self->_template_text('stats_gen_by', %hash);
+    my $author_text = $self->_template_text('author', %hash);
+    my $stats_text = $self->_template_text('stats_gen_in', %hash);
+
     print OUTPUT <<HTML;
 <span class="small">
-Stats generated by <a href="http://pisg.sourceforge.net/" title="$pisg_hp" class="background">pisg</a> v$self->{cfg}->{version}<br />
-pisg by <a href="http://www.wtf.dk/hp/" title="$author_hp" class="background">Morten Brix Pedersen</a> and others<br />
-Stats generated in $self->{stats}->{processtime}
+$stats_gen<br />
+$author_text<br />
+$stats_text
 </span>
 </div>
 </body>