X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoIndex.pm;h=e1c5b6d3667ef650ace6d0ead1b2231684128259;hb=f12ba374c31cd6192475847bd0549297a4c968de;hp=a0cae2baf2f435cff7fa59f1f698d1d2ee19894c;hpb=58039945e72bbba9d7395e78df27f028479f00d3;p=deb%2Fpackages.git diff --git a/lib/Packages/DoIndex.pm b/lib/Packages/DoIndex.pm index a0cae2b..e1c5b6d 100644 --- a/lib/Packages/DoIndex.pm +++ b/lib/Packages/DoIndex.pm @@ -39,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}; @@ -46,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;