wok-6.x rev 3244

mirror-tools/search.cgi: auto select language
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 30 14:35:26 2009 +0200 (2009-05-30)
parents 0193bd5b5e89
children 9a5054d0078e
files mirror-tools/stuff/var/www/pkgs/search.cgi
line diff
     1.1 --- a/mirror-tools/stuff/var/www/pkgs/search.cgi	Sat May 30 12:44:33 2009 +0000
     1.2 +++ b/mirror-tools/stuff/var/www/pkgs/search.cgi	Sat May 30 14:35:26 2009 +0200
     1.3 @@ -63,6 +63,16 @@
     1.4  # unescape query
     1.5  SEARCH="$(echo $SEARCH | sed 's/%2B/+/g' | sed 's/%3A/:/g' | sed 's|%2F|/|g')"
     1.6  
     1.7 +if [ -z "$LANG" ]; then
     1.8 +	for i in $(echo $HTTP_ACCEPT_LANGUAGE | sed 's/[,;]/ /g'); do
     1.9 +		case "$i" in
    1.10 +		fr|de|pt|cn)
    1.11 +			LANG=$i
    1.12 +			break;;
    1.13 +		esac
    1.14 +	done
    1.15 +fi
    1.16 +
    1.17  package="Package"
    1.18  file="File"
    1.19  desc="Description"
    1.20 @@ -89,6 +99,7 @@
    1.21  	file="Fichier";;
    1.22  de)	package="Paket"
    1.23  	depends="Abhängigkeiten"
    1.24 +	desc="Beschreibung"
    1.25  	search="Suche"
    1.26  	cooking="Cooking"
    1.27  	stable="Stable"
    1.28 @@ -107,6 +118,7 @@
    1.29      deptree="Árvore de dependências para: $SEARCH"
    1.30      rdeptree="Árvore de dependências reversa para: $SEARCH"
    1.31  	depends="Dependências"
    1.32 +	desc="Descrição"
    1.33  	file_list="Arquivo lista"
    1.34  	file="Arquivo";;
    1.35  cn)	package="软件包:"
    1.36 @@ -166,7 +178,7 @@
    1.37  	<meta name="revisit-after" content="7 days" />
    1.38  	<meta name="expires" content="never" />
    1.39  	<meta name="modified" content="$DATE" />
    1.40 -	<meta name="author" content="ash, grep, sed and cat"/>
    1.41 +	<meta name="author" content="ash, awk, grep, sed and cat"/>
    1.42  	<meta name="publisher" content="www.slitaz.org" />
    1.43  	<link rel="shortcut icon" href="http://pkgs.slitaz.org/favicon.ico" />
    1.44  	<link rel="stylesheet"  type="text/css" href="http://pkgs.slitaz.org/slitaz.css" />