_binary From 9893ec7ca741b72c909489ca5858e9e5f32df11d Mon Sep 17 00:00:00 2001
From: Sandhya Vissapragada <sandyvissa@gmail.com>
Date: Mon, 17 Dec 2012 19:37:37 -0800
Subject: [PATCH 1/2] git add controllers/search_controller.php git add
 css/search.css git add scripts/suggest.js git add
 views/layouts/web_layout.php git add
 views/search_view.php git add locale/en-US/locale.js
 git add locale/te/

---
 controllers/search_controller.php |    5 +
 css/search.css                    |   17 +-
 scripts/suggest.js                |  419 ++++++++++++++++++++++++++++---------
 views/layouts/web_layout.php      |    6 +
 views/search_view.php             |   13 +-
 5 files changed, 356 insertions(+), 104 deletions(-)

diff --git a/controllers/search_controller.php b/controllers/search_controller.php
index 2a3714d..5d3ff4a 100755
--- a/controllers/search_controller.php
+++ b/controllers/search_controller.php
@@ -394,6 +394,11 @@ class SearchController extends Controller implements CrawlConstants
             $data['PAGES'] = $this->makeMediaGroups($data['PAGES']);
         }
         $data['INCLUDE_SCRIPTS'] = array("suggest");
+        $data['SCRIPT'] .= "\nlocal_strings = {'spell':'".
+        tl('search_controller_search')."'};";
+        $data['SCRIPT'] .= "\ncsrf_value ='".CSRF_TOKEN."';";
+        $data['INCLUDE_LOCALE_SCRIPT'] = "locale";
+
         if($no_query || isset($_REQUEST['no_query'])) {
             $data['NO_QUERY'] = true;
             $data['PAGING_QUERY'] .= "&no_query=true";
diff --git a/css/search.css b/css/search.css
index 0e44976..514bbe7 100755
--- a/css/search.css
+++ b/css/search.css
@@ -500,7 +500,7 @@ li.outer div
     display: block;
     background-color: gray;
     padding:2px;
-    width:1.5in;
+    width:1.25in;
     z-index:3;
 }
 
@@ -912,6 +912,9 @@ ul.in-list li
     padding:0;
     color:#666;
     font-size:14pt;
+    position:relative;
+    top:-12px;
+    left:608px;
 }
 
 .serp-links-score
@@ -939,6 +942,16 @@ ul.in-list li
     font-size:10pt;
 }
 
