Updated the translation tool to accept Tibetan Unicode. For the application version, this means that the smart paste is unicode aware and will do the appropriate conversion. In the servlet version tibetan unicode can now be inputted in the form and tibetan machine uni is used to display the results.
The Manipulate class now includes: acipToWylie, wylieToAcip, and unicodeToWylie. They provide a simple interfase to David Chandler's converters that are used by the translation tool.
This commit is contained in:
parent
2a47ff68a4
commit
67bddb7a7e
6 changed files with 851 additions and 717 deletions
|
@ -20,7 +20,8 @@ Contributor(s): ______________________________________.
|
|||
to store the dictionary. */
|
||||
package org.thdl.tib.scanner;
|
||||
|
||||
import org.thdl.tib.text.TibetanHTML;
|
||||
//import org.thdl.tib.text.TibetanHTML;
|
||||
import org.thdl.tib.text.ttt.*;
|
||||
|
||||
/** Tibetan word with its corresponding definitions.
|
||||
|
||||
|
@ -60,7 +61,8 @@ public class SwingWord extends Word
|
|||
{
|
||||
try
|
||||
{
|
||||
localWord = TibetanHTML.getHTML(super.token + " ");
|
||||
// localWord = TibetanHTML.getHTML(super.token + " ");
|
||||
localWord = Manipulate.UnicodeString2NCR(EwtsToUnicodeForXslt.convertEwtsTo(super.token + " "));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -82,6 +84,7 @@ public class SwingWord extends Word
|
|||
public String getLink(boolean tibetan)
|
||||
{
|
||||
String localWord, result=null;
|
||||
String className = "";
|
||||
|
||||
if (wordSinDec==null) localWord = super.token;
|
||||
else localWord = wordSinDec;
|
||||
|
@ -89,7 +92,8 @@ public class SwingWord extends Word
|
|||
{
|
||||
try
|
||||
{
|
||||
result = TibetanHTML.getHTML(localWord + " ");
|
||||
result = Manipulate.UnicodeString2NCR(EwtsToUnicodeForXslt.convertEwtsTo(localWord + " "));
|
||||
className = " class = \"tib\"";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -101,6 +105,6 @@ public class SwingWord extends Word
|
|||
if (tibetan) result+= "</a>";
|
||||
else result+= "</a> ";
|
||||
return result;*/
|
||||
return "<a href=\"#" + super.token + "\">" + result + "</a> ";
|
||||
return "<a href=\"#" + super.token + "\"" + className + ">" + result + "</a> ";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue