# $Id: swedish.cf, v1.0 2002/12/16 by Anders Wandahl translated from # german.cf,v 1.01 2002/09/05 by Harald Weinreich # # Swedish language modifications for modern.cf output definition file. # # A hash (#) in the first column denotes a comment and is not processed # even inside a definition. Hashes not in the first column are left as-is. # # Variable substitution occurs on these definitions. If you want # a dollar-sign ($) to occur in the output, escape it with backslash (\). # Other metacharacters (quotes, asterisks, etc) probably don't need to be # escaped. Printf-like special characters are allowed: \n \t \r etc. # # The ending newline is chopped off from each definiton. So # # # abcxyz # # # becomes "abcxyz". You may have blank lines in between the beginning # and ending tags, or use the newline character \n. # # # CGI defaults are set in modern.cf charset : ISO-8859-1 ############################################################################## # RESULT SECTION # # The output of '{nph-}search.cgi' consists of the following tags: # # ResultHeader - modified # CreateNavBars # ResultSetBegin # ( Errors from 'broker' ) # foreach object { # PrintObject # } # ResultSetEnd # EndBrokerResults # ( TruncateWarning ) # ResultTrailer # # ############################################################################## # First output for the HTML containing the results. Should probably include # tag and the user query. # <ResultHeader> <HEAD> <TITLE>Sökresultat för: $html_query

Sökresultat för: $html_query

$filterhint # Calculations to obtain $navigationBar # Original code by Javier Masa Marin # if ($totalPages > 0) { # elements before and after current page in navigation bar local($navPart) = 5; $prevPage = ""; $prevPage = "\n\n<= Föregående ·" if ($page > 1); $nextPage = ""; $nextPage = "· Nästa =>" if ($page < $totalPages); $pageList = ""; local($startP) = ($page <= $navPart) ? 1 : $page - $navPart; for ($i = $startP; $i < $page; $i++) { $pageList .= "$i\n"; } $pageList .= "$page\n"; local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart; for ($i = $page+1; $i <= $endP; $i++) { $pageList .= "\n$i\n"; } $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1); } # Output just before beginning the loop over objects returned by the broker. #
\n
$totnumber objekt funna $navigationBar Sida: $page/$totalPages
# # # # # Ny sökning:
\n # output just after ending the loop over objects returned by the broker #
# # # # # Ny sökning: $navigationBar Powered by Harvest
# PER-OBJECT DEFINITIONS # ====================== # # VARIABLES: # # $url Object url: http://www.cia.gov:3333/Spies/KGB/secret.html # $A URL Access: http # $H URL Host : www.cia.gov:3333 # $P URL Path : /Spies/KGB/secret.html # $D URL Dir : /Spies/KGB/ # $F URL File : secret.html # $cs_url URL to the SOIF object in the broker databse # $cs_[ahp] elements of $cs_url as above with $url # $desc Description attribute of the matched object # $opaque A matched line (or all matched lines in obj-at-a-time mode) # $usermsg A user message # $attributes Requested attributes # $objectType Type of object if not HTML # $objectSize Size of object # $objectDate Last modification date of object # # PerObjectFunction is eval'd before every object is printed out. # # init output variables $objectType=""; $objectSize=""; $objectUpdate=""; $objectWeight = ""; $opaquePerObjectCount = 1; $lastOpaqueObject = ""; # create description $description = "Datum:  $F"; $description = $desc if (length($desc) > 5); # highlight search words. for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/$1<\/b>/ig; } # Create the HTML code to print the weight balls if ($maxWeight > 0 && $weightflag) { $nWeight = int($weight * 5 / $maxWeight); for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++) { $objectWeight .= "\"*\""; } # $objectWeight = "".int($weight * 100 / $maxWeight)."%"; } # format matched lines if ($opaque ne '') { $opaque = "Träffar: $opaque..." } # PerAttributeFunction is eval'd before the Attributes are printed out. # # Remove all empty lines $val =~ s/^(\s*)//mg; # Now prepare the object's type and size to display at the description. if ($att eq "type") { ## show file type $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/); $att=""; # avoid } elsif ($att eq "file-size") { ## calculate file size $val = int($val/1024); $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte $val = int($val/10.24); $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg $att=""; } elsif ($att eq "last-modification-time") { ## calculate last modification date local(@date,@months,$month,$minute,$year); @date = localtime($val); @months = ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'); $month = $months[$date[4]]; $minute = $date[1]; $minute = "0$minute" if $minute < 10; $year = $date[5]+1900; $objectUpdate = "$date[3]. $month $year"; # $date[2]:$minute"; $att=""; } else { ## other attributes # insert commas to separate headings $val =~ s/\n(.)/, $1/mg; # If more than 120 Characters, display only the first 120 plus "..." $val =~ s/^((.|\n){120})(.|\n)*/$1.../; #highlight search words. for ($i=0; $i<=$#searchwords; $i++) { $val =~ s/(\b$searchwords[$i]\b)/$1<\/font>/ig; } $att =~ s/headings/Rubriker/; } # ====================================================================== # ERROR, STATUS and WARNING functions # ====================================================================== # A warning message printed only when the broker might have truncated # the result set. Only printed if the number of matched lines equals # the 'maxresultflag' or the number of returned objects equals the # 'maxobjflag' value of the query.html form. #

VARNING: Sökresultatet avbröts vid $nopaquelines matchade rader och $nreturned funna objekt.

\n # A warning message printed only when the broker returned 0 results. #

Din fråga $html_query resulterade inte i några träffar.

Försök formulera om frågan.

Förslag:

  • Kontrollera att alla ord är rätt stavade.
  • Gör om sökningen med andra, färre eller allmännare sökbegrepp.
  • Välj sök del av ord på söksidan för att även söka inom ord.
  • Välj att tillåta stavfel på söksidan.

Se vidare den engelskspråkiga hjälpen till hur man formulerar frågor.

\n # Error Message returned if there is no query string sent. #

Du har inte angivit någon sökfråga.

Skriv in minst ett ord.

\n # Error message if broker is not available. # # #

Sökmaskinen $host, port $port är för närvarande inte tillgänglig.

Var god försök senare.

# Message returned if the broker sends back a # 111 - Broker is too heavily loaded # reply. #

Sö:kmaskinen är överbelastad.

Vi beklagar, men sökmasminen $host, port $port är för närvarande överbelastad. Fösök senare.

# Message returned if the broker sends back a # 111 - PARSE ERROR # reply. #

Din sökfråga $html_query har inte rätt syntax.

Den engelska hjälpen visar hur en sökfråga med korrekt syntax skall formuleras.

Problem vid sökningar har oftast föjande orsaker:

  • Anföringstecken (citationstecken) har inte använts vid sökning på fraser eller reguljära uttryck.
    T. ex. skall frasen:
    resistent mot antibiotika anges som
    "resistent mot antibiotika".
  • Det reguljära uttrycket:
    resist.* mot antibio.* skall anges som
    "resist.* mot antibio.*"
  • Notera att en punkt i ett sökbegrepp alltid måste omges av anföringstecken (t. ex. "3.14").

  • Felaktig formulering vid sökning på attribut..
    Strukturerade frågor sker med kolon (:), t. ex.
    Author: Berglund
\n