]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/DoShow.pm
Fix some minor issues
[deb/packages.git] / lib / Packages / DoShow.pm
index 0f97b83da0840268f02a6395499341171ec3d7c6..e3e1945b6b7cc7123e4705a47f681e79f16106f1 100644 (file)
@@ -1,6 +1,7 @@
 package Packages::DoShow;
 
 use strict;
 package Packages::DoShow;
 
 use strict;
+use warnings;
 
 use POSIX;
 use URI::Escape;
 
 use POSIX;
 use URI::Escape;
@@ -27,13 +28,13 @@ sub do_show {
     my ($params, $opts, $html_header, $menu, $page_content) = @_;
 
     if ($params->{errors}{package}) {
     my ($params, $opts, $html_header, $menu, $page_content) = @_;
 
     if ($params->{errors}{package}) {
-       fatal_error( _( "package not valid or not specified" ) );
+       fatal_error( _g( "package not valid or not specified" ) );
     }
     if ($params->{errors}{suite}) {
     }
     if ($params->{errors}{suite}) {
-       fatal_error( _( "suite not valid or not specified" ) );
+       fatal_error( _g( "suite not valid or not specified" ) );
     }
     if (@{$opts->{suite}} > 1) {
     }
     if (@{$opts->{suite}} > 1) {
-       fatal_error( sprintf( _( "more than one suite specified for show (%s)" ), "@{$opts->{suite}}" ) );
+       fatal_error( sprintf( _g( "more than one suite specified for show (%s)" ), "@{$opts->{suite}}" ) );
     }
 
     my $pkg = $opts->{package};
     }
 
     my $pkg = $opts->{package};
@@ -68,36 +69,30 @@ sub do_show {
        }
 
        unless (@results || @non_results ) {
        }
 
        unless (@results || @non_results ) {
-           fatal_error( _( "No such package." )."<br>".
-                        sprintf( _( '<a href="%s">Search for the package</a>' ), "$SEARCH_URL/$pkg" ) );
+           fatal_error( _g( "No such package." )."<br>".
+                        sprintf( _g( '<a href="%s">Search for the package</a>' ), "$SEARCH_URL/$pkg" ) );
        } else {
            my %all_suites;
            foreach (@results, @non_results) {
                my $a = $_->[1];
                my $s = $_->[2];
        } else {
            my %all_suites;
            foreach (@results, @non_results) {
                my $a = $_->[1];
                my $s = $_->[2];
-               if ($a =~ /^(?:us|security|non-US)$/o) {
-                   $all_suites{$s}++;
-               } else {
-                   $all_suites{"$s/$a"}++;
-               }
+               $all_suites{$s}++;
            }
            foreach (suites_sort(keys %all_suites)) {
            }
            foreach (suites_sort(keys %all_suites)) {
-               if (("$suite/$archive" eq $_)
-                   || (!$all_suites{"$suite/$archive"} && ($suite eq $_))) {
+               if ($suite eq $_) {
                    $$menu .= "[ <strong>$_</strong> ] ";
                } else {
                    $$menu .= "[ <strong>$_</strong> ] ";
                } else {
-                   $$menu .=
-                       "[ <a href=\"$ROOT/$_/$encodedpkg\">$_</a> ] ";
+                   $$menu .= "[ <a href=\"".make_url($encodedpkg,'',{suite=>$suite})."\">$_</a> ] ";
                }
            }
            $$menu .= '<br>';
            
            unless (@results) {
                }
            }
            $$menu .= '<br>';
            
            unless (@results) {
-               fatal_error( _( "Package not available in this suite." ) );
+               fatal_error( _g( "Package not available in this suite." ) );
            } else {
                unless ($opts->{source}) {
                    for my $entry (@results) {
            } else {
                unless ($opts->{source}) {
                    for my $entry (@results) {
-                       debug( join(":", @$entry), 1 );
+                       debug( join(":", @$entry), 1 ) if DEBUG;
                        my (undef, $archive, undef, $arch, $section, $subsection,
                            $priority, $version, $provided_by) = @$entry;
                        
                        my (undef, $archive, undef, $arch, $section, $subsection,
                            $priority, $version, $provided_by) = @$entry;
                        
@@ -106,7 +101,8 @@ sub do_show {
                            $data{package} = $pkg;
                            $data{architecture} = $arch;
                            $data{version} = $version;
                            $data{package} = $pkg;
                            $data{architecture} = $arch;
                            $data{version} = $version;
-                           $page->merge_package(\%data) or debug( "Merging $pkg $arch $version FAILED", 2 );
+                           $page->merge_package(\%data)
+                               or debug( "Merging $pkg $arch $version FAILED", 2 ) if DEBUG;
                        } else {
                            $page->add_provided_by([split /\s+/, $provided_by]);
                        }
                        } else {
                            $page->add_provided_by([split /\s+/, $provided_by]);
                        }
@@ -116,22 +112,22 @@ sub do_show {
                        $version = $page->{newest};
                        my $source = $page->get_newest( 'source' );
                        $archive = $page->get_newest( 'archive' );
                        $version = $page->{newest};
                        my $source = $page->get_newest( 'source' );
                        $archive = $page->get_newest( 'archive' );
-                       debug( "find source package: source=$source", 1);
+                       debug( "find source package: source=$source", 1) if DEBUG;
                        my $src_data = $sources_all{"$archive $suite $source"};
                        $page->add_src_data( $source, $src_data )
                            if $src_data;
 
                        my $st1 = new Benchmark;
                        my $std = timediff($st1, $st0);
                        my $src_data = $sources_all{"$archive $suite $source"};
                        $page->add_src_data( $source, $src_data )
                            if $src_data;
 
                        my $st1 = new Benchmark;
                        my $std = timediff($st1, $st0);
-                       debug( "Data search and merging took ".timestr($std) );
+                       debug( "Data search and merging took ".timestr($std) ) if DEBUG;
 
 
-                       my ($v_str, $v_str_arch, $v_str_arr) = $page->get_version_string();
                        my $did = $page->get_newest( 'description' );
                        $section = $page->get_newest( 'section' );
                        $subsection = $page->get_newest( 'subsection' );
                        my $filenames = $page->get_arch_field( 'filename' );
                        my $file_md5sums = $page->get_arch_field( 'md5sum' );
                        my $archives = $page->get_arch_field( 'archive' );
                        my $did = $page->get_newest( 'description' );
                        $section = $page->get_newest( 'section' );
                        $subsection = $page->get_newest( 'subsection' );
                        my $filenames = $page->get_arch_field( 'filename' );
                        my $file_md5sums = $page->get_arch_field( 'md5sum' );
                        my $archives = $page->get_arch_field( 'archive' );
+                       my $versions = $page->get_arch_field( 'version' );
                        my $sizes_inst = $page->get_arch_field( 'installed-size' );
                        my $sizes_deb = $page->get_arch_field( 'size' );
                        my @archs = sort $page->get_architectures;
                        my $sizes_inst = $page->get_arch_field( 'installed-size' );
                        my $sizes_deb = $page->get_arch_field( 'size' );
                        my @archs = sort $page->get_architectures;
@@ -148,40 +144,43 @@ 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 =~ 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 );
-
-                       $$menu .= simple_menu( [ _( "Distribution:" ),
-                                                _( "Overview over this suite" ),
-                                                "$ROOT/$suite/",
-                                                $suite ],
-                                              [ _( "Section:" ),
-                                                _( "All packages in this section" ),
-                                                "$ROOT/$suite/$subsection/",
-                                                $subsection ],
-                                              );
-
-                       my $title .= sprintf( _( "Package: %s (%s)" ), $pkg, $v_str );
+                       my @menu = ( [ _g( "Distribution:" ),
+                                      _g( "Overview over this suite" ),
+                                      make_url("/",''),
+                                      $suite ],
+                                    [ _g( "Section:" ),
+                                      _g( "All packages in this section" ),
+                                      make_url("$subsection/",''),
+                                      $subsection ], );
+                       my $source = $page->get_src('package');
+                       push @menu, [ _g( "Source:" ),
+                                     _g( "Source package building this package" ),
+                                     make_url($source,'',{source=>'source'}),
+                                     $source ] if $source;
+                       $$menu .= simple_menu( @menu );
+
+                       my $v_str = $version;
+                       my $multiple_versions = grep { $_ ne $version } values %$versions;
+                       $v_str .= _g(" and others") if $multiple_versions;
+                       my $title .= sprintf( _g( "Package: %s (%s)" ), $pkg, $v_str );
                        $title .=  " ".marker( $archive ) if $archive ne 'us';
                        $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
                            and $archive ne 'non-US'; # non-US/security
                        $title .=  " ".marker( $section ) if $section ne 'main';
                        $package_page .= title( $title );
                        
                        $title .=  " ".marker( $archive ) if $archive ne 'us';
                        $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
                            and $archive ne 'non-US'; # non-US/security
                        $title .=  " ".marker( $section ) if $section ne 'main';
                        $package_page .= title( $title );
                        
-                       $package_page .= "<h2>"._( "Versions:" )." $v_str_arch</h2>\n" 
-                           unless $version eq $v_str;
                        if (my $provided_by = $page->{provided_by}) {
                        if (my $provided_by = $page->{provided_by}) {
-                           note( _( "This is also a virtual package provided by ").join( ', ', map { "<a href=\"$ROOT/$suite/$_\">$_</a>"  } @$provided_by) );
+                           note( _g( "This is also a virtual package provided by ").join( ', ', map { "<a href=\"".make_url($_,'')."\">$_</a>"  } @$provided_by) );
                        }
                        
                        if ($suite eq "experimental") {
                        }
                        
                        if ($suite eq "experimental") {
-                           note( _( "Experimental package"),
-                                 _( "Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p>"
+                           note( _g( "Experimental package"),
+                                 _g( "Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p>"
                                  );
                        }
                        if ($subsection eq "debian-installer") {
                                  );
                        }
                        if ($subsection eq "debian-installer") {
-                           note( _( "debian-installer udeb package"),
-                                 _( 'Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal Debian system.' )
+                           note( _g( "debian-installer udeb package"),
+                                 _g( 'Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal Debian system.' )
                                  );
                        }
                        $package_page .= pdesc( $short_desc, $long_desc );
                                  );
                        }
                        $package_page .= pdesc( $short_desc, $long_desc );
@@ -202,14 +201,11 @@ sub do_show {
 
                        if ( $dep_list ) {
                            $package_page .= "<div id=\"pdeps\">\n";
 
                        if ( $dep_list ) {
                            $package_page .= "<div id=\"pdeps\">\n";
-                           $package_page .= sprintf( "<h2>"._( "Other Packages Related to %s" )."</h2>\n", $pkg );
-                           if ($suite eq "experimental") {
-                               note( sprintf( _( 'Note that the <strong>experimental</strong> distribution is not self-contained; missing dependencies are likely found in the <a href="%s">unstable</a> distribution.' ), "$ROOT/unstable/" ) );
-                           }
+                           $package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
                            
                            
-                           $package_page .= pdeplegend( [ 'dep',  _( 'depends' ) ],
-                                                        [ 'rec',  _( 'recommends' ) ],
-                                                        [ 'sug',  _( 'suggests' ) ], );
+                           $package_page .= pdeplegend( [ 'dep',  _g( 'depends' ) ],
+                                                        [ 'rec',  _g( 'recommends' ) ],
+                                                        [ 'sug',  _g( 'suggests' ) ], );
                            
                            $package_page .= $dep_list;
                            $package_page .= "</div> <!-- end pdeps -->\n";
                            
                            $package_page .= $dep_list;
                            $package_page .= "</div> <!-- end pdeps -->\n";
@@ -220,27 +216,36 @@ sub do_show {
                        #
                        my $encodedpack = uri_escape( $pkg );
                        $package_page .= "<div id=\"pdownload\">";
                        #
                        my $encodedpack = uri_escape( $pkg );
                        $package_page .= "<div id=\"pdownload\">";
-                       $package_page .= sprintf( "<h2>"._( "Download %s\n" )."</h2>",
+                       $package_page .= sprintf( "<h2>"._g( "Download %s\n" )."</h2>",
                                                  $pkg ) ;
                                                  $pkg ) ;
-                       $package_page .= "<table summary=\""._("The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.")."\">\n";
-                       $package_page .= "<caption class=\"hidecss\">"._("Download for all available architectures")."</caption>\n";
+                       $package_page .= "<table summary=\""._g("The download table links to the download of the package and a file overview. In addition it gives information about the package size and the installed size.")."\">\n";
+                       $package_page .= "<caption class=\"hidecss\">"._g("Download for all available architectures")."</caption>\n";
                        $package_page .= "<tr>\n";
                        $package_page .= "<tr>\n";
-                       $package_page .= "<th>"._("Architecture")."</th><th>"._("Files")."</th><th>"._( "Package Size")."</th><th>"._("Installed Size")."</th></tr>\n";
+                       $package_page .= "<th>"._g("Architecture")."</th>";
+                       $package_page .= "<th>"._g("Version")."</th>"
+                           if $multiple_versions;
+                       $package_page .= "<th>"._g( "Package Size")."</th><th>"._g("Installed Size")."</th><th>"._g("Files")."</th></tr>\n";
                        foreach my $a ( @archs ) {
                            $package_page .= "<tr>\n";
                        foreach my $a ( @archs ) {
                            $package_page .= "<tr>\n";
-                           $package_page .=  "<th><a href=\"$ROOT/$suite/$encodedpkg/$a/download";
+                           $package_page .=  "<th><a href=\"".make_url("$encodedpkg/$a/download",'');
                            $package_page .=  "\">$a</a></th>\n";
                            $package_page .=  "\">$a</a></th>\n";
-                           $package_page .= "<td>";
+                           $package_page .= "<td>".$versions->{$a}."</td>"
+                               if $multiple_versions;
+                           $package_page .= '<td class="size">';
+                           # package size
+                           $package_page .=  sprintf(_g('%.1f&nbsp;kB'),
+                                                     floor(($sizes_deb->{$a}/102.4)+0.5)/10);
+                           $package_page .= '</td><td class="size">';
+                           # installed size
+                           $package_page .=  sprintf(_g('%d&nbsp;kB'),
+                                                     $sizes_inst->{$a});
+                           $package_page .= "</td>\n<td>";
                            if ( $suite ne "experimental" ) {
                            if ( $suite ne "experimental" ) {
-                               $package_page .= sprintf( "[<a href=\"%s\">"._( "list of files" )."</a>]\n",
-                                                         "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg );
+                               $package_page .= sprintf( "[<a href=\"%s\">"._g( "list of files" )."</a>]\n",
+                                                         make_url("$encodedpkg/$a/filelist",''), $pkg );
                            } else {
                            } else {
-                               $package_page .= _( "no current information" );
+                               $package_page .= _g( "no current information" );
                            }
                            }
-                           $package_page .= '</td><td class="size">';
-                           $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . "&nbsp;kB";
-                           $package_page .= '</td><td class="size">';
-                           $package_page .=  $sizes_inst->{$a} . "&nbsp;kB";
                            $package_page .= "</td>\n</tr>";
                        }
                        $package_page .= "</table>\n";
                            $package_page .= "</td>\n</tr>";
                        }
                        $package_page .= "</table>\n";
@@ -256,63 +261,62 @@ sub do_show {
                                                    changesandcopy => 1, maintainers => 1,
                                                    search => 1 );
                    } else { # unless $page->is_virtual
                                                    changesandcopy => 1, maintainers => 1,
                                                    search => 1 );
                    } else { # unless $page->is_virtual
-                       $short_desc = _( "virtual package" );
+                       $short_desc = _g( "virtual package" );
 
 
-                       $$menu .= simple_menu( [ _( "Distribution:" ),
-                                                _( "Overview over this distribution" ),
-                                                "$ROOT/",
+                       $$menu .= simple_menu( [ _g( "Distribution:" ),
+                                                _g( "Overview over this distribution" ),
+                                                make_url('/',''),
                                                 $suite ],
                                                 $suite ],
-                                              [ _( "Section:" ),
-                                                _( "All packages in this section" ),
-                                                "$ROOT/$suite/virtual/",
+                                              [ _g( "Section:" ),
+                                                _g( "All packages in this section" ),
+                                                make_url("virtual/",''),
                                                 
                                                 'virtual' ], );
 
                                                 
                                                 'virtual' ], );
 
-                       $package_page .= title( sprintf( _( "Virtual Package: %s" ),
+                       $package_page .= title( sprintf( _g( "Virtual Package: %s" ),
                                                         $pkg ) );
 
                        my $policy_url = 'http://www.debian.org/doc/debian-policy/';
                                                         $pkg ) );
 
                        my $policy_url = 'http://www.debian.org/doc/debian-policy/';
-                       note( sprintf( _( 'This is a <em>virtual package</em>. See the <a href="%s">Debian policy</a> for a <a href="%sch-binary.html#s-virtual_pkg">definition of virtual packages</a>.' ),
+                       note( sprintf( _g( 'This is a <em>virtual package</em>. See the <a href="%s">Debian policy</a> for a <a href="%sch-binary.html#s-virtual_pkg">definition of virtual packages</a>.' ),
                                       $policy_url, $policy_url ));
 
                                       $policy_url, $policy_url ));
 
-                       $package_page .= sprintf( "<h2>"._( "Packages providing %s" )."</h2>",                              $pkg );
+                       $package_page .= sprintf( "<h2>"._g( "Packages providing %s" )."</h2>",                              $pkg );
                        my $provided_by = $page->{provided_by};
                        $package_page .= pkg_list( \%packages, $opts, $provided_by, 'en');
 
                    } # else (unless $page->is_virtual)
                } else { # unless $opts->{source}
                    for my $entry (@results) {
                        my $provided_by = $page->{provided_by};
                        $package_page .= pkg_list( \%packages, $opts, $provided_by, 'en');
 
                    } # else (unless $page->is_virtual)
                } else { # unless $opts->{source}
                    for my $entry (@results) {
-                       debug( join(":", @$entry), 1 );
+                       debug( join(":", @$entry), 1 ) if DEBUG;
                        my (undef, $archive, undef, $section, $subsection,
                            $priority, $version) = @$entry;
                        
                        my $data = $sources_all{"$archive $suite $pkg"};
                        $page->merge_data($pkg, $suite, $archive, $data)
                        my (undef, $archive, undef, $section, $subsection,
                            $priority, $version) = @$entry;
                        
                        my $data = $sources_all{"$archive $suite $pkg"};
                        $page->merge_data($pkg, $suite, $archive, $data)
-                           or debug( "Merging $pkg $version FAILED", 2 );
+                           or debug( "Merging $pkg $version FAILED", 2 ) if DEBUG;
                    }
                    $version = $page->{version};
 
                    my $st1 = new Benchmark;
                    my $std = timediff($st1, $st0);
                    }
                    $version = $page->{version};
 
                    my $st1 = new Benchmark;
                    my $std = timediff($st1, $st0);
-                   debug( "Data search and merging took ".timestr($std) );
+                   debug( "Data search and merging took ".timestr($std) ) if DEBUG;
 
 
-                   my ($v_str, $v_str_arr) = $page->get_version_string();
                    $archive = $page->get_newest( 'archive' );
                    $section = $page->get_newest( 'section' );
                    $subsection = $page->get_newest( 'subsection' );
 
                    $archive = $page->get_newest( 'archive' );
                    $section = $page->get_newest( 'section' );
                    $subsection = $page->get_newest( 'subsection' );
 
-                   $$menu .= simple_menu( [ _( "Distribution:" ),
-                                            _( "Overview over this suite" ),
-                                            "/$suite/",
+                   $$menu .= simple_menu( [ _g( "Distribution:" ),
+                                            _g( "Overview over this suite" ),
+                                            make_url('/',''),
                                             $suite ],
                                             $suite ],
-                                          [ _( "Section:" ),
-                                            _( "All packages in this section" ),
-                                            "/$suite/$subsection/",
+                                          [ _g( "Section:" ),
+                                            _g( "All packages in this section" ),
+                                            make_url("$subsection/",''),
                                             $subsection ],
                                           );
                    
                                             $subsection ],
                                           );
                    
-                   my $title .= sprintf( _( "Source Package: %s (%s)" ),
-                                         $pkg, $v_str );
+                   my $title .= sprintf( _g( "Source Package: %s (%s)" ),
+                                         $pkg, $version );
                    $title .=  " ".marker( $archive ) if $archive ne 'us';
                    $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
                        and $archive ne 'non-US'; # non-US/security
                    $title .=  " ".marker( $archive ) if $archive ne 'us';
                    $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
                        and $archive ne 'non-US'; # non-US/security
@@ -320,20 +324,20 @@ sub do_show {
                    $package_page .= title( $title );
                    
                    if ($suite eq "experimental") {
                    $package_page .= title( $title );
                    
                    if ($suite eq "experimental") {
-                       note( _( "Experimental package"),
-                             _( "Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p>"
+                       note( _g( "Experimental package"),
+                             _g( "Warning: This package is from the <strong>experimental</strong> distribution. That means it is likely unstable or buggy, and it may even cause data loss. If you ignore this warning and install it nevertheless, you do it on your own risk.")."</p>"
                              );
                    }
                    if ($subsection eq "debian-installer") {
                              );
                    }
                    if ($subsection eq "debian-installer") {
-                       note( _( "debian-installer udeb package"),
-                             _( 'Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal Debian system.' )
+                       note( _g( "debian-installer udeb package"),
+                             _g( 'Warning: This package is intended for the use in building <a href="http://www.debian.org/devel/debian-installer">debian-installer</a> images only. Do not install it on a normal Debian system.' )
                              );
                    }
 
                    my $binaries = find_binaries( $pkg, $archive, $suite, \%src2bin );
                    if ($binaries && @$binaries) {
                        $package_page .= '<div class="pdesc">';
                              );
                    }
 
                    my $binaries = find_binaries( $pkg, $archive, $suite, \%src2bin );
                    if ($binaries && @$binaries) {
                        $package_page .= '<div class="pdesc">';
-                       $package_page .= _( "The following binary packages are built from this source package:" );
+                       $package_page .= _g( "The following binary packages are built from this source package:" );
                        $package_page .= pkg_list( \%packages, $opts, $binaries, 'en' );
                        $package_page .= '</div> <!-- end pdesc -->';
                    }
                        $package_page .= pkg_list( \%packages, $opts, $binaries, 'en' );
                        $package_page .= '</div> <!-- end pdesc -->';
                    }
@@ -351,14 +355,10 @@ sub do_show {
 
                    if ( $dep_list ) {
                        $package_page .= "<div id=\"pdeps\">\n";
 
                    if ( $dep_list ) {
                        $package_page .= "<div id=\"pdeps\">\n";
-                       $package_page .= sprintf( "<h2>"._( "Other Packages Related to %s" )."</h2>\n", $pkg );
-                       if ($suite eq "experimental") {
-                           note( sprintf( _( 'Note that the <strong>experimental</strong> distribution is not self-contained; missing dependencies are likely found in the <a href="%s">unstable</a> distribution.' ), "$ROOT/unstable/" ) );
-
-                       }
+                       $package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
                        
                        
-                       $package_page .= pdeplegend( [ 'adep',  _( 'build-depends' ) ],
-                                                    [ 'idep',  _( 'build-depends-indep' ) ],
+                       $package_page .= pdeplegend( [ 'adep',  _g( 'build-depends' ) ],
+                                                    [ 'idep',  _g( 'build-depends-indep' ) ],
                                                     );
                        
                        $package_page .= $dep_list;
                                                     );
                        
                        $package_page .= $dep_list;
@@ -369,22 +369,22 @@ sub do_show {
                    # Source package download
                    #
                    $package_page .= "<div id=\"pdownload\">\n";
                    # Source package download
                    #
                    $package_page .= "<div id=\"pdownload\">\n";
-                   $package_page .= sprintf( "<h2>"._( "Download %s" )."</h2>\n",
+                   $package_page .= sprintf( "<h2>"._g( "Download %s" )."</h2>\n",
                                              $pkg ) ;
 
                    my $source_files = $page->get_src( 'files' );
                    my $source_dir = $page->get_src( 'directory' );
                    
                                              $pkg ) ;
 
                    my $source_files = $page->get_src( 'files' );
                    my $source_dir = $page->get_src( 'directory' );
                    
-                   $package_page .= sprintf( '<table summary="'._('Download information for the files of this source package' ).'">'.
+                   $package_page .= sprintf( '<table summary="'._g('Download information for the files of this source package' ).'">'.
                                              "<tr><th>%s</th><th>%s</th><th>%s</th>",
                                              "<tr><th>%s</th><th>%s</th><th>%s</th>",
-                                             _("File"),
-                                             _("Size (in kB)"),
-                                             _("md5sum") );
+                                             _g("File"),
+                                             _g("Size (in kB)"),
+                                             _g("md5sum") );
                    foreach( @$source_files ) {
                        my ($src_file_md5, $src_file_size, $src_file_name)
                            = split /\s+/, $_;
                        my $src_url;
                    foreach( @$source_files ) {
                        my ($src_file_md5, $src_file_size, $src_file_name)
                            = split /\s+/, $_;
                        my $src_url;
-                       for ($archive) {
+                       for ("$suite/$archive") {
                            /security/o &&  do {
                                $src_url = $FTP_SITES{security}; last };
                            /volatile/o &&  do {
                            /security/o &&  do {
                                $src_url = $FTP_SITES{security}; last };
                            /volatile/o &&  do {
@@ -421,14 +421,14 @@ sub do_show {
     }
 
 #    use Data::Dumper;
     }
 
 #    use Data::Dumper;
-#    debug( "Final page object:\n".Dumper($page), 3 );
+#    debug( "Final page object:\n".Dumper($page), 3 ) if DEBUG;
 
     my $title = $opts->{source} ?
 
     my $title = $opts->{source} ?
-       _( "Details of source package <em>%s</em> in %s" ) :
-       _( "Details of package <em>%s</em> in %s" ) ;
+       _g( "Details of source package <em>%s</em> in %s" ) :
+       _g( "Details of package <em>%s</em> in %s" ) ;
     my $title_tag = $opts->{source} ?
     my $title_tag = $opts->{source} ?
-       _( "Details of source package %s in %s" ) :
-       _( "Details of package %s in %s" ) ;
+       _g( "Details of source package %s in %s" ) :
+       _g( "Details of package %s in %s" ) ;
     %$html_header = ( title => sprintf( $title, $pkg, $suite ) ,
                      lang => $opts->{lang},
                      desc => $short_desc,
     %$html_header = ( title => sprintf( $title, $pkg, $suite ) ,
                      lang => $opts->{lang},
                      desc => $short_desc,