ICU-22396 Fix tool until ICU4J add Temporal Calendar API

See #2488
This commit is contained in:
Frank Yung-Fong Tang 2023-06-05 18:21:31 +00:00
parent f4234577ad
commit e2fde33b4b

View file

@ -184,8 +184,13 @@ outputJavaStuff(const char* progname, const char *outputDir) {
fprintf(out, " /* %s, %d */\n", udbg_enumName(UDBG_UDebugEnumType,t), t);
fprintf(out, " { \n");
for(i=0;i<count;i++) {
fprintf(out,
" \"%s\", /* %d */ \n", udbg_enumName((UDebugEnumType)t,i), i);
fprintf(out, " ");
#if !UCONFIG_NO_FORMATTING
if (t == UDBG_UCalendarDateFields && i == 23) {
fprintf(out, "//");
}
#endif
fprintf(out, "\"%s\", /* %d */ \n", udbg_enumName((UDebugEnumType)t,i), i);
}
fprintf(out, " },\n");
}
@ -206,6 +211,9 @@ outputJavaStuff(const char* progname, const char *outputDir) {
/* Temporary workaround for IS_LEAP_MONTH #6051 */
if (t == UDBG_UCalendarDateFields && i == 22) {
fprintf(out, "com.ibm.icu.util.ChineseCalendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
/* Temporary workaround for ORDINAL_MONTH */
} else if (t == UDBG_UCalendarDateFields && i == 23) {
fprintf(out, "//com.ibm.icu.util.Calendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
} else {
fprintf(out, "com.ibm.icu.util.Calendar.%s, /* %d */", udbg_enumName((UDebugEnumType)t,i), i);
}