Added errors 142 and 143, which are produced when converting yig chung

to a Unicode text file, which cannot support font size changes.
This commit is contained in:
dchandler 2004-06-06 21:59:16 +00:00
parent 1db0ec7bb5
commit 7acbce3361
3 changed files with 20 additions and 1 deletions

View file

@ -675,11 +675,21 @@ public class ACIPConverter {
} }
} }
} else if (stype == TString.START_PAREN) { } else if (stype == TString.START_PAREN) {
if (null != writer)
writer.write("[ERROR "
+ ErrorsAndWarnings.getMessage(142,
shortMessages,
"(" /* hard-coded ACIP value */) + "]");
if (null != tdoc) { if (null != tdoc) {
tdoc.setTibetanFontSize(smallFontSize); tdoc.setTibetanFontSize(smallFontSize);
} }
continue; continue;
} else if (stype == TString.END_PAREN) { } else if (stype == TString.END_PAREN) {
if (null != writer)
writer.write("[ERROR "
+ ErrorsAndWarnings.getMessage(143,
shortMessages,
")" /* hard-coded ACIP value */) + "]");
if (null != tdoc) { if (null != tdoc) {
tdoc.setTibetanFontSize(regularFontSize); tdoc.setTibetanFontSize(regularFontSize);
} }

View file

@ -252,7 +252,11 @@ public class ErrorsAndWarnings {
ThdlDebug.verify(translit.length() == 1); ThdlDebug.verify(translit.length() == 1);
return "" + code + ": While waiting for a closing bracket, an opening bracket, '" + translit + "', was found instead. Nesting of bracketed expressions is not permitted."; return "" + code + ": While waiting for a closing bracket, an opening bracket, '" + translit + "', was found instead. Nesting of bracketed expressions is not permitted.";
case 142: // this number is referenced in error 143's message
return "" + code + ": Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG.";
case 143: // this number is referenced in error 142's message
return "" + code + ": Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG.";
@ -326,7 +330,7 @@ public class ErrorsAndWarnings {
} }
private static final int MIN_ERROR = 101; // inclusive private static final int MIN_ERROR = 101; // inclusive
private static final int MAX_ERROR = 141; // inclusive private static final int MAX_ERROR = 143; // inclusive
private static final int MIN_WARNING = 501; // inclusive private static final int MIN_WARNING = 501; // inclusive
private static final int MAX_WARNING = 512; // inclusive private static final int MAX_WARNING = 512; // inclusive

View file

@ -10323,6 +10323,11 @@ tstHelper("shKA");
} }
public void testBrackets() { public void testBrackets() {
uhelp("GA (GA )KHA ",
"\u0f42\u0f0b[ERROR 142: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG.]\u0f42\u0f0b[ERROR 143: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG.]\u0f41\u0f0b");
uhelp("(GA (GA )KHA )",
"[ERROR 142: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to decrease starting here and continuing until error 143. That is, this is the beginning of a region in YIG CHUNG.]\u0f42\u0f0b[#ERROR 111: Found an illegal open parenthesis, '('. Nesting of parentheses is not allowed.]\u0f42\u0f0b[ERROR 143: Because you requested conversion to a Unicode text file, there is no way to indicate that the font size is supposed to increase (go back to the size it was before the last error 142, that is) starting here. That is, this is the end of a region in YIG CHUNG.]\u0f41\u0f0b[#ERROR 112: Unexpected closing parenthesis, ')', found.]");
if (ACIPTshegBarScanner.BRACKETED_SECTIONS_PASS_THROUGH_UNMODIFIED) { if (ACIPTshegBarScanner.BRACKETED_SECTIONS_PASS_THROUGH_UNMODIFIED) {
uhelpShortMessages("{ DD }", " DD "); uhelpShortMessages("{ DD }", " DD ");
uhelpShortMessages("{D X}", "D X"); uhelpShortMessages("{D X}", "D X");