# RSS stuff
AddType application/rss+xml .rdf .xml
+
+ RemoveType .gz
+ AddEncoding x-gzip .gz
</Directory>
<VirtualHost *>
RewriteRule ^/src:([^/]+)$ /source/$1 [R,L,NE]
RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
+ RewriteCond %{QUERY_STRING} =""
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l [OR]
+ RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -d
+ RewriteRule . - [L]
+
RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
# In case we need to disable the site again
backports_ftpsite=http://backports.org/debian
amd64_ftpsite=http://amd64.debian.net/debian
gnuab_ftpsite=http://kfreebsd-gnu.debian.net/debian
+ddtp_ftpsite=http://ddtp.debian.net/debian
root=""
# Architectures
#
polangs="de fi nl fr uk"
-ddtplangs="de cs da eo es fi fr hu it ja nl pl pt_BR pt_PT ru sk sv_SE uk"
+ddtplangs="ca cs da de eo es fi fr go hu it ja km_KH ko nl pl pt pt_BR ru sk sv uk zh zh_CN zh_TW"
archives="us security amd64 gnuab backports volatile"
sections="main contrib non-free"
parts="$sections"
test -d ${archivedir} || mkdir -p ${archivedir}
cd ${archivedir}
-if [ -z "${localdir}" ]
+if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ]
then
- echo using remote mirror
+ if [ -z "$ddtp_ftpsite" ]
+ then
+ ddtp_ftpsite="$ftpsite"
+ fi
+ echo using remote mirror $ddtp_ftpsite
for dist in sid
do
for part in main
do
echo retrieve translated Descs $dist/$part/$lang
(cd us/${dist}/${part}/i18n &&
- wget -q -N ${ftpsite}/dists/${dist}/${part}/i18n/Translations-$lang.gz)
+ wget -q -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$lang.gz)
done
done
done
date
./bin/parse-sources
date
-./bin/parse-contents
-date
./bin/parse-translations
date
+./bin/parse-contents
+date
debug => ( DEBUG ? $opts{debug} : 0 ) },
( $CACHEDIR ? { COMPILE_DIR => $CACHEDIR } : {} ) );
- unless (-e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
+ #FIXME: ugly hack
+ unless (($what_to_do eq 'allpackages' and $opts{format} =~ /^(html|txt\.gz)/)
+ || -e "$TEMPLATEDIR/$opts{format}/${what_to_do}.tmpl") {
fatal_error( "requested format not available for this document",
"406 requested format not available");
}
$path .= "$opts->{priority}[0]/" if @{$opts->{priority}};
# we don't have translated index pages for subsections yet
$opts->{lang} = 'en' if @{$opts->{subsection}} or $file eq 'allpackages';
- $path .= "$file.$opts->{lang}.$opts->{format}";
+
+ #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}";
unless (@Packages::CGI::fatal_errors) {
my $buffer;
$headers{'-charset'} = get_charset( $opts->{lang} );
$headers{'-type'} = get_mime( $opts->{format}, 'text/plain' );
$headers{'-content-encoding'} = $encoding{$opts->{format}} if exists $encoding{$opts->{format}};
+ my ($size,$mtime) = (stat("$wwwdir/$path"))[7,9];
+ $headers{'-content-length'} = $size;
+ $headers{'-last-modified'} = gmtime($mtime);
print header( %headers );
binmode INDEX;
<!--UdmComment-->
<p>This page is also available in the following languages:</p>
<p class="navpara">
-[% FOREACH langs %]
-<a href="[% "$page_name?lang=$lang" %]" title="[% tooltip %]" hreflang="[% lang %]" lang="[% lang %]" rel="alternate">[% selfname %]
-[%- IF transliteration %] ([% transliteration %])[% END %]</a>
+[% FOREACH l IN langs %]
+<a href="[% "$page_name?lang=$l.lang" %]" title="[% l.tooltip %]" hreflang="[% l.lang %]" lang="[% l.lang %]" rel="alternate">[% l.selfname %]
+[%- IF l.transliteration %] ([% l.transliteration %])[% END %]</a>
[% END %]
</p>
<p>How to set <a href="[% cn_help_url %]">the default document language</a></p>