+.spell
+{
+    position:relative;
+    top:-47px;
+    left:49px;
+    color:#666666;
+    font-size:14pt;
+    z-index:1;
+}
+
 .searchbox
 {
     position: relative;
@@ -1053,7 +1066,7 @@ ul.in-list li
 
 .suggest-list li
 {
-    width:6.10in;
+    width:30.10in;
     background:#DDF;
     font-size:16pt;
     margin-right:0in;
diff --git a/scripts/suggest.js b/scripts/suggest.js
index d37af61..6b0f3be 100644
--- a/scripts/suggest.js
+++ b/scripts/suggest.js
@@ -30,6 +30,12 @@
  * @filesource
  */
 
+/*
+ * Update the version number manually when ever
+ * suggest.js undergoes changes
+ */
+VERSION_NO = 0;
+
 /**
  *  Constants for key codes will handle
  */
@@ -51,6 +57,27 @@ FONT_HEIGHT = 24;
  * what the trie object loaded says in loadTrie
  */
 END_OF_TERM_MARKER = " ";
+
+/**
+ * Process to follow once onsubmit event is fired
+ *
+ * @param None
+ * @return None
+ */
+corrected_query="";
+function processSubmit()
+{
+    updateLocalStorage();
+}
+
+/*
+ * To check if the given English letter is a vowel
+ */
+
+function isVowel(c) {
+    return ['a', 'e', 'i', 'o', 'u'].indexOf(c) !== -1
+}
+
 /**
  * Steps to follow every time a key is up from the user end
  * Handles up/dowm arrow keys
@@ -60,28 +87,35 @@ END_OF_TERM_MARKER = " ";
  *
  */
 
-
 function onTypeTerm(event, text_field)
 {
     var key_code_pressed;
     var term_array;
+    var chunk_array = new Array();
     var input_term = text_field.value.trim();
     var suggest_results = elt("suggest-results");
     var suggest_dropdown = elt("suggest-dropdown");
     var scroll_pos = 0;
     var tmp_pos = 0;
+    var local_count = 0;
     locale_terms = new Object();
     local_terms_present = false;
     local_suggest = true;
     search_list_array = new Object();
+    scroll_horz = false;
 
+    chunk_array= analyzeQuery();
+    if(chunk_array && chunk_array.length > 0)
+    {
+       input_term = chunk_array.join().replace(/,/g,'').trim();
+    }
     //To find the length of an associative array
     Object.size = function(obj) {
-    var size = 0, key;
-    for (key in obj) {
-        if (obj.hasOwnProperty(key)) size++;
-    }
-    return size;
+        var size = 0, key;
+        for (key in obj) {
+            if (obj.hasOwnProperty(key)) size++;
+        }
+        return size;
     };
     concat_term = "";
     if(window.event) { // IE8 and earlier
@@ -104,39 +138,57 @@ function onTypeTerm(event, text_field)
             key_code_pressed != KeyCodes.UP_ARROW) {
         search_list = "";
 
-    // First search the local storage to fetch the suggestions
-    if (localStorage) {
-         if (localStorage[locale] != null) {
-            split_str = localStorage[locale].split("@@");
-            locale_terms = JSON.parse(split_str[1]);
-            local_dict = JSON.parse(split_str[0]);
-            if (local_dict != null) {
-                termSuggest(local_dict, input_term);
-                local_terms_present = true;
+        // First search the local storage to fetch the suggestions
+        if (localStorage) {
+            var locale_ver = locale+'_'+VERSION_NO;
+            if (localStorage[locale_ver] == null) {
+                localStorage.clear();
+                count=0;
             }
-         }
-         else  count =0;
-    }
-    var sorted_local = SortLocalTerms();
-    if (Object.size(search_list_array) > 0) {
-        search_list = "";
-         for(var i = 0; i < sorted_local.length ; i++) {
-            var split_array = sorted_local[i].split('*');
-
-            if(search_list_array[split_array[1]] != null)
-            search_list += search_list_array[split_array[1]];
-         }
-     }
-
-     // Now search the actual dictionary trie
-     local_suggest = false;
-     termSuggest(dictionary, input_term);
-
-     // insert nbsp of the number of suggestions are less than MAX_DISPLAY
-     short_max = MAX_DISPLAY - count;
-     for(var i = 0; i < short_max; i++) {
-        search_list += "<li><span class='unselected'>&nbsp;</span></li>";
-    }
+            else if (localStorage[locale_ver] != null) {
+                split_str = localStorage[locale_ver].split("@@");
+                locale_terms = JSON.parse(split_str[1]);
+                local_dict = JSON.parse(localStorage[locale_ver].split("@@", 1));
+                if (local_dict != null) {
+                    local_terms_present = true;
+                    termSuggest(local_dict, input_term);
+                    local_terms_present = false;
+                }
+                var sorted_local = SortLocalTerms();
+                if (Object.size(search_list_array) > 0) {
+                    search_list = "";
+                    for(var i = 0; i < sorted_local.length ; i++) {
+                        var split_array = sorted_local[i].split('*');
+
+                        if(search_list_array[split_array[1]] != null) {
+                            search_split =
+                            search_list_array[split_array[1]].split("_");
+                            search_list +=  "<li><span id='term" +local_count+
+                                "' class='unselected' onclick = 'void(0)' " +
+                                "title='"+search_split[0]+"' " +
+                                "onmouseover='setSelectedTerm(\""+
+                                local_count+"\",\"selected\")'" +
+                                "onmouseout='setSelectedTerm(\""+
+                                local_count+"\",\"unselected\")'" +
+                                "onmouseup='termClick(\""+search_split[0]+
+                                "\",this.id)'"+
+                                ">" + search_split[1] + "</span></li>";
+                            local_count++;
+                        }
+
+                    }
+                }
+                local_suggest = false;
+            }
+        }
+        count = local_count;
+        // Now search the actual dictionary trie
+        termSuggest(dictionary, input_term);
+        // insert nbsp of the number of suggestions are less than MAX_DISPLAY
+        short_max = MAX_DISPLAY - count;
+        for(var i = 0; i < short_max; i++) {
+            search_list += "<li><span class='unselected'>&nbsp;</span></li>";
+        }
         if(count < 1) {
             search_list = "";
         }
@@ -154,6 +206,10 @@ function onTypeTerm(event, text_field)
             suggest_results.style.visibility = "visible";
             suggest_dropdown.style.visibility = "visible";
             suggest_dropdown.style.height = (FONT_HEIGHT * MAX_DISPLAY) + "px";
+            if (scroll_horz)
+                suggest_dropdown.style.overflowX = "scroll";
+            else
+                suggest_dropdown.style.overflowX = "hidden";
         }
     }
     // behavior on up down arrows
@@ -170,8 +226,8 @@ function onTypeTerm(event, text_field)
                 setSelectedTerm(cursor_pos, "selected");
             }
             scroll_count = 1;
-            scroll_pos = (cursor_pos - MAX_DISPLAY > 0) ?
-                (cursor_pos - MAX_DISPLAY + 1) : 1;
+            scroll_pos = (cursor_pos - MAX_DISPLAY >= 0) ?
+                (cursor_pos - MAX_DISPLAY + 1) : 0;
             suggest_dropdown.scrollTop = scroll_pos * FONT_HEIGHT;
         } else if(key_code_pressed == KeyCodes.UP_ARROW) {
             if (cursor_pos < 0) {
@@ -184,8 +240,8 @@ function onTypeTerm(event, text_field)
                 }
                 setSelectedTerm(cursor_pos, "selected");
             }
-            scroll_pos = (cursor_pos - MAX_DISPLAY + scroll_count > 0) ?
-                (cursor_pos - MAX_DISPLAY + scroll_count) : 1;
+            scroll_pos = (cursor_pos - MAX_DISPLAY + scroll_count >= 0) ?
+                (cursor_pos - MAX_DISPLAY + scroll_count) : 0;
             scroll_count = (MAX_DISPLAY > scroll_count) ? scroll_count + 1 :
                 MAX_DISPLAY;
             suggest_dropdown.scrollTop = scroll_pos * FONT_HEIGHT;
@@ -194,6 +250,125 @@ function onTypeTerm(event, text_field)
 }
 
 /**
+ * To correct the spelling of the query words
+ *
+ * @param String word Input word
+ * @return String corrected_word Corrected word
+ */
+function correctSpelling(word)
+{
+    var prob=0,ret_array,curr_prob=0;
+    var candidates = known(edits1(word));
+    candidates.push(word);
+    var corrected_word = "";
+    // Use the fequencies to get the best match
+    for(var i=0;i<candidates.length;i++) {
+        ret_array = exist(dictionary, candidates[i]);
+        if(ret_array != false) {
+            curr_prob = parseInt(ret_array[END_OF_TERM_MARKER]);
+        }
+        if (curr_prob > prob) {
+            prob = curr_prob;
+            corrected_word = candidates[i];
+        }
+    }
+    return corrected_word;
+}
+
+/**
+ * To get the candidates for the spell correction with edit
+ * distance 1
+ *
+ * @param String word Input word
+ * @return Array set Words with edit distance - 1
+ */
+
+function edits1(word)
+{
+    var splits = new Object();
+    var deletes = new Array();
+    var transposes =new Array();
+    var replaces = new Array();
+    var inserts = new Array();
+    var j=0;
+
+    splits[""] = word;
+    for(var i=0;i<word.length;i++) {
+        splits[word.substring(0,i+1)] = word.substring(i+1,word.length);
+    }
+    // Deletes
+    for (key in splits) {
+        if (splits[key] != "") {
+            deletes[j] = key + splits[key].substring(1);
+            j++;
+        }
+    }
+    // Transposes
+    j=0;
+    for (key in splits) {
+        if (splits[key].length > 1) {
+            transposes[j] = key + splits[key].substring(1,2) +
+            splits[key].substring(0,1) + splits[key].substring(2);
+            j++;
+        }
+    }
+    // Replaces
+    j=0;
+    for (key in splits) {
+        if (splits[key] != "") {
+            for(var i=0;i<alpha.length;i++) {
+                replaces[j] = key + alpha.substring(i,i+1) +
+                 splits[key].substring(1);
+                j++;
+            }
+        }
+    }
+    // Inserts
+    j=0;
+    for (key in splits) {
+        for(var i=0;i<alpha.length;i++) {
+            inserts[j] = key + alpha.substring(i,i+1) + splits[key];
+            j++;
+        }
+    }
+    var set =
+    deletes.concat(transposes).concat(replaces).concat(inserts).unique();
+    return set;
+}
+
+Array.prototype.unique = function() {
+    var a = this.concat();
+    for(var i=0; i<a.length; ++i) {
+        for(var j=i+1; j<a.length; ++j) {
+            if(a[i] === a[j])
+                a.splice(j, 1);
+        }
+    }
+    return a;
+}
+
+/**
+ * To get the set of words which are known from the dictionary
+ *
+ * @param Array words_ip array of words
+ * @return Array known_words array of known words
+ */
+
+function known(words_ip)
+{
+    var known_words = new Array(),j=0;
+    var ret_array;
+    for(var i=0;i<words_ip.length;i++) {
+        ret_array = exist(dictionary, words_ip[i]);
+        if(ret_array[END_OF_TERM_MARKER] != null) {
+            known_words[j] =  words_ip[i];
+            j++;
+        }
+    }
+    return known_words;
+}
+
+/**
  * To update the local storage with the previous query terms and
  * create a trie on those terms
  *
@@ -201,48 +376,49 @@ function onTypeTerm(event, text_field)
  */
 function updateLocalStorage()
 {
-     var trie_to_store;
-     trie_storage = {};
-     var store_term = elt("query-field").value;
-     var freq, k=0;
-     var sorted_locale_terms = new Array();
-     if(localStorage) {
-         if (locale_terms[store_term] == null) {
+    var trie_to_store;
+    trie_storage = {};
+    var store_term = elt("query-field").value;
+    var freq, k=0;
+    var sorted_locale_terms = new Array();
+    if(localStorage) {
+        if (locale_terms[store_term] == null) {
             locale_terms[store_term] = 1;
-         } else {
+        } else {
             freq = parseInt(locale_terms[store_term]);
             freq++;
             locale_terms[store_term] = freq;
-         }
-         for(var key in locale_terms) {
+        }
+        for(var key in locale_terms) {
             sorted_locale_terms[k] = key;
             k++;
-         }
+        }
         sorted_locale_terms.sort();
 
         // Build the trie
         for(var i=0; i<sorted_locale_terms.length; i++) {
-        var trie_word = sorted_locale_terms[i];
-        var letters = trie_word.split(""),cur = trie_storage;
-        for (var j=0;j<letters.length;j++) {
-        var letter = encode(letters[j]);
-            var pos = cur[ letter ];
-            if (pos == null) {
-                if (j === letters.length - 1) {
-                    cur = cur[ letter ] = {'$' : '$'};
+            var trie_word = sorted_locale_terms[i];
+            var letters = trie_word.split(""),cur = trie_storage;
+            for (var j=0;j<letters.length;j++) {
+                var letter = encode(letters[j]);
+                var pos = cur[ letter ];
+                if (pos == null) {
+                    if (j === letters.length - 1) {
+                        cur = cur[ letter ] = {'$' : '$'};
+                    } else {
+                        cur = cur[ letter ] = {};
+                    }
+                } else if (pos === 0) {
+                    cur = cur[ letter ] = { '$' : '$' };
                 } else {
-                    cur = cur[ letter ] = {};
+                    cur = cur[ letter ];
                 }
-            } else if (pos === 0) {
-                cur = cur[ letter ] = { '$' : '$' };
-            } else {
-                cur = cur[ letter ];
             }
         }
     }
-    }
     trie_to_store = JSON.stringify( trie_storage );
-    localStorage.setItem(locale,trie_to_store + "@@" + JSON.stringify(locale_terms));
+    localStorage.setItem(locale+'_'+VERSION_NO,trie_to_store +
+     "@@" + JSON.stringify(locale_terms));
 }
 
 /**
@@ -326,24 +502,40 @@ function getTrieTerms(trie_array, parent_word, highlighted_word)
                 getTrieTerms(trie_array[key], parent_word + key,
                         highlighted_word + key);
             } else {
-                if (local_terms_present == false || (locale_terms[decode(parent_word)] == null && local_terms_present == true)) {
-                    search_terms = concat_term.trim() + " " + decode(parent_word);
+                if( (locale_terms[decode(parent_word)] == null
+                     && local_terms_present == false)) {
+                    search_terms = concat_term.trim() + " " +
+                    decode(parent_word);
                     search_terms = search_terms.trim();
-                    highlighted_terms = concat_term.trim() + " " + decode(highlighted_word) + "</b>";
-                    search_string =  "<li><span id='term" +count+
-                    "' class='unselected' onclick = 'void(0)' " +
-                    "title='"+search_terms+"' " +
-                    "onmouseover='setSelectedTerm(\""+count+"\",\"selected\")'" +
-                    "onmouseout='setSelectedTerm(\""+count+"\",\"unselected\")'" +
-                    "onmouseup='termClick(\""+search_terms+"\",this.id)'"+
-                    ">" + highlighted_terms + "</span></li>";
-                    search_list += search_string;
-                    search_list_array[decode(parent_word)] = search_string;
+                    highlighted_terms = concat_term.trim() + " " +
+                    decode(highlighted_word) + "</b>";
+                    search_list +=  "<li><span id='term" +count+
+                        "' class='unselected' onclick = 'void(0)' " +
+                        "title='"+search_terms+"' " +
+                        "onmouseover='setSelectedTerm(\""
+                        +count+"\",\"selected\")'" +
+                        "onmouseout='setSelectedTerm(\""+count
+                        +"\",\"unselected\")'" +
+                        "onmouseup='termClick(\""+search_terms
+                        +"\",this.id)'"+
+                        ">" + highlighted_terms + "</span></li>";
                     count++;
-                }
+                    if (search_terms.length * 24 > 1200 &&  !scroll_horz)
+                        scroll_horz = true;
+                } else if (local_terms_present == true) {
+                    search_terms = concat_term.trim() + " "
+                     + decode(parent_word);
+                    search_terms = search_terms.trim();
+                    highlighted_terms = concat_term.trim() + " "
+                    + decode(highlighted_word) + "</b>";
+                    search_list_array[decode(parent_word)] = search_terms+
+                     "_" +highlighted_terms;
+                    if (search_terms.length * 24 > 1200 &&  !scroll_horz)
+                        scroll_horz = true;
                 }
             }
         }
+    }
 }
 
 /**
@@ -359,7 +551,7 @@ function exist(trie_array, term)
     if(trie_array == null) {
         return false;
     }
-    for(var i = 1; i < term.length; i++) {
+    for(var i = 0; i < term.length; i++) {
         tmp = getUnicodeCharAndNextOffset(term, i);
         if(tmp == false) return false;
         next_char = tmp[0];
@@ -398,11 +590,7 @@ function termSuggest(trie_array, term)
         return false;
     }
     if((term.length) > 1) {
-        tmp = getUnicodeCharAndNextOffset(term, 0);
-        if(tmp == false) return false;
-        start_char = tmp[0];
-        enc_chr = encode(start_char);
-        trie_array = exist(trie_array[enc_chr], term);
+        trie_array = exist(trie_array, term);
         if(trie_array == false) {
             return false;
         }
@@ -467,10 +655,10 @@ function getUnicodeCharAndNextOffset(str, i)
 }
 
 /**
- * Load the Trie(compressed with .gz extension) during the launch of website
+ * Load the Trie during the launch of website
  * Trie's are represented using nested arrays.
  */
-function loadTrie()
+function loadFiles()
 {
     var request = makeRequest();
     if(request) {
@@ -479,11 +667,12 @@ function loadTrie()
                 trie = JSON.parse(request.responseText);
                 dictionary = trie["trie_array"];
                 END_OF_TERM_MARKER = trie["end_marker"];
+                if(locale=='en-US')
+                    spellCheck();
             }
             END_OF_TERM_MARKER = (typeof END_OF_TERM_MARKER == 'undefined') ?
                 ' ' : END_OF_TERM_MARKER;
         }
-
         locale = document.documentElement.lang;
         if(locale) {
             trie_loc = "./?c=resource&a=suggest&locale=" + locale;
@@ -492,15 +681,55 @@ function loadTrie()
         }
     }
 }
-document.getElementsByTagName("body")[0].onload = loadTrie;
+
+/**
+ * To process spell correction
+ */
+function spellCheck()
+{
+    var referenceNode;
+    if (document.getElementsByClassName) {
+        referenceNode = document.getElementsByClassName("serp")[0];
+    }
+    if (referenceNode) {
+        var correctedSpell = document.createElement("div");
+        correctedSpell.id = "spell-check";
+        correctedSpell.className='spell';
+        var csrf_token = elt("csrf-token").value;
+        var its_value = elt("its-value").value;
+
+        var query = elt("query-field").value;
+        var ret_array,ret_word;
+        var term_array = query.split(" ");
+        for(var i =0; i<term_array.length; i++) {
+            ret_word = "";
+            ret_word = correctSpelling(term_array[i].toLowerCase());
+            if(ret_word.trim(" ") == "") {
+                corrected_query += term_array[i] + " ";
+            } else
+                corrected_query += ret_word + " ";
+        }
+        if (corrected_query.trim() != query) {
+            var token_name = csrf_value;
+            var spell_link = "?"+token_name+"="+csrf_token+"&q="
+            +corrected_query;
+            correctedSpell.innerHTML = "<b>" + local_strings.spell
+            +": <a rel='nofollow' href="+spell_link+">"  + corrected_query
+            + "</a></b>";
+            referenceNode.parentNode.
+            insertBefore(correctedSpell, referenceNode.nextSibling);
+        }
+    }
+}
+document.getElementsByTagName("body")[0].onload = loadFiles;
 var ip_field = elt("query-field");
 ip_field.onpaste = function(e) {
     setTimeout(function(){
-        onTypeTerm(e,ip_field);
-    }, 0);
+            onTypeTerm(e,ip_field);
+            }, 0);
 }
 ip_field.oncut = function(e) {
     setTimeout(function(){
-        onTypeTerm(e,ip_field);
-    }, 0);
+            onTypeTerm(e,ip_field);
+            }, 0);
 }
