X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoShow.pm;h=3070f1b85f7f0de6feee0c1559f4304c5d36c516;hb=3bb6c9d9922b0487901c02962b1d64c525f1bdd7;hp=0f97b83da0840268f02a6395499341171ec3d7c6;hpb=23a126961b15aa754f672762f750a1792250aa36;p=deb%2Fpackages.git diff --git a/lib/Packages/DoShow.pm b/lib/Packages/DoShow.pm index 0f97b83..3070f1b 100644 --- a/lib/Packages/DoShow.pm +++ b/lib/Packages/DoShow.pm @@ -27,13 +27,13 @@ sub do_show { 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}; @@ -68,8 +68,8 @@ sub do_show { } unless (@results || @non_results ) { - fatal_error( _( "No such package." )."
". - sprintf( _( 'Search for the package' ), "$SEARCH_URL/$pkg" ) ); + fatal_error( _g( "No such package." )."
". + sprintf( _g( 'Search for the package' ), "$SEARCH_URL/$pkg" ) ); } else { my %all_suites; foreach (@results, @non_results) { @@ -93,7 +93,7 @@ sub do_show { $$menu .= '
'; 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) { @@ -151,37 +151,37 @@ sub do_show { # $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 .= "

"._( "Versions:" )." $v_str_arch

\n" + $package_page .= "

"._g( "Versions:" )." $v_str_arch

\n" unless $version eq $v_str; if (my $provided_by = $page->{provided_by}) { - note( _( "This is also a virtual package provided by ").join( ', ', map { "$_" } @$provided_by) ); + note( _g( "This is also a virtual package provided by ").join( ', ', map { "$_" } @$provided_by) ); } if ($suite eq "experimental") { - note( _( "Experimental package"), - _( "Warning: This package is from the experimental 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.")."

" + note( _g( "Experimental package"), + _g( "Warning: This package is from the experimental 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.")."

" ); } if ($subsection eq "debian-installer") { - note( _( "debian-installer udeb package"), - _( 'Warning: This package is intended for the use in building debian-installer 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 debian-installer images only. Do not install it on a normal Debian system.' ) ); } $package_page .= pdesc( $short_desc, $long_desc ); @@ -202,14 +202,14 @@ sub do_show { if ( $dep_list ) { $package_page .= "
\n"; - $package_page .= sprintf( "

"._( "Other Packages Related to %s" )."

\n", $pkg ); + $package_page .= sprintf( "

"._g( "Other Packages Related to %s" )."

\n", $pkg ); if ($suite eq "experimental") { - note( sprintf( _( 'Note that the experimental distribution is not self-contained; missing dependencies are likely found in the unstable distribution.' ), "$ROOT/unstable/" ) ); + note( sprintf( _g( 'Note that the experimental distribution is not self-contained; missing dependencies are likely found in the unstable 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 .= "
\n"; @@ -220,22 +220,22 @@ sub do_show { # my $encodedpack = uri_escape( $pkg ); $package_page .= "
"; - $package_page .= sprintf( "

"._( "Download %s\n" )."

", + $package_page .= sprintf( "

"._g( "Download %s\n" )."

", $pkg ) ; - $package_page .= "\n"; - $package_page .= "\n"; + $package_page .= "
"._("Download for all available architectures")."
\n"; + $package_page .= "\n"; $package_page .= "\n"; - $package_page .= "\n"; + $package_page .= "\n"; foreach my $a ( @archs ) { $package_page .= "\n"; $package_page .= "\n"; $package_page .= "
"._g("Download for all available architectures")."
"._("Architecture").""._("Files").""._( "Package Size").""._("Installed Size")."
"._g("Architecture").""._g("Files").""._g( "Package Size").""._g("Installed Size")."
$a"; if ( $suite ne "experimental" ) { - $package_page .= sprintf( "["._( "list of files" )."]\n", + $package_page .= sprintf( "["._g( "list of files" )."]\n", "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg ); } else { - $package_page .= _( "no current information" ); + $package_page .= _g( "no current information" ); } $package_page .= ''; $package_page .= floor(($sizes_deb->{$a}/102.4)+0.5)/10 . " kB"; @@ -256,26 +256,26 @@ sub do_show { 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 virtual package. See the Debian policy for a definition of virtual packages.' ), + note( sprintf( _g( 'This is a virtual package. See the Debian policy for a definition of virtual packages.' ), $policy_url, $policy_url )); - $package_page .= sprintf( "

"._( "Packages providing %s" )."

", $pkg ); + $package_page .= sprintf( "

"._g( "Packages providing %s" )."

", $pkg ); 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' ); - $$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' @@ -320,20 +320,20 @@ sub do_show { $package_page .= title( $title ); if ($suite eq "experimental") { - note( _( "Experimental package"), - _( "Warning: This package is from the experimental 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.")."

" + note( _g( "Experimental package"), + _g( "Warning: This package is from the experimental 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.")."

" ); } if ($subsection eq "debian-installer") { - note( _( "debian-installer udeb package"), - _( 'Warning: This package is intended for the use in building debian-installer 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 debian-installer images only. Do not install it on a normal Debian system.' ) ); } my $binaries = find_binaries( $pkg, $archive, $suite, \%src2bin ); if ($binaries && @$binaries) { $package_page .= '
'; - $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 .= '
'; } @@ -351,14 +351,14 @@ sub do_show { if ( $dep_list ) { $package_page .= "
\n"; - $package_page .= sprintf( "

"._( "Other Packages Related to %s" )."

\n", $pkg ); + $package_page .= sprintf( "

"._g( "Other Packages Related to %s" )."

\n", $pkg ); if ($suite eq "experimental") { - note( sprintf( _( 'Note that the experimental distribution is not self-contained; missing dependencies are likely found in the unstable distribution.' ), "$ROOT/unstable/" ) ); + note( sprintf( _g( 'Note that the experimental distribution is not self-contained; missing dependencies are likely found in the unstable 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; @@ -369,17 +369,17 @@ sub do_show { # Source package download # $package_page .= "
\n"; - $package_page .= sprintf( "

"._( "Download %s" )."

\n", + $package_page .= sprintf( "

"._g( "Download %s" )."

\n", $pkg ) ; my $source_files = $page->get_src( 'files' ); my $source_dir = $page->get_src( 'directory' ); - $package_page .= sprintf( ''. + $package_page .= sprintf( '
'. "", - _("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+/, $_; @@ -424,11 +424,11 @@ sub do_show { # debug( "Final page object:\n".Dumper($page), 3 ); my $title = $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" ) ; 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,
%s%s%s