]> git.deb.at Git - deb/packages.git/commitdiff
Replace _() with _g() everywhere. Oddly enough, it works under mod_perl,
authorFrank Lichtenheld <frank@lichtenheld.de>
Wed, 22 Feb 2006 01:41:28 +0000 (01:41 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Wed, 22 Feb 2006 01:41:28 +0000 (01:41 +0000)
but not anywhere else

cgi-bin/dispatcher.pl
lib/Packages/DoDownload.pm
lib/Packages/DoFilelist.pm
lib/Packages/DoSearch.pm
lib/Packages/DoShow.pm

index 3198d2a81e48fb7d20ec03ed8eaea3dfc755ceb4..3873c4996efbb442b519a3a6caaf04a93a6572c6 100755 (executable)
@@ -86,10 +86,10 @@ if (my $path = $input->path_info() || $input->param('PATH_INFO')) {
        shift @components;
        $what_to_do = 'search';
        # Done
        shift @components;
        $what_to_do = 'search';
        # Done
-       fatal_error( _( "search doesn't take any more path elements" ) )
+       fatal_error( _g( "search doesn't take any more path elements" ) )
            if @components > 0;
     } elsif (@components == 0) {
            if @components > 0;
     } elsif (@components == 0) {
-       fatal_error( _( "We're supposed to display the homepage here, instead of getting dispatch.pl" ) );
+       fatal_error( _g( "We're supposed to display the homepage here, instead of getting dispatch.pl" ) );
     } elsif (@components == 1) {
        $what_to_do = 'search';
     } else {
     } elsif (@components == 1) {
        $what_to_do = 'search';
     } else {
@@ -114,7 +114,7 @@ if (my $path = $input->path_info() || $input->param('PATH_INFO')) {
        sub set_param_once {
            my ($cgi, $params_set, $key, $val) = @_;
            if ($params_set->{$key}++) {
        sub set_param_once {
            my ($cgi, $params_set, $key, $val) = @_;
            if ($params_set->{$key}++) {
-               fatal_error( sprintf( _( "%s set more than once in path" ), $key ) );
+               fatal_error( sprintf( _g( "%s set more than once in path" ), $key ) );
            } else {
                $cgi->param( $key, $val );
            }
            } else {
                $cgi->param( $key, $val );
            }
@@ -144,7 +144,7 @@ if (my $path = $input->path_info() || $input->param('PATH_INFO')) {
        @components = @tmp;
 
        if (@components > 1) {
        @components = @tmp;
 
        if (@components > 1) {
-           fatal_error( sprintf( _( "two or more packages specified (%s)" ), "@components" ) );
+           fatal_error( sprintf( _g( "two or more packages specified (%s)" ), "@components" ) );
        }
     } # else if (@components == 1)
     
        }
     } # else if (@components == 1)
     
@@ -230,12 +230,12 @@ unless (@Packages::CGI::fatal_errors) {
     &{"do_$what_to_do"}( \%params, \%opts, \%html_header,
                         \$menu, \$page_content );
 } else {
     &{"do_$what_to_do"}( \%params, \%opts, \%html_header,
                         \$menu, \$page_content );
 } else {
-    %html_header = ( title => _('Error'),
+    %html_header = ( title => _g('Error'),
                     lang => $opts{lang},
                     print_title => 1,
                     print_search_field => 'packages',
                     search_field_values => { 
                     lang => $opts{lang},
                     print_title => 1,
                     print_search_field => 'packages',
                     search_field_values => { 
-                        keywords => _('search for a package'),
+                        keywords => _g('search for a package'),
                         searchon => 'default',
                         arch => 'any',
                         suite => 'all',
                         searchon => 'default',
                         arch => 'any',
                         suite => 'all',
index 8b1d6f61265f15a3507eb26e1bba1905e296a188..ab3ab73197cd47ef4cc01f7223c94ec07d2b5c9a 100644 (file)
@@ -200,19 +200,19 @@ sub do_download {
     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 ($params->{errors}{arch}) {
     }
     if ($params->{errors}{arch}) {
-       fatal_error( _( "architecture not valid or not specified" ) );
+       fatal_error( _g( "architecture not valid or not specified" ) );
     }
     if (@{$opts->{suite}} > 1) {
     }
     if (@{$opts->{suite}} > 1) {
-       fatal_error( sprintf( _( "more than one suite specified for download (%s)" ), "@{$opts->{suite}}" ) );
+       fatal_error( sprintf( _g( "more than one suite specified for download (%s)" ), "@{$opts->{suite}}" ) );
     }
     if (@{$opts->{arch}} > 1) {
     }
     if (@{$opts->{arch}} > 1) {
-       fatal_error( sprintf( _( "more than one architecture specified for download (%s)" ), "@{$opts->{arch}}" ) );
+       fatal_error( sprintf( _g( "more than one architecture specified for download (%s)" ), "@{$opts->{arch}}" ) );
     }
 
     $opts->{h_sections} = { map { $_ => 1 } @SECTIONS };
     }
 
     $opts->{h_sections} = { map { $_ => 1 } @SECTIONS };
@@ -233,8 +233,8 @@ sub do_download {
        read_entry( \%packages, $pkg, \@results, $opts );
 
        unless (@results) {
        read_entry( \%packages, $pkg, \@results, $opts );
 
        unless (@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 $final_result = shift @results;
            foreach (@results) {
        } else {
            my $final_result = shift @results;
            foreach (@results) {
@@ -253,99 +253,99 @@ sub do_download {
        }
     }
 
        }
     }
 
-    %$html_header = ( title => _( "Package Download Selection" ),
+    %$html_header = ( title => _g( "Package Download Selection" ),
                      lang => $opts->{lang},
                      print_title => 1 );
 
     if ($file) {
        if ($arch ne 'all') {
                      lang => $opts->{lang},
                      print_title => 1 );
 
     if ($file) {
        if ($arch ne 'all') {
-           $$page_content .= '<h2>'.sprintf( _('Download Page for <kbd>%s</kbd> on %s machines'), $filen, $arches{$arch} ).'</h2>';
+           $$page_content .= '<h2>'.sprintf( _g('Download Page for <kbd>%s</kbd> on %s machines'), $filen, $arches{$arch} ).'</h2>';
        } else {
        } else {
-           $$page_content .= '<h2>'.sprintf( _('Download Page for <kbd>%s</kbd>'), $filen ).'</h2>';
+           $$page_content .= '<h2>'.sprintf( _g('Download Page for <kbd>%s</kbd>'), $filen ).'</h2>';
        }
        my $directory = join( '/', @file_components).'/';
        if ($archive ne 'security' ) {
        }
        my $directory = join( '/', @file_components).'/';
        if ($archive ne 'security' ) {
-           $$page_content .= "<p>".sprintf( _( 'You can download the requested file from the <tt>%s</tt> subdirectory at any of these sites:' ), $directory )."</p>\n";
+           $$page_content .= "<p>".sprintf( _g( 'You can download the requested file from the <tt>%s</tt> subdirectory at any of these sites:' ), $directory )."</p>\n";
        } else {
        } else {
-           $$page_content .= "<p>".sprintf( _( 'You can download the requested file from the <tt>%s</tt> subdirectory at:' ), $directory )."</p>\n";
+           $$page_content .= "<p>".sprintf( _g( 'You can download the requested file from the <tt>%s</tt> subdirectory at:' ), $directory )."</p>\n";
        }
        
        if ($archive eq 'security') {
            
            $$page_content .= "<ul><li><a href=\"http://security.debian.org/debian-security/$file\">security.debian.org/debian-security</a></li></ul>";
        }
        
        if ($archive eq 'security') {
            
            $$page_content .= "<ul><li><a href=\"http://security.debian.org/debian-security/$file\">security.debian.org/debian-security</a></li></ul>";
-           $$page_content .= '<p>'._( 'Debian security updates are currently officially distributed only via <tt>security.debian.org</tt>.' ).'</p>';
+           $$page_content .= '<p>'._g( 'Debian security updates are currently officially distributed only via <tt>security.debian.org</tt>.' ).'</p>';
        } elsif ($arch eq 'amd64') {
 
        } elsif ($arch eq 'amd64') {
 
-           $$page_content .= print_links( _( "North America" ), $file, @amd64_north_american_sites );
-           $$page_content .= print_links( _( "Europe" ), $file, @amd64_european_sites );
+           $$page_content .= print_links( _g( "North America" ), $file, @amd64_north_american_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @amd64_european_sites );
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
-           $$page_content .= print_links( _( "Asia" ), $file, @amd64_asian_sites );
+           $$page_content .= print_links( _g( "Asia" ), $file, @amd64_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
 
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
 
-           $$page_content .= '<p>'._( 'Note that AMD64 is not officialy included in the Debian archive yet, but the AMD64 porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/amd64/">AMD64 ports page</a> for current information.' ).'</p>';
+           $$page_content .= '<p>'._g( 'Note that AMD64 is not officialy included in the Debian archive yet, but the AMD64 porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/amd64/">AMD64 ports page</a> for current information.' ).'</p>';
        } elsif ($arch eq 'kfreebsd-i386') {
 
        } elsif ($arch eq 'kfreebsd-i386') {
 
-           $$page_content .= print_links( _( "North America" ), $file, @kfreebsd_north_american_sites );
-           $$page_content .= print_links( _( "Europe" ), $file, @kfreebsd_european_sites );
+           $$page_content .= print_links( _g( "North America" ), $file, @kfreebsd_north_american_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @kfreebsd_european_sites );
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
 #    $$page_content .= print_links( "Asia", $file, @amd64_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
        
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
 #    $$page_content .= print_links( "Asia", $file, @amd64_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
        
-           $$page_content .= '<p>'._( 'Note that GNU/kFreeBSD is not officialy included in the Debian archive yet, but the GNU/kFreeBSD porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/kfreebsd-gnu/">GNU/kFreeBSD ports page</a> for current information.' ).'</p>';
+           $$page_content .= '<p>'._g( 'Note that GNU/kFreeBSD is not officialy included in the Debian archive yet, but the GNU/kFreeBSD porter group keeps their archive in sync with the official archive as close as possible. See the <a href="http://www.debian.org/ports/kfreebsd-gnu/">GNU/kFreeBSD ports page</a> for current information.' ).'</p>';
        } elsif ($archive eq 'non-US') {
 
        } elsif ($archive eq 'non-US') {
 
-           $$page_content .= print_links( _( "North America" ), $file, @nonus_north_american_sites );
-           $$page_content .= print_links( _( "Europe" ), $file, @nonus_european_sites );
-           $$page_content .= print_links( _( "Australia and New Zealand" ), $file,
+           $$page_content .= print_links( _g( "North America" ), $file, @nonus_north_american_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @nonus_european_sites );
+           $$page_content .= print_links( _g( "Australia and New Zealand" ), $file,
                                           @nonus_australian_sites );
                                           @nonus_australian_sites );
-           $$page_content .= print_links( _( "Asia" ), $file, @nonus_asian_sites );
-           $$page_content .= print_links( _( "South America" ), $file, @nonus_south_american_sites );
+           $$page_content .= print_links( _g( "Asia" ), $file, @nonus_asian_sites );
+           $$page_content .= print_links( _g( "South America" ), $file, @nonus_south_american_sites );
            
            
-           $$page_content .= '<p>'.sprintf( _('If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list-non-US' ).'</p>';
+           $$page_content .= '<p>'.sprintf( _g('If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list-non-US' ).'</p>';
        } elsif ($archive eq 'backports') {
        
 #    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
            $$page_content .= '<div class="cardleft">';
        } elsif ($archive eq 'backports') {
        
 #    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
            $$page_content .= '<div class="cardleft">';
-           $$page_content .= print_links( _( "Europe" ), $file, @backports_european_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @backports_european_sites );
            $$page_content .= '</div><div class="cardright">';
            $$page_content .= '</div><div class="cardright">';
-           $$page_content .= print_links( _( "Australia and New Zealand" ), $file,
+           $$page_content .= print_links( _g( "Australia and New Zealand" ), $file,
                                           @backports_australian_sites );
                                           @backports_australian_sites );
-           $$page_content .= print_links( _( "Asia" ), $file, @backports_asian_sites );
+           $$page_content .= print_links( _g( "Asia" ), $file, @backports_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
            $$page_content .= '</div>';
            
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
            $$page_content .= '</div>';
            
-           $$page_content .= '<p style="clear:both">'.sprintf( _( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.'), 'http://www.backports.org/debian/README.mirrors.html' ).'</p>';
+           $$page_content .= '<p style="clear:both">'.sprintf( _g( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.'), 'http://www.backports.org/debian/README.mirrors.html' ).'</p>';
        } elsif ($archive eq 'volatile') {
            
 #    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
        } elsif ($archive eq 'volatile') {
            
 #    $$page_content .= print_links( "North America", $file, @nonus_north_american_sites );
-           $$page_content .= print_links( _( "Europe" ), $file, @volatile_european_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @volatile_european_sites );
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
 #    $$page_content .= print_links( "Asia", $file, @nonus_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
 
 #    $$page_content .= print_links( "Australia and New Zealand", $file,
 #               @nonus_australian_sites );
 #    $$page_content .= print_links( "Asia", $file, @nonus_asian_sites );
 #    $$page_content .= print_links( "South America", $file, @nonus_south_american_sites );
 
-           $$page_content .= '<p>'.sprintf( _( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://volatile.debian.net/mirrors.html' ).'</p>';
+           $$page_content .= '<p>'.sprintf( _g( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://volatile.debian.net/mirrors.html' ).'</p>';
        } elsif ($archive eq 'us') {
            
            $$page_content .= '<div class="cardleft">';
        } elsif ($archive eq 'us') {
            
            $$page_content .= '<div class="cardleft">';
-           $$page_content .= print_links( _( "North America" ), $file, @north_american_sites );
+           $$page_content .= print_links( _g( "North America" ), $file, @north_american_sites );
            $$page_content .= '</div><div class="cardright">';
            $$page_content .= '</div><div class="cardright">';
-           $$page_content .= print_links( _( "Europe" ), $file, @european_sites );
+           $$page_content .= print_links( _g( "Europe" ), $file, @european_sites );
            $$page_content .= '</div><div class="cardleft">';
            $$page_content .= '</div><div class="cardleft">';
-           $$page_content .= print_links( _( "Australia and New Zealand" ), $file, @australian_sites );
+           $$page_content .= print_links( _g( "Australia and New Zealand" ), $file, @australian_sites );
            $$page_content .= '</div><div class="cardright">';
            $$page_content .= '</div><div class="cardright">';
-           $$page_content .= print_links( _( "Asia" ), $file, @asian_sites );
+           $$page_content .= print_links( _g( "Asia" ), $file, @asian_sites );
            $$page_content .= '</div><div class="cardleft">';
            $$page_content .= '</div><div class="cardleft">';
-           $$page_content .= print_links( _( "South America" ), $file, @south_american_sites );
+           $$page_content .= print_links( _g( "South America" ), $file, @south_american_sites );
            $$page_content .= '</div>';
            
            $$page_content .= '</div>';
            
-           $$page_content .= '<p style="clear:both">'.sprintf( _( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list' ).'</p>';
+           $$page_content .= '<p style="clear:both">'.sprintf( _g( 'If none of the above sites are fast enough for you, please see our <a href="%s">complete mirror list</a>.' ), 'http://www.debian.org/mirror/list' ).'</p>';
        }
     
        }
     
-    $$page_content .= '<p>'._( 'Note that in some browsers you will need to tell your browser you want the file saved to a file. For example, in Firefox or Mozilla, you should hold the Shift key when you click on the URL.' ).'</p>';
-    $$page_content .= "<p>".sprintf( _( 'The MD5sum for <tt>%s</tt> is <strong>%s</strong>' ), $filen, $md5sum ).'</p>'
+    $$page_content .= '<p>'._g( 'Note that in some browsers you will need to tell your browser you want the file saved to a file. For example, in Firefox or Mozilla, you should hold the Shift key when you click on the URL.' ).'</p>';
+    $$page_content .= "<p>".sprintf( _g( 'The MD5sum for <tt>%s</tt> is <strong>%s</strong>' ), $filen, $md5sum ).'</p>'
        if $md5sum;
     }
 }
        if $md5sum;
     }
 }
index 7fb1a8fd5456f7ca330db521a9a77881846456bc..20eb67fba6397010d133c4071a7bbb5ef4ac81bb 100644 (file)
@@ -28,13 +28,13 @@ sub do_filelist {
     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 ($params->{errors}{arch}) {
     }
     if ($params->{errors}{arch}) {
-       fatal_error( _( "architecture not valid or not specified" ) );
+       fatal_error( _g( "architecture not valid or not specified" ) );
     }
 
     $$menu = '';
     }
 
     $$menu = '';
@@ -42,8 +42,8 @@ sub do_filelist {
     my $suite = $opts->{suite}[0];
     my $arch = $opts->{arch}[0] ||'';
 
     my $suite = $opts->{suite}[0];
     my $arch = $opts->{arch}[0] ||'';
 
-    %$html_header = ( title => sprintf( _( "Filelist of package <em>%s</em> in <em>%s</em> of architecture <em>%s</em>" ), $pkg, $suite, $arch ),
-                     title_tag => sprintf( _( "Filelist of of package %s/%s/%s" ), $pkg, $suite, $arch ),
+    %$html_header = ( title => sprintf( _g( "Filelist of package <em>%s</em> in <em>%s</em> of architecture <em>%s</em>" ), $pkg, $suite, $arch ),
+                     title_tag => sprintf( _g( "Filelist of of package %s/%s/%s" ), $pkg, $suite, $arch ),
                      lang => $opts->{lang},
                      keywords => "debian, $suite, $arch, filelist",
                      print_title => 1,
                      lang => $opts->{lang},
                      keywords => "debian, $suite, $arch, filelist",
                      print_title => 1,
@@ -54,7 +54,7 @@ sub do_filelist {
            O_RDONLY, 0666, $DB_BTREE) {
 
            unless (exists $contents{$pkg}) {
            O_RDONLY, 0666, $DB_BTREE) {
 
            unless (exists $contents{$pkg}) {
-               fatal_error( _( "No such package in this suite on this architecture." ) );
+               fatal_error( _g( "No such package in this suite on this architecture." ) );
            } else {
                my @files = unpack "L/(CC/a)", $contents{$pkg};
                my $file = "";
            } else {
                my @files = unpack "L/(CC/a)", $contents{$pkg};
                my $file = "";
@@ -66,7 +66,7 @@ sub do_filelist {
                $$page_content .= '</pre></div>';
            }
        } else {
                $$page_content .= '</pre></div>';
            }
        } else {
-           fatal_error( _( "Invalid suite/architecture combination" ) );
+           fatal_error( _g( "Invalid suite/architecture combination" ) );
        }
     }
 }
        }
     }
 }
index 60052c59bb2b3b2cd03dcca7859e58020c19d1c0..64160c13b52183081957b38f45749242adb636ad 100644 (file)
@@ -27,9 +27,9 @@ sub do_search {
     $Params::Search::too_many_hits = 0;
 
     if ($params->{errors}{keywords}) {
     $Params::Search::too_many_hits = 0;
 
     if ($params->{errors}{keywords}) {
-       fatal_error( _( "keyword not valid or missing" ) );
+       fatal_error( _g( "keyword not valid or missing" ) );
     } elsif (length($opts->{keywords}) < 2) {
     } elsif (length($opts->{keywords}) < 2) {
-       fatal_error( _( "keyword too short (keywords need to have at least two characters)" ) );
+       fatal_error( _g( "keyword too short (keywords need to have at least two characters)" ) );
     }
 
     $$menu = "";
     }
 
     $$menu = "";
@@ -102,16 +102,16 @@ sub do_search {
     }
 
     if ($Packages::Search::too_many_hits) {
     }
 
     if ($Packages::Search::too_many_hits) {
-       error( sprintf( _( "Your search was too wide so we will only display exact matches. At least <em>%s</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords." ), $Packages::Search::too_many_hits ) );
+       error( sprintf( _g( "Your search was too wide so we will only display exact matches. At least <em>%s</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords." ), $Packages::Search::too_many_hits ) );
     }
     
     if (!@Packages::CGI::fatal_errors && !@results) {
        if ($searchon eq "names") {
            unless (@non_results) {
     }
     
     if (!@Packages::CGI::fatal_errors && !@results) {
        if ($searchon eq "names") {
            unless (@non_results) {
-               error( _( "Can't find that package." ) );
+               error( _g( "Can't find that package." ) );
            } else {
            } else {
-               hint( _( "Can't find that package." )." ".
-                     sprintf( _( '<a href="%s">%s</a>'.
+               hint( _g( "Can't find that package." )." ".
+                     sprintf( _g( '<a href="%s">%s</a>'.
                      " results have not been displayed due to the".
                      " search parameters." ), "$SEARCH_URL/$keyword_esc" ,
                      $#non_results+1 ) );
                      " results have not been displayed due to the".
                      " search parameters." ), "$SEARCH_URL/$keyword_esc" ,
                      $#non_results+1 ) );
@@ -121,24 +121,24 @@ sub do_search {
            if (($suites_enc eq 'all')
                && ($archs_enc eq 'any')
                && ($sections_enc eq 'all')) {
            if (($suites_enc eq 'all')
                && ($archs_enc eq 'any')
                && ($sections_enc eq 'all')) {
-               error( _( "Can't find that string." ) );
+               error( _g( "Can't find that string." ) );
            } else {
            } else {
-               error( sprintf( _( "Can't find that string, at least not in that suite (%s, section %s) and on that architecture (%s)." ),
+               error( sprintf( _g( "Can't find that string, at least not in that suite (%s, section %s) and on that architecture (%s)." ),
                                $suites_enc, $sections_enc, $archs_enc ) );
            }
            
            if ($opts->{exact}) {
                                $suites_enc, $sections_enc, $archs_enc ) );
            }
            
            if ($opts->{exact}) {
-               hint( sprintf( _( 'You have searched only for words exactly matching your keywords. You can try to search <a href="%s">allowing subword matching</a>.' ),
+               hint( sprintf( _g( 'You have searched only for words exactly matching your keywords. You can try to search <a href="%s">allowing subword matching</a>.' ),
                               encode_entities("$SEARCH_URL?exact=0&$opts->{common_params}") ) );
            }
        }
                               encode_entities("$SEARCH_URL?exact=0&$opts->{common_params}") ) );
            }
        }
-       hint( sprintf( _( 'You can try a different search on the <a href="%s">Packages search page</a>.' ), "$SEARCH_PAGE#search_packages" ) );
+       hint( sprintf( _g( 'You can try a different search on the <a href="%s">Packages search page</a>.' ), "$SEARCH_PAGE#search_packages" ) );
        
     }
 
        
     }
 
-    %$html_header = ( title => _( 'Package Search Results' ) ,
+    %$html_header = ( title => _g( 'Package Search Results' ) ,
                      lang => $opts->{lang},
                      lang => $opts->{lang},
-                     title_tag => _( 'Debian Package Search Results' ),
+                     title_tag => _g( 'Debian Package Search Results' ),
                      print_title => 1,
                      print_search_field => 'packages',
                      search_field_values => { 
                      print_title => 1,
                      print_search_field => 'packages',
                      search_field_values => { 
@@ -226,21 +226,21 @@ sub print_packages {
 
     #my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
     my $str = '<div id="psearchres">';
 
     #my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
     my $str = '<div id="psearchres">';
-    $str .= "<p>".sprintf( _( "Found <em>%s</em> matching packages." ),
+    $str .= "<p>".sprintf( _g( "Found <em>%s</em> matching packages." ),
                           scalar @$pkgs_list )."</p>";
     #my $count = 0;
            
     my $have_exact;
     if (grep { $_ eq $keyword } @$pkgs_list) {
        $have_exact = 1;
                           scalar @$pkgs_list )."</p>";
     #my $count = 0;
            
     my $have_exact;
     if (grep { $_ eq $keyword } @$pkgs_list) {
        $have_exact = 1;
-       $str .= '<h2>'._( "Exact hits" ).'</h2>';
+       $str .= '<h2>'._g( "Exact hits" ).'</h2>';
        $str .= &$print_func( $keyword, $pkgs->{$keyword}||{},
                              map { $_->{$keyword}||{} } @func_args );
        @$pkgs_list = grep { $_ ne $keyword } @$pkgs_list;
     }
            
     if (@$pkgs_list && (($opts->{searchon} ne 'names') || !$opts->{exact})) {
        $str .= &$print_func( $keyword, $pkgs->{$keyword}||{},
                              map { $_->{$keyword}||{} } @func_args );
        @$pkgs_list = grep { $_ ne $keyword } @$pkgs_list;
     }
            
     if (@$pkgs_list && (($opts->{searchon} ne 'names') || !$opts->{exact})) {
-       $str .= '<h2>'._( 'Other hits' ).'</h2>'
+       $str .= '<h2>'._g( 'Other hits' ).'</h2>'
            if $have_exact;
        
        foreach my $pkg (@$pkgs_list) {
            if $have_exact;
        
        foreach my $pkg (@$pkgs_list) {
@@ -250,7 +250,7 @@ sub print_packages {
                                  map { $_->{$pkg}||{} } @func_args );
        }
     } elsif (@$pkgs_list) {
                                  map { $_->{$pkg}||{} } @func_args );
        }
     } elsif (@$pkgs_list) {
-       $str .= "<p>".sprintf( _( '<a href="%s">%s</a> results have not been displayed because you requested only exact matches.' ),
+       $str .= "<p>".sprintf( _g( '<a href="%s">%s</a> results have not been displayed because you requested only exact matches.' ),
                               encode_entities("$SEARCH_URL?exact=0&$opts->{common_params}"),
                               scalar @$pkgs_list )."</p>";
     }
                               encode_entities("$SEARCH_URL?exact=0&$opts->{common_params}"),
                               scalar @$pkgs_list )."</p>";
     }
@@ -262,7 +262,7 @@ sub print_packages {
 sub print_package {
     my ($pkg, $pkgs, $provided_by, $archives, $sect, $subsect, $desc) = @_;
 
 sub print_package {
     my ($pkg, $pkgs, $provided_by, $archives, $sect, $subsect, $desc) = @_;
 
-    my $str = '<h3>'.sprintf( _( 'Package %s' ), $pkg ).'</h3>';
+    my $str = '<h3>'.sprintf( _g( 'Package %s' ), $pkg ).'</h3>';
     $str .= '<ul>';
     foreach my $suite (@SUITES) {
        foreach my $archive (@ARCHIVES) {
     $str .= '<ul>';
     foreach my $suite (@SUITES) {
        foreach my $archive (@ARCHIVES) {
@@ -293,14 +293,14 @@ sub print_package {
                    $archs_printed{$_}++ foreach @archs_to_print;
                }
                if (my $p =  $provided_by->{$suite}{$archive}) {
                    $archs_printed{$_}++ foreach @archs_to_print;
                }
                if (my $p =  $provided_by->{$suite}{$archive}) {
-                   $str .= '<br>'._( 'also provided by: ' ).
+                   $str .= '<br>'._g( 'also provided by: ' ).
                        join( ', ', map { "<a href=\"$ROOT/$path/$_\">$_</a>"  } @$p);
                }
                $str .= "</li>\n";
            } elsif (my $p =  $provided_by->{$suite}{$archive}) {
                $str .= sprintf( "<li><a href=\"$ROOT/%s/%s\">%s</a>: Virtual package<br>",
                                 $path, $pkg, $path );
                        join( ', ', map { "<a href=\"$ROOT/$path/$_\">$_</a>"  } @$p);
                }
                $str .= "</li>\n";
            } elsif (my $p =  $provided_by->{$suite}{$archive}) {
                $str .= sprintf( "<li><a href=\"$ROOT/%s/%s\">%s</a>: Virtual package<br>",
                                 $path, $pkg, $path );
-               $str .= _( 'provided by: ' ).
+               $str .= _g( 'provided by: ' ).
                    join( ', ', map { "<a href=\"$ROOT/$path/$_\">$_</a>"  } @$p);
            }
        }
                    join( ', ', map { "<a href=\"$ROOT/$path/$_\">$_</a>"  } @$p);
            }
        }
@@ -312,7 +312,7 @@ sub print_package {
 sub print_src_package {
     my ($pkg, $pkgs, $archives, $sect, $subsect, $binaries) = @_;
 
 sub print_src_package {
     my ($pkg, $pkgs, $archives, $sect, $subsect, $binaries) = @_;
 
-    my $str = '<h3>'.sprintf( _( 'Source package %s' ), $pkg ).'</h3>';
+    my $str = '<h3>'.sprintf( _g( 'Source package %s' ), $pkg ).'</h3>';
     $str .= "<ul>\n";
     foreach my $suite (@SUITES) {
        foreach my $archive (@ARCHIVES) {
     $str .= "<ul>\n";
     foreach my $suite (@SUITES) {
        foreach my $archive (@ARCHIVES) {
@@ -328,7 +328,7 @@ sub print_src_package {
                                 $suite.(($archive ne 'us')?"/$archive":''), $pkg, $suite.(($archive ne 'us')?"/$archive":''), $subsect->{$suite}{$archive}{source},
                                 $pkgs->{$suite}{$archive}, $origin_str );
                
                                 $suite.(($archive ne 'us')?"/$archive":''), $pkg, $suite.(($archive ne 'us')?"/$archive":''), $subsect->{$suite}{$archive}{source},
                                 $pkgs->{$suite}{$archive}, $origin_str );
                
-               $str .= "<br>"._( 'Binary packages: ' );
+               $str .= "<br>"._g( 'Binary packages: ' );
                my @bp_links;
                foreach my $bp (@{$binaries->{$suite}{$archive}}) {
                    my $bp_link = sprintf( "<a href=\"$ROOT/%s/%s\">%s</a>",
                my @bp_links;
                foreach my $bp (@{$binaries->{$suite}{$archive}}) {
                    my $bp_link = sprintf( "<a href=\"$ROOT/%s/%s\">%s</a>",
index 0f97b83da0840268f02a6395499341171ec3d7c6..3070f1b85f7f0de6feee0c1559f4304c5d36c516 100644 (file)
@@ -27,13 +27,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,8 +68,8 @@ 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) {
        } else {
            my %all_suites;
            foreach (@results, @non_results) {
@@ -93,7 +93,7 @@ sub do_show {
            $$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) {
@@ -151,37 +151,37 @@ sub do_show {
 #          $long_desc = conv_desc( $lang, $long_desc );
 #          $short_desc = conv_desc( $lang, $short_desc );
 
 #          $long_desc = conv_desc( $lang, $long_desc );
 #          $short_desc = conv_desc( $lang, $short_desc );
 
-                       $$menu .= simple_menu( [ _( "Distribution:" ),
-                                                _( "Overview over this suite" ),
+                       $$menu .= simple_menu( [ _g( "Distribution:" ),
+                                                _g( "Overview over this suite" ),
                                                 "$ROOT/$suite/",
                                                 $suite ],
                                                 "$ROOT/$suite/",
                                                 $suite ],
-                                              [ _( "Section:" ),
-                                                _( "All packages in this section" ),
+                                              [ _g( "Section:" ),
+                                                _g( "All packages in this section" ),
                                                 "$ROOT/$suite/$subsection/",
                                                 $subsection ],
                                               );
 
                                                 "$ROOT/$suite/$subsection/",
                                                 $subsection ],
                                               );
 
-                       my $title .= sprintf( _( "Package: %s (%s)" ), $pkg, $v_str );
+                       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" 
+                       $package_page .= "<h2>"._g( "Versions:" )." $v_str_arch</h2>\n" 
                            unless $version eq $v_str;
                        if (my $provided_by = $page->{provided_by}) {
                            unless $version eq $v_str;
                        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=\"$ROOT/$suite/$_\">$_</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 +202,14 @@ 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 );
+                           $package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
                            if ($suite eq "experimental") {
                            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/" ) );
+                               note( sprintf( _g( '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 .= 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,22 +220,22 @@ 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><th>"._g("Files")."</th><th>"._g( "Package Size")."</th><th>"._g("Installed Size")."</th></tr>\n";
                        foreach my $a ( @archs ) {
                            $package_page .= "<tr>\n";
                            $package_page .=  "<th><a href=\"$ROOT/$suite/$encodedpkg/$a/download";
                            $package_page .=  "\">$a</a></th>\n";
                            $package_page .= "<td>";
                            if ( $suite ne "experimental" ) {
                        foreach my $a ( @archs ) {
                            $package_page .= "<tr>\n";
                            $package_page .=  "<th><a href=\"$ROOT/$suite/$encodedpkg/$a/download";
                            $package_page .=  "\">$a</a></th>\n";
                            $package_page .= "<td>";
                            if ( $suite ne "experimental" ) {
-                               $package_page .= sprintf( "[<a href=\"%s\">"._( "list of files" )."</a>]\n",
+                               $package_page .= sprintf( "[<a href=\"%s\">"._g( "list of files" )."</a>]\n",
                                                          "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg );
                            } else {
                                                          "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg );
                            } 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 .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . "&nbsp;kB";
@@ -256,26 +256,26 @@ 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" ),
+                       $$menu .= simple_menu( [ _g( "Distribution:" ),
+                                                _g( "Overview over this distribution" ),
                                                 "$ROOT/",
                                                 $suite ],
                                                 "$ROOT/",
                                                 $suite ],
-                                              [ _( "Section:" ),
-                                                _( "All packages in this section" ),
+                                              [ _g( "Section:" ),
+                                                _g( "All packages in this section" ),
                                                 "$ROOT/$suite/virtual/",
                                                 
                                                 'virtual' ], );
 
                                                 "$ROOT/$suite/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');
 
                        my $provided_by = $page->{provided_by};
                        $package_page .= pkg_list( \%packages, $opts, $provided_by, 'en');
 
@@ -301,17 +301,17 @@ sub do_show {
                    $section = $page->get_newest( 'section' );
                    $subsection = $page->get_newest( 'subsection' );
 
                    $section = $page->get_newest( 'section' );
                    $subsection = $page->get_newest( 'subsection' );
 
-                   $$menu .= simple_menu( [ _( "Distribution:" ),
-                                            _( "Overview over this suite" ),
+                   $$menu .= simple_menu( [ _g( "Distribution:" ),
+                                            _g( "Overview over this suite" ),
                                             "/$suite/",
                                             $suite ],
                                             "/$suite/",
                                             $suite ],
-                                          [ _( "Section:" ),
-                                            _( "All packages in this section" ),
+                                          [ _g( "Section:" ),
+                                            _g( "All packages in this section" ),
                                             "/$suite/$subsection/",
                                             $subsection ],
                                           );
                    
                                             "/$suite/$subsection/",
                                             $subsection ],
                                           );
                    
-                   my $title .= sprintf( _( "Source Package: %s (%s)" ),
+                   my $title .= sprintf( _g( "Source Package: %s (%s)" ),
                                          $pkg, $v_str );
                    $title .=  " ".marker( $archive ) if $archive ne 'us';
                    $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
                                          $pkg, $v_str );
                    $title .=  " ".marker( $archive ) if $archive ne 'us';
                    $title .=  " ".marker( $subsection ) if $subsection eq 'non-US'
@@ -320,20 +320,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 +351,14 @@ 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 );
+                       $package_page .= sprintf( "<h2>"._g( "Other Packages Related to %s" )."</h2>\n", $pkg );
                        if ($suite eq "experimental") {
                        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/" ) );
+                           note( sprintf( _g( '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 .= 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,17 +369,17 @@ 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+/, $_;
                    foreach( @$source_files ) {
                        my ($src_file_md5, $src_file_size, $src_file_name)
                            = split /\s+/, $_;
@@ -424,11 +424,11 @@ sub do_show {
 #    debug( "Final page object:\n".Dumper($page), 3 );
 
     my $title = $opts->{source} ?
 #    debug( "Final page object:\n".Dumper($page), 3 );
 
     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,