diff --git a/views/layouts/web_layout.php b/views/layouts/web_layout.php
index a25066d..05db3a7 100755
--- a/views/layouts/web_layout.php
+++ b/views/layouts/web_layout.php
@@ -132,6 +132,12 @@ class WebLayout extends Layout
                     $script_name.'.js" ></script>');
             }
         }
+
+        if(isset($data['INCLUDE_LOCALE_SCRIPT'])) {
+                e('<script type="text/javascript"
+                    src="locale/'.$data["LOCALE_TAG"].
+                    '/resources/locale.js" ></script>');
+        }
         ?>
 
         <script type="text/javascript" >
diff --git a/views/search_view.php b/views/search_view.php
index 9efa837..d8f68ff 100755
--- a/views/search_view.php
+++ b/views/search_view.php
@@ -98,7 +98,7 @@ class SearchView extends View implements CrawlConstants
         ?>
 
         <h1 class="logo"><a href="./?<?php 
-            e(CSRF_TOKEN."=".$data[CSRF_TOKEN]); ?>"><img 
+            e(CSRF_TOKEN."=".$data[CSRF_TOKEN])?>"><img 
             src="<?php e($logo); ?>" alt="<?php e(tl('search_view_title'));
                  ?>"
             /></a>
@@ -112,18 +112,17 @@ class SearchView extends View implements CrawlConstants
         ?>
 
         <div class="searchbox">
-            <form id="search-form" method="get" action='?' onsubmit="updateLocalStorage()">
+            <form id="search-form" method="get" action='?' onsubmit="processSubmit()">
             <p>
             <?php if(isset($data["SUBSEARCH"]) && $data["SUBSEARCH"] != "") { ?>
             <input type="hidden" name="s" value="<?php 
                 e($data['SUBSEARCH']); ?>" />
             <?php } ?>
-            <input type="hidden" name="<?php e(CSRF_TOKEN); ?>" value="<?php 
+            <input id="csrf-token" type="hidden" name="<?php e(CSRF_TOKEN); ?>" value="<?php 
                 e($data[CSRF_TOKEN]); ?>" />
-            <input type="hidden" name="its" value="<?php e($data['its']); ?>" />
+            <input id="its-value" type="hidden" name="its" value="<?php e($data['its']); ?>" />
             <input type="text" <?php if(WORD_SUGGEST) { ?>
                 autocomplete="off"  onkeyup="onTypeTerm(event, this)"
-                onpaste="onTypeTerm(event, this)"
                 <?php } ?>
                 title="<?php e(tl('search_view_input_label')); ?>" 
                 id="query-field" name="q" value="<?php 
@@ -154,10 +153,10 @@ class SearchView extends View implements CrawlConstants
                 $num_results = min($data['TOTAL_ROWS'], 
                     $data['LIMIT'] + $data['RESULTS_PER_PAGE']);
                 $limit = min($data['LIMIT'] + 1, $num_results);
-                e(tl('search_view_query_results')); ?> (<?php 
+                 ?> <?php 
                 e(tl('search_view_calculated', $data['ELAPSED_TIME']));?> <?php
                 e(tl('search_view_results', $limit, $num_results,
-                    $data['TOTAL_ROWS'].")"));
+                    $data['TOTAL_ROWS']));
                 }
             ?></h2>
             <?php
-- 
1.7.9.4


From ceda2c9657aac9cb53d98ad973fd20b34119312b Mon Sep 17 00:00:00 2001
From: Sandhya Vissapragada <sandyvissa@gmail.com>
Date: Mon, 17 Dec 2012 19:48:21 -0800
Subject: [PATCH 2/2] spell and transliterate

---
 locale/en-US/locale.js                  |   50 ++
 locale/te/configure.ini                 | 1483 +++++++++++++++++++++++++++++++
 locale/te/locale.js                     |  167 ++++
 locale/te/resources/suggest_trie.txt.gz |  Bin 0 -> 81617 bytes
 locale/te/statistics.txt                |    1 +
 5 files changed, 1701 insertions(+)
 create mode 100644 locale/en-US/locale.js
 create mode 100644 locale/te/configure.ini
 create mode 100644 locale/te/locale.js
 create mode 100644 locale/te/resources/suggest_trie.txt.gz
 create mode 100644 locale/te/statistics.txt

