Преглед изворни кода

More translations, added 'hours', 'minutes' and 'seconds'

Morten Brix Pedersen пре 24 година
родитељ
комит
30470e7a6a
3 измењених фајлова са 22 додато и 5 уклоњено
  1. 4 0
      lang.txt
  2. 12 3
      modules/Pisg/HTMLGenerator.pm
  3. 6 2
      modules/Pisg/Parser/Logfile.pm

+ 4 - 0
lang.txt

@@ -151,6 +151,10 @@ pagetitle3 = "During this [:days]-day reporting period, a total of <b>[:nicks]</
 stats_gen_by = "Stats generated by [:pisg_url] v[:version]"
 stats_gen_by = "Stats generated by [:pisg_url] v[:version]"
 author = "pisg by [:author_url] and others"
 author = "pisg by [:author_url] and others"
 stats_gen_in = "Stats generated in [:time]"
 stats_gen_in = "Stats generated in [:time]"
+hours = "hours"
+minutes = "minutes"
+seconds = "seconds"
+and = "and"
 
 
 # Mouse-over titles
 # Mouse-over titles
 pisghomepage = "Go to the pisg homepage"
 pisghomepage = "Go to the pisg homepage"

+ 12 - 3
modules/Pisg/HTMLGenerator.pm

@@ -257,7 +257,16 @@ sub _htmlfooter
     $hash{author_url} = "<a href=\"http://www.wtf.dk/hp/\" title=\"$author_hp\" class=\"background\">Morten Brix Pedersen</a>";
     $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{version} = $self->{cfg}->{version};
-    $hash{time} = $self->{stats}->{processtime};
+    
+    my $hours = $self->_template_text('hours');
+    my $mins = $self->_template_text('minutes');
+    my $secs = $self->_template_text('seconds');
+    my $and = $self->_template_text('and');
+
+    my $h = $self->{stats}->{processtime}{hours};
+    my $m = $self->{stats}->{processtime}{mins};
+    my $s = $self->{stats}->{processtime}{secs};
+    $hash{time} = "$h $hours $m $mins $and $s $secs";
 
 
     my $stats_gen = $self->_template_text('stats_gen_by', %hash);
     my $stats_gen = $self->_template_text('stats_gen_by', %hash);
     my $author_text = $self->_template_text('author', %hash);
     my $author_text = $self->_template_text('author', %hash);
@@ -1673,8 +1682,8 @@ sub _mostnicks
         my $nick_txt = $self->_template_text('nick');
         my $nick_txt = $self->_template_text('nick');
         my $names_txt = $self->_template_text('names');
         my $names_txt = $self->_template_text('names');
         _html("<table border=\"0\" width=\"$self->{cfg}->{tablewidth}\"><tr>");
         _html("<table border=\"0\" width=\"$self->{cfg}->{tablewidth}\"><tr>");
-        _html("<td>&nbsp;</td><td class=\"tdtop\"><b>$names_txt</b></td>");
-        _html("<td class=\"tdtop\"><b>Names Used</b></td></tr>");
+        _html("<td>&nbsp;</td><td class=\"tdtop\"><b>$nick_txt</b></td>");
+        _html("<td class=\"tdtop\"><b>$names_txt</b></td></tr>");
 
 
         for(my $i = 0; $i < 5; $i++) {
         for(my $i = 0; $i < 5; $i++) {
             last unless $i < @sortnicks;
             last unless $i < @sortnicks;

+ 6 - 2
modules/Pisg/Parser/Logfile.pm

@@ -78,8 +78,12 @@ sub analyze
 	_uniquify_nicks(\%stats);
 	_uniquify_nicks(\%stats);
 
 
         my ($sec,$min,$hour) = gmtime(time() - $starttime);
         my ($sec,$min,$hour) = gmtime(time() - $starttime);
-        $stats{processtime} =
-        sprintf("%02d hours, %02d minutes and %02d seconds", $hour, $min, $sec);
+        my $processtime = sprintf("%02d hours, %02d minutes and %02d seconds", $hour, $min, $sec);
+
+        $stats{processtime}{hours} = sprintf("%02d", $hour);
+        $stats{processtime}{mins} = sprintf("%02d", $min);
+        $stats{processtime}{secs} = sprintf("%02d", $sec);
+
         print "Channel analyzed succesfully in $stats{processtime} on ",
         print "Channel analyzed succesfully in $stats{processtime} on ",
         scalar localtime(time()), "\n"
         scalar localtime(time()), "\n"
             unless ($self->{cfg}->{silent});
             unless ($self->{cfg}->{silent});