From: Kasun Gajasinghe Date: Fri, 13 Aug 2010 18:49:59 +0000 (+0000) Subject: fix: Use of "zh" as the language code for Chinese. X-Git-Tag: release/1.79.1~6^2~831^2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3b9ba81e32550a370798f05771969e47553f736;p=docbook-dsssl fix: Use of "zh" as the language code for Chinese. --- diff --git a/xsl/webhelp/docsrc/readme.xml b/xsl/webhelp/docsrc/readme.xml index ac7b2527b..d51d1c8a6 100755 --- a/xsl/webhelp/docsrc/readme.xml +++ b/xsl/webhelp/docsrc/readme.xml @@ -541,8 +541,8 @@ stylesheet-path=${ant.file.dir}/xsl/webhelp.xsl # to the output directory, you can list patterns here. # See the Ant documentation for fileset for documentation # on patterns. +#input-images-dirs=images/**,figures/**,graphics/** -#input-images-dirs=images/** figures/** graphics/** # By default, the ant script assumes your images are stored # in the same directory as the input-xml. If you store your # image directories in another directory, specify it here. @@ -555,22 +555,17 @@ xslt-processor-classpath=c:/workhead/export/saxon/6.5/lib/saxon.jar # To use this catalog, make sure the resolver is in your classpath. # Download xml-commons-resolver from http://xml.apache.org/commons/dist/ # and add it to your CLASSPATH. Then use the following property to point -# to your docbook xsl stylesheets' catalog. Alternatively, +# to your docbook xsl stylesheets' catalog. Better yet, # you can list the catalog file in your CatalogManager.properties file. docbook-xsl-catalog=c:/gsoc2010/docbook-xsl-1.75.2/catalog.xml -#docbook-xsl-catalog=/media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/maven/docbook-xsl/target/xsltmp/docbook-xsl-1.75.2/catalog.xml # If you wish to have the ant script validate the document before # building it, set this property to the location # of your DocBook DTD. The sample document is # a DocBook 4.5 document and uncomment the line validate=true. -# Alternatively, you can list the DTD's catalog file in your +# Better yet, you can list the DTD's catalog file in your # CatalogManager.properties file. -# Note that the DTD is not releavant for DocBook 5.x ant -# you must set validate=false for 5.x (validation -# is not yet included in the build file for 5.x). docbookx.dtd=c:/workhead/export/DocBookDTD/4.5/docbookx.dtd -#docbookx.dtd=file:///media/DATA/ACADEMIC/GSOC/docbook/repository/docbook/trunk/defguide/en/schema/docbookx.dtd validate=true # Set this to true if you don't need a search tab. @@ -579,10 +574,9 @@ exclude.search.from.webhelp=false # indexer-language is used to tell the search indexer which language # the docbook is written. This will be used to identify the correct # stemmer, and punctuations that differs from language to language. -# see the documentation for details. en=English, de=German, -# cn=Chinese, jp=Japanese etc. Country codes are available at: -# http://www.uspto.gov/patft/help/helpctry.htm -indexer-language=en +# see the documentation for details. en=English, fr=French, de=German, +# zh=Chinese, ja=Japanese etc. +webhelp.indexer.language=en diff --git a/xsl/webhelp/indexer/lib/nw-cms.jar b/xsl/webhelp/indexer/lib/nw-cms.jar index 25e2e13f4..3540e3adf 100755 Binary files a/xsl/webhelp/indexer/lib/nw-cms.jar and b/xsl/webhelp/indexer/lib/nw-cms.jar differ diff --git a/xsl/webhelp/indexer/src/com/nexwave/nquindexer/IndexerTask.java b/xsl/webhelp/indexer/src/com/nexwave/nquindexer/IndexerTask.java index b926bad19..55c25fa16 100755 --- a/xsl/webhelp/indexer/src/com/nexwave/nquindexer/IndexerTask.java +++ b/xsl/webhelp/indexer/src/com/nexwave/nquindexer/IndexerTask.java @@ -55,8 +55,8 @@ public class IndexerTask{ //supported languages: add new additions to this. don't include country codes to the end such as en_US or en_UK, // as stemmers doesn't find a difference between them. - private String[] supportedLanguages= {"en", "de", "fr", "cn", "ja", "ko"}; //currently extended support available for - // English, German, French and CJK (Chinese, Japanese, Korean) languages only. + private String[] supportedLanguages= {"en", "de", "fr", "zh", "ja", "ko"}; //currently extended support available for + // English, German, French and CJK (Chinese [zh], Japanese [ja], Korean [ko]) languages only. // Indexing features: words to remove private ArrayList cleanUpStrings = null; diff --git a/xsl/webhelp/indexer/src/com/nexwave/nquindexer/SaxHTMLIndex.java b/xsl/webhelp/indexer/src/com/nexwave/nquindexer/SaxHTMLIndex.java index ce5cdda58..32181c7a0 100755 --- a/xsl/webhelp/indexer/src/com/nexwave/nquindexer/SaxHTMLIndex.java +++ b/xsl/webhelp/indexer/src/com/nexwave/nquindexer/SaxHTMLIndex.java @@ -99,7 +99,7 @@ public class SaxHTMLIndex extends SaxDocFileParser{ //TODO currently, stemming support is for english and german only. Add support for other languages as well. String[] tokenizedItems; - if(indexerLanguage.equalsIgnoreCase("ja") || indexerLanguage.equalsIgnoreCase("cn") + if(indexerLanguage.equalsIgnoreCase("ja") || indexerLanguage.equalsIgnoreCase("zh") || indexerLanguage.equalsIgnoreCase("ko")){ LinkedList tokens = new LinkedList(); try{ diff --git a/xsl/webhelp/template/content/search/nwSearchFnt.js b/xsl/webhelp/template/content/search/nwSearchFnt.js index fe01240ef..f34ffcf3d 100755 --- a/xsl/webhelp/template/content/search/nwSearchFnt.js +++ b/xsl/webhelp/template/content/search/nwSearchFnt.js @@ -78,7 +78,7 @@ function Effectuer_recherche(expressionInput) { wordsList.sort(); //set the tokenizing method - if(typeof indexerLanguage != "undefined" && (indexerLanguage=="cn" || indexerLanguage=="ja" ||indexerLanguage=="ko")){ + if(typeof indexerLanguage != "undefined" && (indexerLanguage=="zh" || indexerLanguage=="ja" ||indexerLanguage=="ko")){ useCJKTokenizing=true; } else { useCJKTokenizing=false;