diff --git a/locale/en-US/locale.js b/locale/en-US/locale.js
new file mode 100644
index 0000000..1ce855f
--- /dev/null
+++ b/locale/en-US/locale.js
@@ -0,0 +1,50 @@
+/**
+ *  SeekQuarry/Yioop --
+ *  Open Source Pure PHP Search Engine, Crawler, and Indexer
+ *
+ *  Copyright (C) 2009 - 2012  Chris Pollett chris@pollett.org
+ *
+ *  LICENSE:
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *  END LICENSE
+ *
+ * @author Sandhya Vissapragada
+ * @package seek_quarry
+ * @subpackage javascript
+ * @license http://www.gnu.org/licenses/ GPL3
+ * @link http://www.seekquarry.com/
+ * @copyright 2009 - 2012s
+ * @filesource
+ */
+
+/*
+ * The alphabet for this locale
+ */
+var alpha = "abcdefghijklmnopqrstuvwxyz";
+
+/*
+ * Transliteration maping for this locale
+ */
+var roman_array = {};
+
+/*
+ * To analyze the query and generate actual input query from the 
+ * transliterated query
+ */
+function analyzeQuery()
+{
+}
+
diff --git a/locale/te/configure.ini b/locale/te/configure.ini
new file mode 100644
index 0000000..6ecfc5a
--- /dev/null
+++ b/locale/te/configure.ini
@@ -0,0 +1,1483 @@
+; ***** BEGIN LICENSE BLOCK ***** 
+;  SeekQuarry/Yioop Open Source Pure PHP Search Engine, Crawler, and Indexer
+;  Copyright (C) 2009, 2010, 2011  Chris Pollett chris@pollett.org
+;
+;  This program is free software: you can redistribute it and/or modify
+;  it under the terms of the GNU General Public License as published by
+;  the Free Software Foundation, either version 3 of the License, or
+;  (at your option) any later version.
+;
+;  This program is distributed in the hope that it will be useful,
+;  but WITHOUT ANY WARRANTY; without even the implied warranty of
+;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;  GNU General Public License for more details.
+;
+;  You should have received a copy of the GNU General Public License
+;  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;  ***** END LICENSE BLOCK ***** 
+;
+; configure.ini 
+;
+; te configuration file
+;
+[general]
+;
+; Strings to translate on various pages
+;
+[strings]
+;
+; /Applications/XAMPP/xamppfiles/htdocs/yioop//controllers
+;
+; admin_controller.php line: 133
+admin_controller_login_successful = ""
+;
+; admin_controller.php line: 138
+admin_controller_login_failed = ""
+;
+; admin_controller.php line: 143
+admin_controller_login_to_config = ""
+;
+; admin_controller.php line: 147
+admin_controller_status_updates_stopped = ""
+;
+; admin_controller.php line: 339
+admin_controller_passwords_dont_match = ""
+;
+; admin_controller.php line: 351
+admin_controller_invalid_old_password = ""
+;
+; admin_controller.php line: 358
+admin_controller_change_password = ""
+;
+; admin_controller.php line: 391
+admin_controller_select_username = ""
+;
+; admin_controller.php line: 428
+admin_controller_select_rolename = ""
+;
+; admin_controller.php line: 454
+admin_controller_passwords_dont_match = ""
+;
+; admin_controller.php line: 461
+admin_controller_username_exists = ""
+;
+; admin_controller.php line: 468
+admin_controller_username_added = ""
+;
+; admin_controller.php line: 477
+admin_controller_username_doesnt_exists = ""
+;
+; admin_controller.php line: 484
+admin_controller_username_deleted = ""
+;
+; admin_controller.php line: 491
+admin_controller_username_doesnt_exists = ""
+;
+; admin_controller.php line: 497
+admin_controller_rolename_doesnt_exists = ""
+;
+; admin_controller.php line: 503
+admin_controller_rolename_added = ""
+;
+; admin_controller.php line: 514
+admin_controller_username_doesnt_exists = ""
+;
+; admin_controller.php line: 520
+admin_controller_rolename_doesnt_exists = ""
+;
+; admin_controller.php line: 530
+admin_controller_rolename_deleted = ""
+;
+; admin_controller.php line: 560
+admin_controller_select_rolename = ""
+;
+; admin_controller.php line: 595
+admin_controller_select_activityname = ""
+;
+; admin_controller.php line: 628
+admin_controller_rolename_exists = ""
+;
+; admin_controller.php line: 638
+admin_controller_rolename_added = ""
+;
+; admin_controller.php line: 649
+admin_controller_rolename_doesnt_exists = ""
+;
+; admin_controller.php line: 657
+admin_controller_rolename_deleted = ""
+;
+; admin_controller.php line: 663
+admin_controller_rolename_doesnt_exists = ""
+;
+; admin_controller.php line: 669
+admin_controller_activityname_doesnt_exists = ""
+;
+; admin_controller.php line: 679
+admin_controller_activity_added = ""
+;
+; admin_controller.php line: 685
+admin_controller_rolename_doesnt_exists = ""
+;
+; admin_controller.php line: 692
+admin_controller_activityname_doesnt_exists = ""
+;
+; admin_controller.php line: 704
+admin_controller_activity_deleted = ""
+;
+; admin_controller.php line: 746
+admin_controller_starting_new_crawl = ""
+;
+; admin_controller.php line: 802
+admin_controller_no_description = ""
+;
+; admin_controller.php line: 828
+admin_controller_stop_crawl = ""
+;
+; admin_controller.php line: 842
+admin_controller_resume_crawl = ""
+;
+; admin_controller.php line: 864
+admin_controller_delete_crawl_success = ""
+;
+; admin_controller.php line: 869
+admin_controller_delete_crawl_fail = ""
+;
+; admin_controller.php line: 876
+admin_controller_set_index = ""
+;
+; admin_controller.php line: 903
+admin_controller_use_below = ""
+;
+; admin_controller.php line: 904
+admin_controller_use_defaults = ""
+;
+; admin_controller.php line: 906
+admin_controller_use_below = ""
+;
+; admin_controller.php line: 909
+admin_controller_previous_crawl = ""
+;
+; admin_controller.php line: 1000
+admin_controller_breadth_first = ""
+;
+; admin_controller.php line: 1002
+admin_controller_page_importance = ""
+;
+; admin_controller.php line: 1106
+admin_controller_urls_injected = ""
+;
+; admin_controller.php line: 1117
+admin_controller_update_seed_info = ""
+;
+; admin_controller.php line: 1202
+admin_controller_select_crawl = ""
+;
+; admin_controller.php line: 1203
+admin_controller_default_crawl = ""
+;
+; admin_controller.php line: 1205
+admin_controller_select_crawl = ""
+;
+; admin_controller.php line: 1207
+admin_controller_default_crawl = ""
+;
+; admin_controller.php line: 1234
+admin_controller_unnamed = ""
+;
+; admin_controller.php line: 1239
+admin_controller_mix_created = ""
+;
+; admin_controller.php line: 1248
+admin_controller_set_index = ""
+;
+; admin_controller.php line: 1258
+admin_controller_mix_doesnt_exists = ""
+;
+; admin_controller.php line: 1266
+admin_controller_mix_deleted = ""
+;
+; admin_controller.php line: 1302
+editmix_element_add_crawls = ""
+;
+; admin_controller.php line: 1304
+editmix_element_num_results = ""
+;
+; admin_controller.php line: 1305
+editmix_element_del_grp = ""
+;
+; admin_controller.php line: 1306
+editmix_element_weight = ""
+;
+; admin_controller.php line: 1307
+editmix_element_name = ""
+;
+; admin_controller.php line: 1308
+editmix_add_keywords = ""
+;
+; admin_controller.php line: 1309
+editmix_element_actions = ""
+;
+; admin_controller.php line: 1310
+editmix_add_query = ""
+;
+; admin_controller.php line: 1311
+editmix_element_delete = ""
+;
+; admin_controller.php line: 1363
+admin_controller_mix_saved = ""
+;
+; admin_controller.php line: 1435
+admin_controller_recrawl_never = ""
+;
+; admin_controller.php line: 1436
+admin_controller_recrawl_1day = ""
+;
+; admin_controller.php line: 1437
+admin_controller_recrawl_2day = ""
+;
+; admin_controller.php line: 1438
+admin_controller_recrawl_3day = ""
+;
+; admin_controller.php line: 1439
+admin_controller_recrawl_7day = ""
+;
+; admin_controller.php line: 1440
+admin_controller_recrawl_14day = ""
+;
+; admin_controller.php line: 1495
+admin_controller_page_options_updated = ""
+;
+; admin_controller.php line: 1527
+admin_controller_results_editor_update = ""
+;
+; admin_controller.php line: 1541
+admin_controller_edited_pages = ""
+;
+; admin_controller.php line: 1554
+admin_controller_results_editor_need_url = ""
+;
+; admin_controller.php line: 1560
+admin_controller_results_editor_page_updated = ""
+;
+; admin_controller.php line: 1573
+admin_controller_results_editor_page_loaded = ""
+;
+; admin_controller.php line: 1619
+admin_controller_select_machine = ""
+;
+; admin_controller.php line: 1691
+admin_controller_machine_added = ""
+;
+; admin_controller.php line: 1698
+admin_controller_machine_exists = ""
+;
+; admin_controller.php line: 1702
+admin_controller_machine_incomplete = ""
+;
+; admin_controller.php line: 1711
+admin_controller_machine_doesnt_exists = ""
+;
+; admin_controller.php line: 1728
+admin_controller_stop_service_first = ""
+;
+; admin_controller.php line: 1741
+admin_controller_machine_deleted = ""
+;
+; admin_controller.php line: 1789
+admin_controller_no_machine_log = ""
+;
+; admin_controller.php line: 1818
+admin_controller_machine_servers_updated = ""
+;
+; admin_controller.php line: 1822
+admin_controller_machine_no_action = ""
+;
+; admin_controller.php line: 1853
+admin_controller_select_localename = ""
+;
+; admin_controller.php line: 1897
+admin_controller_locale_added = ""
+;
+; admin_controller.php line: 1904
+admin_controller_localename_doesnt_exists = ""
+;
+; admin_controller.php line: 1913
+admin_controller_localename_deleted = ""
+;
+; admin_controller.php line: 1922
+admin_controller_select_staticpages = ""
+;
+; admin_controller.php line: 1941
+admin_controller_staticpage_updated = ""
+;
+; admin_controller.php line: 1968
+admin_controller_localestrings_updated = ""
+;
+; admin_controller.php line: 2025
+admin_controller_php_version = ""
+;
+; admin_controller.php line: 2033
+admin_controller_no_write_config_php = ""
+;
+; admin_controller.php line: 2038
+admin_controller_no_write_work_dir = ""
+;
+; admin_controller.php line: 2043
+admin_controller_post_size_small = ""
+;
+; admin_controller.php line: 2049
+admin_controller_missing_required = ""
+;
+; admin_controller.php line: 2072
+admin_controller_missing_optional = ""
+;
+; admin_controller.php line: 2077
+admin_controller_check_passed = ""
+;
+; admin_controller.php line: 2082
+admin_controller_using_local_config = ""
+;
+; admin_controller.php line: 2107
+admin_controller_media_kind = ""
+;
+; admin_controller.php line: 2108
+admin_controller_video = ""
+;
+; admin_controller.php line: 2109
+admin_controller_rss_feed = ""
+;
+; admin_controller.php line: 2123
+admin_controller_sources_indexes = ""
+;
+; admin_controller.php line: 2176
+admin_controller_media_source_added = ""
+;
+; admin_controller.php line: 2184
+admin_controller_media_source_deleted = ""
+;
+; admin_controller.php line: 2200
+admin_controller_subsearch_added = ""
+;
+; admin_controller.php line: 2208
+admin_controller_subsearch_deleted = ""
+;
+; admin_controller.php line: 2278
+admin_controller_configure_use_absolute_path = ""
+;
+; admin_controller.php line: 2312
+admin_controller_configure_work_dir_set = ""
+;
+; admin_controller.php line: 2326
+admin_controller_name_your_bot = ""
+;
+; admin_controller.php line: 2334
+admin_controller_configure_work_profile_made = ""
+;
+; admin_controller.php line: 2343
+admin_controller_configure_no_set_config = ""
+;
+; admin_controller.php line: 2355
+admin_controller_configure_no_create_profile = ""
+;
+; admin_controller.php line: 2366
+admin_controller_configure_work_dir_invalid = ""
+;
+; admin_controller.php line: 2378
+admin_controller_configure_work_dir_invalid = ""
+;
+; admin_controller.php line: 2457
+admin_controller_configure_no_change_db = ""
+;
+; admin_controller.php line: 2472
+admin_controller_configure_profile_change = ""
+;
+; admin_controller.php line: 2487
+admin_controller_configure_no_change_profile = ""
+;
+; admin_controller.php line: 2525
+admin_controller_describe_robot = ""
+;
+; search_controller.php line: 198
+search_controller_logout_successful = ""
+;
+; search_controller.php line: 334
+search_controller_mix_info = ""
+;
+; search_controller.php line: 340
+search_controller_crawl_info = ""
+;
+; search_controller.php line: 384
+search_controller_search = "అన్వేషించు"
+;
+; search_controller.php line: 493
+search_controller_no_index_set = ""
+;
+; search_controller.php line: 496
+search_controller_no_index_set = ""
+;
+; search_controller.php line: 1095
+search_controller_extracted_title = ""
+;
+; search_controller.php line: 1097
+search_controller_extracted_description = ""
+;
+; search_controller.php line: 1099
+search_controller_extracted_links = ""
+;
+; search_controller.php line: 1104
+search_controller_extracted_allow_paths = ""
+;
+; search_controller.php line: 1110
+search_controller_extracted_disallow_paths = ""
+;
+; search_controller.php line: 1116
+search_controller_crawl_delay = ""
+;
+; search_controller.php line: 1155
+search_controller_no_archive_page = ""
+;
+; search_controller.php line: 1185
+search_controller_original_page = ""
+;
+; search_controller.php line: 1212
+search_controller_cache_comment = ""
+;
+; search_controller.php line: 1266
+search_controller_cached_version = ""
+;
+; search_controller.php line: 1272
+search_controller_summary_data = ""
+;
+; settings_controller.php line: 134
+settings_controller_crawl_mix = ""
+;
+; settings_controller.php line: 151
+settings_controller_settings_saved = ""
+;
+; /Applications/XAMPP/xamppfiles/htdocs/yioop//views
+;
+; admin_view.php line: 88
+admin_view_admin = ""
+;
+; admin_view.php line: 108
+adminview_auto_logout_one_minute = ""
+;
+; crawlstatus_view.php line: 60
+crawlstatus_view_currently_processing = ""
+;
+; crawlstatus_view.php line: 61
+crawlstatus_view_description = ""
+;
+; crawlstatus_view.php line: 66
+crawlstatus_view_starting_crawl = ""
+;
+; crawlstatus_view.php line: 70
+managecrawls_element_stop_crawl = ""
+;
+; crawlstatus_view.php line: 74
+crawlstatus_view_resuming_crawl = ""
+;
+; crawlstatus_view.php line: 78
+managecrawls_element_stop_crawl = ""
+;
+; crawlstatus_view.php line: 82
+crawlstatus_view_shutdown_queue = ""
+;
+; crawlstatus_view.php line: 85
+crawlstatus_view_closing_dict = ""
+;
+; crawlstatus_view.php line: 88
+crawlstatus_view_run_plugins = ""
+;
+; crawlstatus_view.php line: 96
+managecrawls_element_stop_crawl = ""
+;
+; crawlstatus_view.php line: 103
+crawlstatus_view_changeoptions = ""
+;
+; crawlstatus_view.php line: 105
+crawlstatus_view_no_description = ""
+;
+; crawlstatus_view.php line: 110
+crawlstatus_view_timestamp = ""
+;
+; crawlstatus_view.php line: 112
+crawlstatus_view_time_started = ""
+;
+; crawlstatus_view.php line: 118
+crawlstatus_view_indexer_memory = ""
+;
+; crawlstatus_view.php line: 120
+crawlstatus_view_scheduler_memory = ""
+;
+; crawlstatus_view.php line: 123
+crawlstatus_view_queue_memory = ""
+;
+; crawlstatus_view.php line: 128
+crawlstatus_view_no_mem_data = ""
+;
+; crawlstatus_view.php line: 132
+crawlstatus_view_fetcher_memory = ""
+;
+; crawlstatus_view.php line: 137
+crawlstatus_view_no_mem_data = ""
+;
+; crawlstatus_view.php line: 140
+crawlstatus_view_webapp_memory = ""
+;
+; crawlstatus_view.php line: 145
+crawlstatus_view_no_mem_data = ""
+;
+; crawlstatus_view.php line: 148
+crawlstatus_view_urls_per_hour = ""
+;
+; crawlstatus_view.php line: 156
+crawlstatus_view_visited_urls = ""
+;
+; crawlstatus_view.php line: 160
+crawlstatus_view_total_urls = ""
+;
+; crawlstatus_view.php line: 163
+crawlstatus_view_most_recent_fetcher = ""
+;
+; crawlstatus_view.php line: 172
+crawlstatus_view_no_fetcher = ""
+;
+; crawlstatus_view.php line: 176
+crawlstatus_view_most_recent_urls = ""
+;
+; crawlstatus_view.php line: 184
+crawlstatus_view_no_recent_urls = ""
+;
+; crawlstatus_view.php line: 188
+crawlstatus_view_previous_crawls = ""
+;
+; crawlstatus_view.php line: 194
+crawlstatus_view_description = ""
+;
+; crawlstatus_view.php line: 195
+crawlstatus_view_timestamp = ""
+;
+; crawlstatus_view.php line: 196
+crawlstatus_view_url_counts = ""
+;
+; crawlstatus_view.php line: 197
+crawlstatus_view_actions = ""
+;
+; crawlstatus_view.php line: 205
+crawlstatus_view_statistics = ""
+;
+; crawlstatus_view.php line: 216
+crawlstatus_view_resume = ""
+;
+; crawlstatus_view.php line: 218
+crawlstatus_view_no_resume = ""
+;
+; crawlstatus_view.php line: 225
+crawlstatus_view_set_index = ""
+;
+; crawlstatus_view.php line: 228
+crawlstatus_view_search_index = ""
+;
+; crawlstatus_view.php line: 235
+crawlstatus_view_delete = ""
+;
+; crawlstatus_view.php line: 243
+crawlstatus_view_no_previous_crawl = ""
+;
+; /Applications/XAMPP/xamppfiles/htdocs/yioop//views/elements
+;
+; activity_element.php line: 57
+activity_element_activities = ""
+;
+; configure_element.php line: 80
+configure_element_work_directory = ""
+;
+; configure_element.php line: 86
+configure_element_load_or_create = ""
+;
+; configure_element.php line: 99
+configure_element_component_check = ""
+;
+; configure_element.php line: 103
+configure_element_profile_settings = ""
+;
+; configure_element.php line: 108
+configure_element_default_language = ""
+;
+; configure_element.php line: 114
+configure_element_debug_display = ""
+;
+; configure_element.php line: 119
+configure_element_error_info = ""
+;
+; configure_element.php line: 124
+configure_element_query_info = ""
+;
+; configure_element.php line: 129
+configure_element_test_info = ""
+;
+; configure_element.php line: 134
+configure_element_site_access = ""
+;
+; configure_element.php line: 139
+configure_element_web_access = ""
+;
+; configure_element.php line: 144
+configure_element_rss_access = ""
+;
+; configure_element.php line: 149
+configure_element_api_access = ""
+;
+; configure_element.php line: 154
+configure_element_database_setup = ""
+;
+; configure_element.php line: 156
+configure_element_database_system = ""
+;
+; configure_element.php line: 162
+configure_element_databasename = ""
+;
+; configure_element.php line: 169
+configure_element_databasehost = ""
+;
+; configure_element.php line: 175
+configure_element_databaseuser = ""
+;
+; configure_element.php line: 182
+configure_element_databasepassword = ""
+;
+; configure_element.php line: 192
+configure_element_search_page = ""
+;
+; configure_element.php line: 198
+configure_element_wd_suggest = ""
+;
+; configure_element.php line: 204
+configure_element_subsearch_link = ""
+;
+; configure_element.php line: 209
+configure_element_signin_link = ""
+;
+; configure_element.php line: 214
+configure_element_cache_link = ""
+;
+; configure_element.php line: 220
+configure_element_similar_link = ""
+;
+; configure_element.php line: 225
+configure_element_in_link = ""
+;
+; configure_element.php line: 230
+configure_element_ip_link = ""
+;
+; configure_element.php line: 234
+configure_element_name_server = ""
+;
+; configure_element.php line: 236
+configure_element_name_server_key = ""
+;
+; configure_element.php line: 242
+configure_element_name_server_url = ""
+;
+; configure_element.php line: 248
+configure_element_use_memcache = ""
+;
+; configure_element.php line: 255
+configure_element_memcache_servers = ""
+;
+; configure_element.php line: 263
+configure_element_use_filecache = ""
+;
+; configure_element.php line: 272
+configure_element_crawl_robot = ""
+;
+; configure_element.php line: 274
+configure_element_robot_name = ""
+;
+; configure_element.php line: 282
+configure_element_robot_instance = ""
+;
+; configure_element.php line: 289
+configure_element_robot_description = ""
+;
+; configure_element.php line: 298
+configure_element_submit = ""
+;
+; crawloptions_element.php line: 62
+crawloptions_element_back_to_manage = ""
+;
+; crawloptions_element.php line: 65
+crawloptions_element_modify_active_crawl = ""
+;
+; crawloptions_element.php line: 67
+crawloptions_element_edit_crawl_options = ""
+;
+; crawloptions_element.php line: 90
+crawloptions_element_web_crawl = ""
+;
+; crawloptions_element.php line: 100
+crawloptions_element_archive_crawl = ""
+;
+; crawloptions_element.php line: 107
+crawloptions_element_load_options = ""
+;
+; crawloptions_element.php line: 112
+crawloptions_element_crawl_order = ""
+;
+; crawloptions_element.php line: 119
+crawloptions_element_restrict_by_url = ""
+;
+; crawloptions_element.php line: 127
+crawloptions_element_allowed_to_crawl = ""
+;
+; crawloptions_element.php line: 132
+crawloptions_element_disallowed_and_quota_sites = ""
+;
+; crawloptions_element.php line: 139
+crawloptions_element_seed_sites = ""
+;
+; crawloptions_element.php line: 145
+crawloptions_element_inject_sites = ""
+;
+; crawloptions_element.php line: 153
+crawloptions_element_reindex_crawl = ""
+;
+; crawloptions_element.php line: 159
+crawloptions_element_need_api_for_mix = ""
+;
+; crawloptions_element.php line: 165
+crawloptions_element_meta_words = ""
+;
+; crawloptions_element.php line: 167
+crawloptions_element_word = ""
+;
+; crawloptions_element.php line: 169
+crawloptions_element_url_pattern = ""
+;
+; crawloptions_element.php line: 175
+crawloptions_element_word = ""
+;
+; crawloptions_element.php line: 181
+crawloptions_element_url_pattern = ""
+;
+; crawloptions_element.php line: 203
+crawloptions_element_indexing_plugins = ""
+;
+; crawloptions_element.php line: 205
+crawloptions_element_plugin = ""
+;
+; crawloptions_element.php line: 208
+crawloptions_element_plugin_include = ""
+;
+; crawloptions_element.php line: 232
+crawloptions_element_save_options = ""
+;
+; editlocales_element.php line: 62
+editlocales_element_back_to_manage = ""
+;
+; editlocales_element.php line: 64
+editlocales_element_edit_locale = ""
+;
+; editlocales_element.php line: 76
+editlocales_element_static_pages = ""
+;
+; editlocales_element.php line: 110
+editlocales_element_submit = ""
+;
+; editmix_element.php line: 58
+editmix_element_back_to_mix = ""
+;
+; editmix_element.php line: 60
+mixcrawls_element_edit_mix = ""
+;
+; editmix_element.php line: 71
+mixcrawls_element_mix_name = ""
+;
+; editmix_element.php line: 77
+mixcrawls_element_mix_components = ""
+;
+; editmix_element.php line: 80
+mixcrawls_element_add_group = ""
+;
+; editmix_element.php line: 86
+mixcrawls_element_save_button = ""
+;
+; editstatic_element.php line: 64
+editlocales_element_back_to_manage = ""
+;
+; editstatic_element.php line: 78
+editstatic_element_locale_name = ""
+;
+; editstatic_element.php line: 82
+editstatic_element_page = ""
+;
+; editstatic_element.php line: 89
+editstatic_element_savebutton = ""
+;
+; footer_element.php line: 59
+footer_element_blog = ""
+;
+; footer_element.php line: 61
+footer_element_privacy = ""
+;
+; footer_element.php line: 63
+footer_element_bot = ""
+;
+; footer_element.php line: 69
+footer_element_developed_seek_quarry = ""
+;
+; footer_element.php line: 73
+footer_element_php_search_engine = ""
+;
+; machinelog_element.php line: 60
+machinelog_element_back_to_manage = ""
+;
+; machinelog_element.php line: 62
+machinelog_element_log_file = ""
+;
+; machinelog_element.php line: 67
+machinelog_element_refresh_off = ""
+;
+; machinelog_element.php line: 72
+machinelog_element_refresh_on = ""
+;
+; manageaccount_element.php line: 56
+manageaccount_element_change_password = ""
+;
+; manageaccount_element.php line: 66
+manageaccount_element_old_password = ""
+;
+; manageaccount_element.php line: 71
+manageaccount_element_new_password = ""
+;
+; manageaccount_element.php line: 76
+manageaccount_element_retype_password = ""
+;
+; manageaccount_element.php line: 82
+manageaccount_element_save = ""
+;
+; managecrawls_element.php line: 56
+managecrawls_element_create_crawl = ""
+;
+; managecrawls_element.php line: 65
+managecrawls_element_description = ""
+;
+; managecrawls_element.php line: 71
+managecrawls_element_start_new_crawl = ""
+;
+; managecrawls_element.php line: 75
+managecrawls_element_options = ""
+;
+; managecrawls_element.php line: 79
+managecrawls_element_awaiting_status = ""
+;
+; managecrawls_element.php line: 96
+managecrawls_element_up_longer_update = ""
+;
+; managelocales_element.php line: 59
+managelocales_element_add_locale = ""
+;
+; managelocales_element.php line: 69
+managelocales_element_localenamelabel = ""
+;
+; managelocales_element.php line: 75
+managelocales_element_localetaglabel = ""
+;
+; managelocales_element.php line: 79
+managelocales_element_writingmodelabel = ""
+;
+; managelocales_element.php line: 92
+managelocales_element_submit = ""
+;
+; managelocales_element.php line: 98
+managelocales_element_delete_locale = ""
+;
+; managelocales_element.php line: 108
+managelocales_element_delete_localelabel = ""
+;
+; managelocales_element.php line: 112
+managelocales_element_submit = ""
+;
+; managelocales_element.php line: 117
+managelocales_element_locale_list = ""
+;
+; managelocales_element.php line: 120
+managelocales_element_localename = ""
+;
+; managelocales_element.php line: 121
+managelocales_element_localetag = ""
+;
+; managelocales_element.php line: 122
+managelocales_element_writingmode = ""
+;
+; managelocales_element.php line: 124
+managelocales_element_percenttranslated = ""
+;
+; managemachines_element.php line: 58
+managemachines_element_add_machine = ""
+;
+; managemachines_element.php line: 68
+managemachines_element_machine_name = ""
+;
+; managemachines_element.php line: 74
+managemachines_element_machineurl = ""
+;
+; managemachines_element.php line: 78
+managemachines_element_is_mirror = ""
+;
+; managemachines_element.php line: 83
+managemachines_element_parent_name = ""
+;
+; managemachines_element.php line: 87
+admin_controller_select_machine = ""
+;
+; managemachines_element.php line: 91
+managemachines_element_has_queueserver = ""
+;
+; managemachines_element.php line: 95
+managemachines_element_num_fetchers = ""
+;
+; managemachines_element.php line: 100
+managemachines_element_submit = ""
+;
+; managemachines_element.php line: 105
+managemachines_element_delete_machine = ""
+;
+; managemachines_element.php line: 114
+managemachines_element_machine_name = ""
+;
+; managemachines_element.php line: 118
+admin_controller_select_machine = ""
+;
+; managemachines_element.php line: 120
+managemachines_element_submit = ""
+;
+; managemachines_element.php line: 125
+managemachines_element_machine_info = ""
+;
+; managemachines_element.php line: 128
+managemachines_element_awaiting_status = ""
+;
+; managemachines_element.php line: 145
+managemachines_element_no_longer_update = ""
+;
+; manageroles_element.php line: 57
+manageroles_element_add_role = ""
+;
+; manageroles_element.php line: 67
+manageroles_element_rolename = ""
+;
+; manageroles_element.php line: 71
+manageroles_element_submit = ""
+;
+; manageroles_element.php line: 76
+manageroles_element_delete_role = ""
+;
+; manageroles_element.php line: 86
+manageusers_element_delete_rolename = ""
+;
+; manageroles_element.php line: 90
+manageroles_element_submit = ""
+;
+; manageroles_element.php line: 94
+manageroles_element_view_role_activities = ""
+;
+; manageroles_element.php line: 103
+manageusers_element_select_role = ""
+;
+; manageroles_element.php line: 123
+manageusers_element_add_activity = ""
+;
+; manageroles_element.php line: 128
+manageroles_element_submit = ""
+;
+; manageusers_element.php line: 57
+manageusers_element_add_user = ""
+;
+; manageusers_element.php line: 67
+manageusers_element_username = ""
+;
+; manageusers_element.php line: 71
+manageusers_element_password = ""
+;
+; manageusers_element.php line: 75
+manageusers_element_retype_password = ""
+;
+; manageusers_element.php line: 80
+manageusers_element_submit = ""
+;
+; manageusers_element.php line: 86
+manageusers_element_delete_user = ""
+;
+; manageusers_element.php line: 96
+manageusers_element_delete_username = ""
+;
+; manageusers_element.php line: 100
+manageusers_element_submit = ""
+;
+; manageusers_element.php line: 105
+manageusers_element_view_user_roles = ""
+;
+; manageusers_element.php line: 114
+manageusers_element_select_user = ""
+;
+; manageusers_element.php line: 135
+manageusers_element_add_role = ""
+;
+; manageusers_element.php line: 140
+manageusers_element_submit = ""
+;
+; mixcrawls_element.php line: 59
+mixcrawls_element_make_mix = ""
+;
+; mixcrawls_element.php line: 69
+mixcrawls_element_mix_name = ""
+;
+; mixcrawls_element.php line: 74
+mixcrawls_element_create_button = ""
+;
+; mixcrawls_element.php line: 78
+mixcrawls_element_available_mixes = ""
+;
+; mixcrawls_element.php line: 80
+mixcrawls_view_name = ""
+;
+; mixcrawls_element.php line: 81
+mixcrawls_view_definition = ""
+;
+; mixcrawls_element.php line: 82
+mixcrawls_view_actions = ""
+;
+; mixcrawls_element.php line: 109
+mixcrawls_view_no_components = ""
+;
+; mixcrawls_element.php line: 114
+mixcrawls_view_edit = ""
+;
+; mixcrawls_element.php line: 120
+mixcrawls_set_index = ""
+;
+; mixcrawls_element.php line: 123
+mixcrawl_search_index = ""
+;
+; mixcrawls_element.php line: 130
+mixcrawls_view_delete = ""
+;
+; pageoptions_element.php line: 61
+pageoptions_element_crawl_time = ""
+;
+; pageoptions_element.php line: 67
+pageoptions_element_page_range = ""
+;
+; pageoptions_element.php line: 72
+pageoptions_element_allow_recrawl = ""
+;
+; pageoptions_element.php line: 78
+pageoptions_element_file_types = ""
+;
+; pageoptions_element.php line: 104
+pageoptions_element_page_scoring = ""
+;
+; pageoptions_element.php line: 107
+pageoptions_element_title_weight = ""
+;
+; pageoptions_element.php line: 112
+pageoptions_element_description_weight = ""
+;
+; pageoptions_element.php line: 117
+pageoptions_element_link_weight = ""
+;
+; pageoptions_element.php line: 122
+pageoptions_element_results_grouping_options = ""
+;
+; pageoptions_element.php line: 125
+pageoptions_element_min_results_to_group = ""
+;
+; pageoptions_element.php line: 130
+pageoptions_element_server_alpha = ""
+;
+; pageoptions_element.php line: 136
+pageoptions_element_save_options = ""
+;
+; resultseditor_element.php line: 58
+resultseditor_element_edit_page = ""
+;
+; resultseditor_element.php line: 61
+resultseditor_element_edited_pages = ""
+;
+; resultseditor_element.php line: 70
+resultseditor_element_url_list = ""
+;
+; resultseditor_element.php line: 72
+resultseditor_element_load_page = ""
+;
+; resultseditor_element.php line: 83
+resultseditor_element_page_url = ""
+;
+; resultseditor_element.php line: 90
+resultseditor_element_page_title = ""
+;
+; resultseditor_element.php line: 96
+resultseditor_element_description = ""
+;
+; resultseditor_element.php line: 102
+resultseditor_element_reset = ""
+;
+; resultseditor_element.php line: 105
+resultseditor_element_save_page = ""
+;
+; resultseditor_element.php line: 108
+resultseditor_element_filter_websites = ""
+;
+; resultseditor_element.php line: 118
+resultseditor_element_sites_to_filter = ""
+;
+; resultseditor_element.php line: 125
+resultseditor_element_save_filter = ""
+;
+; searchsources_element.php line: 61
+searchsources_element_add_media_source = ""
+;
+; searchsources_element.php line: 70
+searchsources_element_sourcetype = ""
+;
+; searchsources_element.php line: 75
+searchsources_element_sourcename = ""
+;
+; searchsources_element.php line: 79
+searchsources_element_url = ""
+;
+; searchsources_element.php line: 83
+searchsources_element_thumbnail = ""
+;
+; searchsources_element.php line: 87
+searchsources_element_locale_tag = ""
+;
+; searchsources_element.php line: 92
+searchsources_element_submit = ""
+;
+; searchsources_element.php line: 96
+searchsources_element_media_sources = ""
+;
+; searchsources_element.php line: 98
+searchsources_element_medianame = ""
+;
+; searchsources_element.php line: 99
+searchsources_element_mediatype = ""
+;
+; searchsources_element.php line: 100
+searchsources_element_mediaurls = ""
+;
+; searchsources_element.php line: 101
+searchsources_element_action = ""
+;
+; searchsources_element.php line: 110
+searchsources_element_deletemedia = ""
+;
+; searchsources_element.php line: 115
+searchsources_element_add_subsearch = ""
+;
+; searchsources_element.php line: 124
+searchsources_element_foldername = ""
+;
+; searchsources_element.php line: 128
+searchsources_element_indexsource = ""
+;
+; searchsources_element.php line: 134
+searchsources_element_per_page = ""
+;
+; searchsources_element.php line: 140
+searchsources_element_submit = ""
+;
+; searchsources_element.php line: 143
+searchsources_element_subsearches = ""
+;
+; searchsources_element.php line: 145
+searchsources_element_dirname = ""
+;
+; searchsources_element.php line: 147
+searchsources_element_index = ""
+;
+; searchsources_element.php line: 148
+searchsources_element_localestring = ""
+;
+; searchsources_element.php line: 150
+searchsources_element_perpage = ""
+;
+; searchsources_element.php line: 153
+searchsources_element_actions = ""
+;
+; searchsources_element.php line: 164
+searchsources_element_localize = ""
+;
+; searchsources_element.php line: 168
+searchsources_element_deletesubsearch = ""
+;
+; signin_element.php line: 64
+signin_element_settings = ""
+;
+; signin_element.php line: 69
+signin_element_signin = ""
+;
+; signin_element.php line: 73
+signin_element_admin = ""
+;
+; signin_element.php line: 75
+signin_element_signout = ""
+;
+; subsearch_element.php line: 57
+subsearch_element_web = ""
+;
+; subsearch_element.php line: 81
+subsearch_element_more = ""
+;
+; subsearch_element.php line: 87
+subsearch_element_more = ""
+;
+; /Applications/XAMPP/xamppfiles/htdocs/yioop//views/helpers
+;
+; feeds_helper.php line: 70
+feeds_helper_view_feed_results = ""
+;
+; feeds_helper.php line: 107
+feeds_helper_view_onehour = ""
+;
+; feeds_helper.php line: 110
+feeds_helper_view_hourdate = ""
+;
+; images_helper.php line: 64
+images_helper_view_image_results = ""
+;
+; pagination_helper.php line: 97
+pagination_helper_previous = ""
+;
+; pagination_helper.php line: 120
+pagination_helper_next = ""
+;
+; toggle_helper.php line: 68
+toggle_helper_on = ""
+;
+; toggle_helper.php line: 70
+toggle_helper_off = ""
+;
+; toggle_helper.php line: 74
+toggle_helper_on = ""
+;
+; toggle_helper.php line: 76
+toggle_helper_off = ""
+;
+; toggle_helper.php line: 80
+toggle_helper_on = ""
+;
+; toggle_helper.php line: 81
+toggle_helper_off = ""
+;
+; /Applications/XAMPP/xamppfiles/htdocs/yioop//views/layouts
+;
+; rss_layout.php line: 64
+rss_layout_title = ""
+;
+; rss_layout.php line: 72
+rss_layout_description = ""
+;
+; web_layout.php line: 68
+web_layout_title = ""
+;
+; web_layout.php line: 77
+web_layout_description = ""
+;
+; web_layout.php line: 80
+web_layout_description = ""
+;
+; web_layout.php line: 106
+web_layout_query_statistics = ""
+;
+; web_layout.php line: 110
+web_layout_total_elapsed_time = ""
+;
+; web_layout.php line: 115
+web_layout_query_time = ""
+;
+; machinestatus_view.php line: 65
+machinestatus_view_no_monitored = ""
+;
+; machinestatus_view.php line: 84
+machinestatus_view_mirrors = ""
+;
+; machinestatus_view.php line: 87
+machinestatus_view_log = ""
+;
+; machinestatus_view.php line: 100
+machinestatus_view_queue_server = ""
+;
+; machinestatus_view.php line: 102
+machinestatus_view_log = ""
+;
+; machinestatus_view.php line: 111
+machinestatus_view_no_queue_server = ""
+;
+; machinestatus_view.php line: 114
+machinestatus_view_no_fetchers = ""
+;
+; machinestatus_view.php line: 124
+machinestatus_view_fetchers = ""
+;
+; machinestatus_view.php line: 134
+machinestatus_view_log = ""
+;
+; nocache_view.php line: 65
+nocache_view_no_cache = ""
+;
+; nocache_view.php line: 67
+nocache_view_summary_contents = ""
+;
+; search_view.php line: 101
+search_view_title = ""
+;
+; search_view.php line: 126
+search_view_input_label = ""
+;
+; search_view.php line: 130
+search_view_input_placeholder = ""
+;
+; search_view.php line: 134
+search_view_search = ""
+;
+; search_view.php line: 156
+search_view_calculated = ""
+;
+; search_view.php line: 157
+search_view_results = ""
+;
+; search_view.php line: 251
+search_view_cache = ""
+;
+; search_view.php line: 254
+search_view_as_text = ""
+;
+; search_view.php line: 267
+search_view_similar = ""
+;
+; search_view.php line: 279
+search_view_inlink = ""
+;
+; search_view.php line: 299
+search_view_rank = ""
+;
+; search_view.php line: 301
+search_view_relevancy = ""
+;
+; search_view.php line: 303
+search_view_proximity = ""
+;
+; search_view.php line: 305
+search_view_score = ""
+;
+; search_view.php line: 329
+search_view_more_statistics = ""
+;
+; settings_view.php line: 80
+settings_view_settings = ""
+;
+; settings_view.php line: 87
+settings_view_results_per_page = ""
+;
+; settings_view.php line: 92
+settings_view_open_in_tabs = ""
+;
+; settings_view.php line: 99
+settings_view_search_index = ""
+;
+; settings_view.php line: 104
+settings_view_language_label = ""
+;
+; settings_view.php line: 113
+settings_view_return_yioop = ""
+;
+; settings_view.php line: 116
+settings_view_save = ""
+;
+; settings_view.php line: 124
+setting_install_search_plugin = ""
+;
+; signin_view.php line: 67
+signin_view_signin = ""
+;
+; signin_view.php line: 73
+signin_view_username = ""
+;
+; signin_view.php line: 79
+signin_view_password = ""
+;
+; signin_view.php line: 88
+signin_view_login = ""
+;
+; signin_view.php line: 95
+signin_view_return_yioop = ""
+;
+; static_view.php line: 77
+static_view_title = ""
+;
+; statistics_view.php line: 81
+statistics_view_statistics = ""
+;
+; statistics_view.php line: 86
+statistics_view_calculating = ""
+;
+; statistics_view.php line: 102
+statistics_view_error_codes = ""
+;
+; statistics_view.php line: 103
+statistics_view_sizes = ""
+;
+; statistics_view.php line: 104
+statistics_view_links_per_page = ""
+;
+; statistics_view.php line: 105
+statistics_view_page_date = ""
+;
+; statistics_view.php line: 106
+statistics_view_dns_time = ""
+;
+; statistics_view.php line: 107
+statistics_view_download_time = ""
+;
+; statistics_view.php line: 108
+statistics_view_top_level_domain = ""
+;
+; statistics_view.php line: 109
+statistics_view_file_extension = ""
+;
+; statistics_view.php line: 110
+statistics_view_media_type = ""
+;
+; statistics_view.php line: 111
+statistics_view_language = ""
+;
+; statistics_view.php line: 112
+statistics_view_server = ""
+;
+; statistics_view.php line: 113
+statistics_view_os = ""
+;
+; statistics_view.php line: 117
+statistics_view_general_info = ""
+;
+; statistics_view.php line: 118
+statistics_view_description = ""
+;
+; statistics_view.php line: 120
+statistics_view_timestamp = ""
+;
+; statistics_view.php line: 122
+statistics_view_crawl_date = ""
+;
+; statistics_view.php line: 124
+statistics_view_pages = ""
+;
+; statistics_view.php line: 126
+statistics_view_url = ""
+;
+; statistics_view.php line: 129
+statistics_view_number_hosts = ""
diff --git a/locale/te/locale.js b/locale/te/locale.js
new file mode 100644
index 0000000..57fc250
--- /dev/null
+++ b/locale/te/locale.js
@@ -0,0 +1,167 @@
+/**
+ *  SeekQuarry/Yioop --
+ *  Open Source Pure PHP Search Engine, Crawler, and Indexer
+ *
+ *  Copyright (C) 2009 - 2012  Chris Pollett chris@pollett.org
+ *
+ *  LICENSE:
+ *
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *  END LICENSE
+ *
+ * @author Sandhya Vissapragada
+ * @package seek_quarry
+ * @subpackage javascript
+ * @license http://www.gnu.org/licenses/ GPL3
+ * @link http://www.seekquarry.com/
+ * @copyright 2009 - 2012s
+ * @filesource
+ */
+
+/*
+ * The alphabet for this locale
+ */
+var alpha = "";
+
+/*
+ * Transliteration maping for this locale
+ */
+var roman_array = {"a":"అ","aa":"ఆ","i":"ఇ","ii":"ఈ","u":"ఉ","uu":"ఊ",
+            "ru":"ఋ","e":"ఎ","ee":"ఏ","ai":"ఐ","o":"ఒ","oo":"ఓ",
+            "ou":"ఔ","am":"ం","aha":"అః","k":"క","kh":"ఖ","g":"గ",
+            "gh":"ఘ","ch":"చ","chh":"ఛ","j":"జ","jh":"ఝ","t":"త",
+            "tt":"ఠ","d":"డ","dd":"ఢ","th":"థ","dh":"ద","ddh":"ధ",
+            "n":"న","p":"ప","ph":"ఫ","b":"బ","bh":"భ","m":"మ","y":"య",
+            "r":"ర","l":"ల","v":"వ","s":"స","sh":"ష","h":"హ",	   
+            "+e":"ె","+u":"ు","+uu":"ూ","+ou":"ౌ","+ai":"ై","+aa":"ా","+ru":"ృ",
+            "+oo":"ో","+ee":"ే","+i":"ి","+o":"ొ","*":"్"};
+
+/*
+ * To analyze the query and generate actual input query from the 
+ * transliterated query
+ */
+function analyzeQuery()
+{
+    var query = elt("query-field").value;
+    var chunk_array = new Array(),cha2,cha2_array = new Array();
+    var len = query.length;
+    var ini_chunk = true;
+    for(var i=0;i<len;) {
+        var cons_found = false;vow_found = false;
+        cnt = 0;vow_cnt=0;cha2='';
+        if (query.length == 1) { 
+            cha2 = query.trim(); i++; 
+        }
+        else {
+            while (cons_found == false) {
+                letr = query.substring(i,i+1);
+                if (!isVowel(letr)) {
+                    cnt++;
+                    if (cnt > 1) {
+                        if (vow_found == true)
+                            cons_found = true;
+                    }
+                }
+                else {
+                    vow_found = true;
+                    vow_cnt++;
+                }
+                if (cons_found == false) {   
+                    cha2 += letr;  
+                    i++;
+                }  
+                if (i>=len)
+                    cons_found = true;   
+            }
+
+        }
+        cha2_array = cha2.split("");
+        if (cha2_array.length == 2 && !isVowel(cha2_array[0]) 
+            && (cha2_array[1] == 'a')) {
+            cha2 = cha2_array[0];
+        }
+        if (cha2_array.length == 3 && !isVowel(cha2_array[0]) 
+            && !isVowel(cha2_array[1]) && (cha2_array[2] == 'a')) {
+            cha2 = cha2_array[0] + cha2_array[1];
+        }
+        cha2_array = [];
+        cha2_array = cha2.split("");        
+        if (cha2_array.length == 1){
+            cha2 = cha2_array[0];        
+            if (roman_array[cha2] != null)             
+                chunk_array.push(roman_array[cha2]);
+        }
+        if (cha2_array.length == 2) {
+            if (roman_array[cha2] != null)             
+                chunk_array.push(roman_array[cha2]);
+            else if (roman_array['+'+cha2] != null)
+                chunk_array.push(roman_array['+'+cha2]);
+            else if (cha2.substring(0,1) == cha2.substring(1,2))
+            {   
+                var x = roman_array[cha2.substring(0,1)];
+                chunk_array.push(x+roman_array['*']+x);
+            }
+            else {
+                for(var j=0;j<2;j++) {
+                    cha1 = cha2.substring(j,j+1);
+                    if (roman_array['+'+cha1] != null && ini_chunk == false)                
+                        chunk_array.push(roman_array['+'+cha1]);
+                    else  if (roman_array[cha1] != null) { 
+                        if (j==1 && !isVowel(cha1)) {   
+                            chunk_array.pop();
+                            chunk_array.push(roman_array[cha2.substring(0,1)]
+                            +roman_array['*']+roman_array[cha1]); 
+                        }                                 
+                        else { 
+                            chunk_array.push(roman_array[cha1]);  
+                        }    
+                    }            
+                    ini_chunk = false;  
+                }
+            }
+        }
+        if (cha2_array.length == 3 && vow_cnt == 2) {
+            if(roman_array[cha2.substring(0,1)] != null)
+                chunk_array.push(roman_array[cha2.substring(0,1)]);
+            if(roman_array['+'+cha2.substring(1,3)] != null)
+                chunk_array.push(roman_array['+'+cha2.substring(1,3)]);
+        }
+        if (cha2_array.length == 3 && vow_cnt == 1) {
+            if(roman_array[cha2.substring(0,2)] != null)
+                chunk_array.push(roman_array[cha2.substring(0,2)]);
+
+            else {
+                for(var j=0;j<2;j++) {
+                    cha1 = cha2.substring(j,j+1);
+                    if (roman_array[cha1] != null) { 
+                        if (j==1 && !isVowel(cha1)) {   
+                            chunk_array.pop();
+                            chunk_array.push(roman_array[cha2.substring(0,1)]
+                            +roman_array['*']+roman_array[cha1]); 
+                        }                                 
+                        else { 
+                            chunk_array.push(roman_array[cha1]);  
+                        }    
+                    }    
+                }
+            }
+            if(roman_array['+'+cha2.substring(2,3)] != null)
+                chunk_array.push(roman_array['+'+cha2.substring(2,3)]);
+        }
+        ini_chunk = false;  
+    }  
+    return chunk_array;
+}
+
diff --git a/locale/te/resources/suggest_trie.txt.gz b/locale/te/resources/suggest_trie.txt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..5a52e19cd2bc7931dc02ef53f9e3c4dc13a15503
GIT binary patch
diff --git a/locale/te/statistics.txt b/locale/te/statistics.txt
new file mode 100644
index 0000000..8f66b5b
--- /dev/null
+++ b/locale/te/statistics.txt
@@ -0,0 +1 @@
+d:0;
\ No newline at end of file
-- 
1.7.9.4

