From b2d73bee5e123c5e69352a447d4bc318132612d9 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 8 Nov 2012 13:39:13 -0800 Subject: Imported Upstream version 1.77.1 --- webhelp/template/content/search/default.props | 1 + webhelp/template/content/search/en-us.props | 45 ++ webhelp/template/content/search/es-es.props | 179 +++++ webhelp/template/content/search/ja-jp.props | 1 + webhelp/template/content/search/nwSearchFnt.js | 881 +++++++++++++++++++++ webhelp/template/content/search/punctuation.props | 31 + .../template/content/search/stemmers/de_stemmer.js | 247 ++++++ .../template/content/search/stemmers/en_stemmer.js | 234 ++++++ .../template/content/search/stemmers/fr_stemmer.js | 299 +++++++ 9 files changed, 1918 insertions(+) create mode 100644 webhelp/template/content/search/default.props create mode 100644 webhelp/template/content/search/en-us.props create mode 100644 webhelp/template/content/search/es-es.props create mode 100644 webhelp/template/content/search/ja-jp.props create mode 100644 webhelp/template/content/search/nwSearchFnt.js create mode 100644 webhelp/template/content/search/punctuation.props create mode 100644 webhelp/template/content/search/stemmers/de_stemmer.js create mode 100644 webhelp/template/content/search/stemmers/en_stemmer.js create mode 100644 webhelp/template/content/search/stemmers/fr_stemmer.js (limited to 'webhelp/template/content') diff --git a/webhelp/template/content/search/default.props b/webhelp/template/content/search/default.props new file mode 100644 index 0000000..22edf43 --- /dev/null +++ b/webhelp/template/content/search/default.props @@ -0,0 +1 @@ +DEF01=a \ No newline at end of file diff --git a/webhelp/template/content/search/en-us.props b/webhelp/template/content/search/en-us.props new file mode 100644 index 0000000..da284ce --- /dev/null +++ b/webhelp/template/content/search/en-us.props @@ -0,0 +1,45 @@ +DEF01=this +DEF02=is +DEF03=the +DEF04=in +DEF05=i +DEF06=on +DEF07=a +DEF08=about +DEF09=an +DEF10=are +DEF11=as +DEF12=at +DEF13=be +DEF14=by +DEF15=com +DEF16=de +DEF17=en +DEF18=for +DEF19=from +DEF20=how +DEF21=it +DEF22=la +DEF23=of +DEF24=on +DEF25=or +DEF26=that +DEF27=to +DEF28=was +DEF29=what +DEF30=when +DEF31=where +DEF32=who +DEF33=will +DEF34=with +DEF35=und +DEF36=Next +DEF37=Prev +DEF38=Home +DEF39=Motive +DEF40=Inc +DEF41=Copyright +DEF42=All +DEF43=rights +DEF44=reserved +DEF45=Up \ No newline at end of file diff --git a/webhelp/template/content/search/es-es.props b/webhelp/template/content/search/es-es.props new file mode 100644 index 0000000..fb73bdc --- /dev/null +++ b/webhelp/template/content/search/es-es.props @@ -0,0 +1,179 @@ +DEF01=un +DEF02=una +DEF03=unas +DEF04=unos +DEF05=uno +DEF06=sobre +DEF07=todo +DEF08=también +DEF09=tras +DEF10=otro +DEF11=algún +DEF12=alguno +DEF13=alguna +DEF14=algunos +DEF15=algunas +DEF16=ser +DEF17=es +DEF18=soy +DEF19=eres +DEF20=somos +DEF21=sois +DEF22=estoy +DEF23=esta +DEF24=estamos +DEF25=estais +DEF26=estan +DEF27=como +DEF28=en +DEF29=para +DEF30=atras +DEF31=porque +DEF32=por +DEF33=estado +DEF34=estaba +DEF35=ante +DEF36=antes +DEF37=siendo +DEF38=ambos +DEF39=pero +DEF40=por +DEF41=poder +DEF42=puede +DEF43=puedo +DEF44=podemos +DEF45=podeis +DEF46=pueden +DEF47=fui +DEF48=fue +DEF49=fuimos +DEF50=fueron +DEF51=hacer +DEF52=hago +DEF53=hace +DEF54=hacemos +DEF55=haceis +DEF56=hacen +DEF57=cada +DEF58=fin +DEF59=incluso +DEF60=primero +DEF61=desde +DEF62=conseguir +DEF63=consigo +DEF64=consigue +DEF65=consigues +DEF66=conseguimos +DEF67=consiguen +DEF68=ir +DEF69=voy +DEF70=va +DEF71=vamos +DEF72=vais +DEF73=van +DEF74=vaya +DEF75=gueno +DEF76=ha +DEF77=tener +DEF78=tengo +DEF79=tiene +DEF80=tenemos +DEF81=teneis +DEF82=tienen +DEF83=el +DEF84=la +DEF85=lo +DEF86=las +DEF87=los +DEF88=su +DEF89=aqui +DEF90=mio +DEF91=tuyo +DEF92=ellos +DEF93=ellas +DEF94=nos +DEF95=nosotros +DEF96=vosotros +DEF97=vosotras +DEF98=si +DEF99=dentro +DEF100=solo +DEF101=solamente +DEF102=saber +DEF103=sabes +DEF104=sabe +DEF105=sabemos +DEF106=sabeis +DEF107=saben +DEF108=ultimo +DEF109=largo +DEF110=bastante +DEF111=haces +DEF112=muchos +DEF113=aquellos +DEF114=aquellas +DEF115=sus +DEF116=entonces +DEF117=tiempo +DEF118=verdad +DEF119=verdadero +DEF120=verdadera +DEF121=cierto +DEF122=ciertos +DEF123=cierta +DEF124=ciertas +DEF125=intentar +DEF126=intento +DEF127=intenta +DEF128=intentas +DEF129=intentamos +DEF130=intentais +DEF131=intentan +DEF132=dos +DEF133=bajo +DEF134=arriba +DEF135=encima +DEF136=usar +DEF137=uso +DEF138=usas +DEF139=usa +DEF140=usamos +DEF141=usais +DEF142=usan +DEF143=emplear +DEF144=empleo +DEF145=empleas +DEF146=emplean +DEF147=ampleamos +DEF148=empleais +DEF149=valor +DEF150=muy +DEF151=era +DEF152=eras +DEF153=eramos +DEF154=eran +DEF155=modo +DEF156=bien +DEF157=cual +DEF158=cuando +DEF159=donde +DEF160=mientras +DEF161=quien +DEF162=con +DEF163=entre +DEF164=sin +DEF165=trabajo +DEF166=trabajar +DEF167=trabajas +DEF168=trabaja +DEF169=trabajamos +DEF170=trabajais +DEF171=trabajan +DEF172=podria +DEF173=podrias +DEF174=podriamos +DEF175=podrian +DEF176=podriais +DEF177=yo +DEF178=aquel +DEF179=qué \ No newline at end of file diff --git a/webhelp/template/content/search/ja-jp.props b/webhelp/template/content/search/ja-jp.props new file mode 100644 index 0000000..2756805 --- /dev/null +++ b/webhelp/template/content/search/ja-jp.props @@ -0,0 +1 @@ +J01=\\u306B \ No newline at end of file diff --git a/webhelp/template/content/search/nwSearchFnt.js b/webhelp/template/content/search/nwSearchFnt.js new file mode 100644 index 0000000..45b7c28 --- /dev/null +++ b/webhelp/template/content/search/nwSearchFnt.js @@ -0,0 +1,881 @@ +/*---------------------------------------------------------------------------- + * JavaScript for webhelp search + *---------------------------------------------------------------------------- + This file is part of the webhelpsearch plugin for DocBook WebHelp + Copyright (c) 2007-2008 NexWave Solutions All Rights Reserved. + www.nexwave.biz Nadege Quaine + http://kasunbg.blogspot.com/ Kasun Gajasinghe + */ + +//string initialization +var htmlfileList = "htmlFileInfoList.js"; +var htmlfileinfoList = "htmlFileInfoList.js"; +var useCJKTokenizing = false; + +var w = new Object(); +var scoring = new Object(); + +var searchTextField = ''; +var no = 0; +var noWords = 0; +var partialSearch = "There is no page containing all the search terms.
Partial results:
"; +var warningMsg = '
'; +warningMsg+='Please note that due to security settings, Google Chrome does not highlight'; +warningMsg+=' the search results in the right frame.
'; +warningMsg+='This happens only when the WebHelp files are loaded from the local file system.
'; +warningMsg+='Workarounds:'; +warningMsg+='
'; +txt_filesfound = 'Results'; +txt_enter_at_least_1_char = "You must enter at least one character."; +txt_enter_more_than_10_words = "Only first 10 words will be processed."; +txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended."; +txt_please_wait = "Please wait. Search in progress..."; +txt_results_for = "Results for: "; + +/* This function verify the validity of search input by the user + Cette fonction verifie la validite de la recherche entrre par l utilisateur */ +function Verifie(searchForm) { + + // Check browser compatibility + if (navigator.userAgent.indexOf("Konquerer") > -1) { + + alert(txt_browser_not_supported); + return; + } + + searchTextField = trim(document.searchForm.textToSearch.value); + searchTextField = searchTextField.replace(/['"]/g,''); + var expressionInput = searchTextField; + $.cookie('textToSearch', expressionInput); + + if (expressionInput.length < 1) { + + // expression is invalid + alert(txt_enter_at_least_1_char); + // reactive la fenetre de search (utile car cadres) + + document.searchForm.textToSearch.focus(); + } + else { + var splitSpace = searchTextField.split(" "); + var splitWords = []; + for (var i = 0 ; i < splitSpace.length ; i++) { + var splitDot = splitSpace[i].split("."); + for (var i1 = 0; i1 < splitDot.length; i1++) { + var splitColon = splitDot[i1].split(":"); + for (var i2 = 0; i2 < splitColon.length; i2++) { + var splitDash = splitColon[i2].split("-"); + for (var i3 = 0; i3 < splitDash.length; i3++) { + if (splitDash[i3].split("").length > 0) { + splitWords.push(splitDash[i3]); + } + } + } + } + } + noWords = splitWords; + if (noWords.length > 9){ + // Allow to search maximum 10 words + alert(txt_enter_more_than_10_words); + expressionInput = ''; + for (var x = 0 ; x < 10 ; x++){ + expressionInput = expressionInput + " " + noWords[x]; + } + Effectuer_recherche(expressionInput); + document.searchForm.textToSearch.focus(); + } else { + // Effectuer la recherche + expressionInput = ''; + for (var x = 0 ; x < noWords.length ; x++) { + expressionInput = expressionInput + " " + noWords[x]; + } + Effectuer_recherche(expressionInput); + // reactive la fenetre de search (utile car cadres) + document.searchForm.textToSearch.focus(); + } + } +} + +var stemQueryMap = new Array(); // A hashtable which maps stems to query words + +/* This function parses the search expression, loads the indices and displays the results*/ +function Effectuer_recherche(expressionInput) { + + /* Display a waiting message */ + //DisplayWaitingMessage(); + + /*data initialisation*/ + var searchFor = ""; // expression en lowercase et sans les caracte res speciaux + //w = new Object(); // hashtable, key=word, value = list of the index of the html files + scriptLetterTab = new Scriptfirstchar(); // Array containing the first letter of each word to look for + var wordsList = new Array(); // Array with the words to look for + var finalWordsList = new Array(); // Array with the words to look for after removing spaces + var linkTab = new Array(); + var fileAndWordList = new Array(); + var txt_wordsnotfound = ""; + + + // -------------------------------------- + // Begin Thu's patch + /*nqu: expressionInput, la recherche est lower cased, plus remplacement des char speciaux*/ + //The original replacement expression is: + //searchFor = expressionInput.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/\.|%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, " 0){ + var searchedWords = noWords.length; + var foundedWords = fileAndWordList[0][0].motslisteDisplay.split(",").length; + //console.info("search : " + noWords.length + " found : " + fileAndWordList[0][0].motslisteDisplay.split(",").length); + if (searchedWords != foundedWords){ + linkTab.push(partialSearch); + } + } + + + for (var i = 0; i < cpt; i++) { + + var hundredProcent = fileAndWordList[i][0].scoring + 100 * fileAndWordList[i][0].motsnb; + var ttScore_first = fileAndWordList[i][0].scoring; + var numberOfWords = fileAndWordList[i][0].motsnb; + + if (fileAndWordList[i] != undefined) { + linkTab.push("

" + txt_results_for + " " + "" + fileAndWordList[i][0].motslisteDisplay + "" + "

"); + + linkTab.push(""); + } + } + } + + var results = ""; + if (linkTab.length > 0) { + /*writeln ("

" + txt_results_for + " " + "" + cleanwordsList + "" + "
"+"

");*/ + results = "

"; + //write("