]> git.deb.at Git - deb/packages.git/commitdiff
Fix some minor issues
authorFrank Lichtenheld <frank@lichtenheld.de>
Tue, 28 Feb 2006 21:28:07 +0000 (21:28 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Tue, 28 Feb 2006 21:28:07 +0000 (21:28 +0000)
lib/Packages/CGI.pm
lib/Packages/DoShow.pm

index 94986cba7a3c0860982ec3fce14b3f8a8daa5d26..b8607c933781104bb4f70d3502460374b2b0ce7f 100644 (file)
@@ -416,13 +416,15 @@ sub make_url {
        $val = $override->{$p} if exists $override->{$p};
        push @query_string, "$p=$val" if $val;
     }
-    push @path, $add_path if $add_path;
+    push @path, $add_path if $add_path and $add_path ne '/';
     push @query_string, $add_query if $add_query;
 
     my $path = join( '/', @path );
     my $query_string = join( '&', @query_string );
+    $path .= '/' if $add_path and $add_path eq '/';
+    $path .= "?$query_string" if $query_string;
 
-    return "$path?$query_string";
+    return $path;
 }
 
 sub make_search_url {
index 6852c13a657c9033c00b913385f6d060761893f4..e3e1945b6b7cc7123e4705a47f681e79f16106f1 100644 (file)
@@ -1,6 +1,7 @@
 package Packages::DoShow;
 
 use strict;
+use warnings;
 
 use POSIX;
 use URI::Escape;
@@ -143,8 +144,6 @@ sub do_show {
                        $long_desc =~ s/\n /\n/sgo;
                        $long_desc =~ s/\n.\n/\n<p>\n/go;
                        $long_desc =~ s/(((\n|\A) [^\n]*)+)/\n<pre>$1\n<\/pre>/sgo;
-#          $long_desc = conv_desc( $lang, $long_desc );
-#          $short_desc = conv_desc( $lang, $short_desc );
                        my @menu = ( [ _g( "Distribution:" ),
                                       _g( "Overview over this suite" ),
                                       make_url("/",''),
@@ -233,9 +232,13 @@ sub do_show {
                            $package_page .= "<td>".$versions->{$a}."</td>"
                                if $multiple_versions;
                            $package_page .= '<td class="size">';
-                           $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . "&nbsp;kB";
+                           # package size
+                           $package_page .=  sprintf(_g('%.1f&nbsp;kB'),
+                                                     floor(($sizes_deb->{$a}/102.4)+0.5)/10);
                            $package_page .= '</td><td class="size">';
-                           $package_page .=  $sizes_inst->{$a} . "&nbsp;kB";
+                           # installed size
+                           $package_page .=  sprintf(_g('%d&nbsp;kB'),
+                                                     $sizes_inst->{$a});
                            $package_page .= "</td>\n<td>";
                            if ( $suite ne "experimental" ) {
                                $package_page .= sprintf( "[<a href=\"%s\">"._g( "list of files" )."</a>]\n",