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) {
- 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 {
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 );
}
@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)
&{"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 => {
- keywords => _('search for a package'),
+ keywords => _g('search for a package'),
searchon => 'default',
arch => 'any',
suite => 'all',
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}) {
- fatal_error( _( "suite not valid or not specified" ) );
+ fatal_error( _g( "suite not valid or not specified" ) );
}
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) {
- 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) {
- 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 };
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) {
}
}
- %$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') {
- $$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 {
- $$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' ) {
- $$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 {
- $$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>";
- $$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') {
- $$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( _( "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 .= '<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') {
- $$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 .= '<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') {
- $$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 );
- $$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">';
- $$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 .= print_links( _( "Australia and New Zealand" ), $file,
+ $$page_content .= print_links( _g( "Australia and New Zealand" ), $file,
@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 .= '<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 );
- $$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 .= '<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">';
- $$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 .= print_links( _( "Europe" ), $file, @european_sites );
+ $$page_content .= print_links( _g( "Europe" ), $file, @european_sites );
$$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 .= print_links( _( "Asia" ), $file, @asian_sites );
+ $$page_content .= print_links( _g( "Asia" ), $file, @asian_sites );
$$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 .= '<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;
}
}
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}) {
- fatal_error( _( "suite not valid or not specified" ) );
+ fatal_error( _g( "suite not valid or not specified" ) );
}
if ($params->{errors}{arch}) {
- fatal_error( _( "architecture not valid or not specified" ) );
+ fatal_error( _g( "architecture not valid or not specified" ) );
}
$$menu = '';
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,
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 = "";
$$page_content .= '</pre></div>';
}
} else {
- fatal_error( _( "Invalid suite/architecture combination" ) );
+ fatal_error( _g( "Invalid suite/architecture combination" ) );
}
}
}
$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) {
- 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 = "";
}
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) {
- error( _( "Can't find that package." ) );
+ error( _g( "Can't find that package." ) );
} 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 ) );
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 {
- 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}) {
- 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}") ) );
}
}
- 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},
- title_tag => _( 'Debian Package Search Results' ),
+ title_tag => _g( 'Debian Package Search Results' ),
print_title => 1,
print_search_field => 'packages',
search_field_values => {
#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;
- $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 .= '<h2>'._( 'Other hits' ).'</h2>'
+ $str .= '<h2>'._g( 'Other hits' ).'</h2>'
if $have_exact;
foreach my $pkg (@$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>";
}
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) {
$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 );
- $str .= _( 'provided by: ' ).
+ $str .= _g( 'provided by: ' ).
join( ', ', map { "<a href=\"$ROOT/$path/$_\">$_</a>" } @$p);
}
}
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) {
$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 ($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}) {
- fatal_error( _( "suite not valid or not specified" ) );
+ fatal_error( _g( "suite not valid or not specified" ) );
}
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};
}
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) {
$$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) {
# $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 ],
- [ _( "Section:" ),
- _( "All packages in this section" ),
+ [ _g( "Section:" ),
+ _g( "All packages in this section" ),
"$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 );
- $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}) {
- 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") {
- 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") {
- 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 );
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") {
- 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";
#
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 ) ;
- $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 .= "<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" ) {
- $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 {
- $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 . " kB";
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 ],
- [ _( "Section:" ),
- _( "All packages in this section" ),
+ [ _g( "Section:" ),
+ _g( "All packages in this section" ),
"$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/';
- 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 ));
- $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');
$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 ],
- [ _( "Section:" ),
- _( "All packages in this section" ),
+ [ _g( "Section:" ),
+ _g( "All packages in this section" ),
"/$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'
$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") {
- 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">';
- $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 -->';
}
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") {
- 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;
# 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' );
- $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>",
- _("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+/, $_;
# 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} ?
- _( "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,