Fixed important EWTS->Tibetan conversion bugs. [g.yogs] (and maybe

[hUM^]) are not yet converting correctly.

I have not yet committed the end-to-end test that I'm manually doing
to find these problems.  It will be another document for
TMW_RTF_TO_THDL_WYLIETest.java.  Note that thdl.debug=true is
essential to access the GUI for the EWTS->* converters.
This commit is contained in:
dchandler 2005-07-06 07:46:21 +00:00
parent 0b3a636f63
commit 63ff0fb0c9
7 changed files with 101 additions and 40 deletions

View file

@ -190,17 +190,19 @@ class TPair {
}
String getWylie() {
return getWylie(false);
return getWylie(false, false);
}
/** Returns the EWTS Wylie that corresponds to this pair if
* justLeft is false, or the EWTS Wylie that corresponds to just
* {@link #getLeft()} if justLeft is true.
* {@link #getLeft()} if justLeft is true. If dropDisambiguator
* is true and the right component is a disambiguator, then the
* Wylie will not contain '.'.
*
* <p>Returns "W" for ACIP "W", "r" for ACIP "R", y for ACIP "Y",
* even though sometimes the EWTS for those is "w", "R", or "Y".
* Handle that in the caller. */
String getWylie(boolean justLeft) {
String getWylie(boolean justLeft, boolean dropDisambiguator) {
String leftWylie = null;
if (getLeft() != null) {
leftWylie = traits.getEwtsForConsonant(getLeft());
@ -212,7 +214,7 @@ class TPair {
if (null == leftWylie) leftWylie = "";
if (justLeft) return leftWylie;
String rightWylie = null;
if (traits.disambiguator().equals(getRight()))
if (!dropDisambiguator && traits.disambiguator().equals(getRight()))
rightWylie = ".";
else if ("+".equals(getRight()))
rightWylie = "+";