]> granicus.if.org Git - docbook-dsssl/commitdiff
Language is no longer defaulted to English, if the specified language doesn't support...
authorKasun Gajasinghe <kasunbg@gmail.com>
Mon, 16 Aug 2010 14:01:42 +0000 (14:01 +0000)
committerKasun Gajasinghe <kasunbg@gmail.com>
Mon, 16 Aug 2010 14:01:42 +0000 (14:01 +0000)
xsl/webhelp/indexer/lib/nw-cms.jar
xsl/webhelp/indexer/src/com/nexwave/nquindexer/IndexerTask.java
xsl/webhelp/indexer/src/com/nexwave/nquindexer/SaxHTMLIndex.java

index 3540e3adfe4aac8b4647c4e59ea301b27f07f3c1..6102ebd9887a62e9a4ae50895fed9ed216753969 100755 (executable)
Binary files a/xsl/webhelp/indexer/lib/nw-cms.jar and b/xsl/webhelp/indexer/lib/nw-cms.jar differ
index 55c25fa16e20f1db1468284c759bf56d5062528d..52e429945ea4c9985d6bbacb970c8000356b082e 100755 (executable)
@@ -78,11 +78,10 @@ public class IndexerTask{
     /**\r
      * setter for "indexerLanguage" attribute from ANT\r
      * @param indexerLanguage language for the search indexer. Used to differerentiate which stemmer to be used.\r
-     *              defaults to "en".\r
      * @throws InterruptedException for ant\r
      */\r
     public void setIndexerLanguage(String indexerLanguage){\r
-        if(indexerLanguage !=null) {\r
+        if(indexerLanguage !=null && !"".equals(indexerLanguage)) {\r
             int temp = indexerLanguage.indexOf('_');\r
             if( temp != -1){\r
                 indexerLanguage = indexerLanguage.substring(0,temp);\r
@@ -97,13 +96,12 @@ public class IndexerTask{
             \r
             //if not in supported language list,\r
             if(i>=supportedLanguages.length){\r
-                System.out.println("The given language, \""+indexerLanguage+"\", does not have extensive support for " +\r
-                        "searching or language code is specified in a bad format. Check documentation for details. " +\r
-                        "Language now defaults to english.");\r
-                IndexerTask.indexerLanguage = "en";\r
+//                System.out.println("The given language, \""+indexerLanguage+"\", does not have extensive support for " +\r
+//                        "searching. Check documentation for details. ");\r
+                IndexerTask.indexerLanguage = indexerLanguage;\r
             } \r
         } else {\r
-            IndexerTask.indexerLanguage = "en";\r
+            IndexerTask.indexerLanguage = "nl"; //nl - NotALanguage - fail-safe mechanism, This shouldn't be executed.\r
         } \r
     }\r
 \r
index 5641c061d1a54fb6dd7ffcbb6cc7eb91d7ea18ef..d459bc24e456c6484e34e4e995df48545637add5 100755 (executable)
@@ -137,7 +137,6 @@ public class SaxHTMLIndex extends SaxDocFileParser{
                 System.out.println("Error tokenizing content using CJK Analyzer. IOException");\r
                 ex.printStackTrace();\r
             }\r
-\r
         } else {\r
             SnowballStemmer stemmer;\r
             if(indexerLanguage.equalsIgnoreCase("en")){\r