X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoIndex.pm;h=e1c5b6d3667ef650ace6d0ead1b2231684128259;hb=4fec9449ddf3d2a6162c05387367746f3e17e329;hp=164e594884d5c35021aeb55741af60f410d1ab1d;hpb=92a6b3d4b5bcd96dfe05ee814722e5e0e47e1d3f;p=deb%2Fpackages.git diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index 164e594..e1c5b6d 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -8,7 +8,6 @@ use Exporter; use Deb::Versions; use Packages::Config qw( $TOPDIR ); -use Packages::I18N::Locale; use Packages::CGI; our @ISA = qw( Exporter ); @@ -40,6 +39,9 @@ sub send_file { "@{$opts->{suite}}" ) ); } + if ($opts->{format} eq 'txt.gz') { + $opts->{po_lang} = 'en'; + } my $wwwdir = "$TOPDIR/www"; my $path = ""; $path .= "source/" if $opts->{source}; @@ -47,12 +49,7 @@ sub send_file { $path .= "$opts->{archive}[0]/" if @{$opts->{archive}} == 1; $path .= "$opts->{subsection}[0]/" if @{$opts->{subsection}}; $path .= "$opts->{priority}[0]/" if @{$opts->{priority}}; - - #FIXME: ugly hack - if ($opts->{lang} ne 'en' and !-f "$wwwdir/$path$file.$opts->{lang}.$opts->{format}") { - $opts->{lang} = 'en'; - } - $path .= "$file.$opts->{lang}.$opts->{format}"; + $path .= "$file.$opts->{po_lang}.$opts->{format}"; unless (@Packages::CGI::fatal_errors) { my $buffer;