The ACIP "BNA" was converting to B-NA instead of B+NA, even though NA cannot take a BA prefix. This was because BNA was interpreted as root-suffix. In ACIP, BN is surely B+N unless N takes a B prefix, so root-suffix is out of the question.

This commit is contained in:
dchandler 2003-10-26 00:21:54 +00:00
parent 306cf2817c
commit 1415fc43e3
3 changed files with 28 additions and 12 deletions

View file

@ -1566,21 +1566,25 @@ public void paste(int offset) {
* Converts the currently selected text from Roman transliteration to
* TibetanMachineWeb.
* @param fromACIP true if the selection is ACIP, false if it is EWTS
* @param withWarnings true if and only if you want warnings to appear
* in the output, such as "this could be a mistranscription of blah..."
* */
public void toTibetanMachineWeb(boolean fromACIP) {
public void toTibetanMachineWeb(boolean fromACIP, boolean withWarnings) {
int start = getSelectionStart();
int end = getSelectionEnd();
toTibetanMachineWeb(fromACIP, start, end);
toTibetanMachineWeb(fromACIP, withWarnings, start, end);
}
/**
* Converts a stretch of text from Extended Wylie to TibetanMachineWeb.
* @param fromACIP true if the selection is ACIP, false if it is EWTS
* @param withWarnings true if and only if you want warnings to appear
* in the output, such as "this could be a mistranscription of blah..."
* @param start the begin point for the conversion
* @param end the end point for the conversion
*/
public void toTibetanMachineWeb(boolean fromACIP, int start, int end) {
* @param end the end point for the conversion */
public void toTibetanMachineWeb(boolean fromACIP, boolean withWarnings,
int start, int end) {
if (start == end)
return;
@ -1605,7 +1609,10 @@ public void paste(int offset) {
DuffData[] duffdata = null;
if (fromACIP) {
getTibDoc().remove(start, i-start);
TibTextUtils.insertTibetanMachineWebForACIP(sb.toString(), getTibDoc(), start);
TibTextUtils.insertTibetanMachineWebForACIP(sb.toString(),
getTibDoc(),
start,
withWarnings);
}
else
duffdata = TibTextUtils.getTibetanMachineWebForEWTS(sb.toString());

View file

@ -434,19 +434,27 @@ public class Jskad extends JPanel implements DocumentListener {
JMenuItem wylieTMWItem = new JMenuItem("Convert Wylie to Tibetan");
wylieTMWItem.addActionListener(new ThdlActionListener() {
public void theRealActionPerformed(ActionEvent e) {
toTibetan(false);
toTibetan(false, true);
}
});
convertSelectionMenu.add(wylieTMWItem);
JMenuItem ACIPTMWItem = new JMenuItem("Convert ACIP to Tibetan");
JMenuItem ACIPTMWItem = new JMenuItem("Convert ACIP to Tibetan (no warnings)");
ACIPTMWItem.addActionListener(new ThdlActionListener() {
public void theRealActionPerformed(ActionEvent e) {
toTibetan(true);
toTibetan(true, false);
}
});
convertSelectionMenu.add(ACIPTMWItem);
JMenuItem ACIPTMWWarnItem = new JMenuItem("Convert ACIP to Tibetan (with warnings)");
ACIPTMWWarnItem.addActionListener(new ThdlActionListener() {
public void theRealActionPerformed(ActionEvent e) {
toTibetan(true, true);
}
});
convertSelectionMenu.add(ACIPTMWWarnItem);
JMenu convertAllMenu = new JMenu("Convert All");
JMenuItem toTMItem = new JMenuItem("Convert Tibetan to TM"); // DLC FIXME: do it just in the selection?
@ -1130,9 +1138,9 @@ public class Jskad extends JPanel implements DocumentListener {
dp.paste(dp.getCaret().getDot());
}
private void toTibetan(boolean fromACIP) {
private void toTibetan(boolean fromACIP, boolean withWarnings) {
Jskad.this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
dp.toTibetanMachineWeb(fromACIP);
dp.toTibetanMachineWeb(fromACIP, withWarnings);
Jskad.this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

View file

@ -15,7 +15,8 @@
-->
</head>
<body bgcolor="white">
Provides classes and methods for inputting Tibetan text.
Provides classes and methods for inputting and converting to and from
Tibetan text.
<p>
Designed for use with the Tibetan Computer Company's free
cross-platform Tibetan Machine Web fonts, this package contains