From: Frank Lichtenheld Date: Tue, 28 Feb 2006 21:28:07 +0000 (+0000) Subject: Fix some minor issues X-Git-Tag: switch-to-templates~30 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=8d29452530e823cbcd07a30898e98abe565a046c;p=deb%2Fpackages.git Fix some minor issues --- diff --git a/lib/Packages/CGI.pm b/lib/Packages/CGI.pm index 94986cb..b8607c9 100644 --- a/lib/Packages/CGI.pm +++ b/lib/Packages/CGI.pm @@ -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 { diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index 6852c13..e3e1945 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -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

\n/go; $long_desc =~ s/(((\n|\A) [^\n]*)+)/\n

$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 .= "".$versions->{$a}.""
 				if $multiple_versions;
 			    $package_page .= '';
-			    $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . " kB";
+			    # package size
+			    $package_page .=  sprintf(_g('%.1f kB'),
+						      floor(($sizes_deb->{$a}/102.4)+0.5)/10);
 			    $package_page .= '';
-			    $package_page .=  $sizes_inst->{$a} . " kB";
+			    # installed size
+			    $package_page .=  sprintf(_g('%d kB'),
+						      $sizes_inst->{$a});
 			    $package_page .= "\n";
 			    if ( $suite ne "experimental" ) {
 				$package_page .= sprintf( "["._g( "list of files" )."]\n",