ui: fix typo & add stylus style (#1195)

This commit is contained in:
ILoveScratch authored and GitHub committed 2026-08-01 19:11:08 +08:00
1 parent a8ec204a04
commit 52f811cf98
10 files changed
+32 -20

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ Problem data not found.: 문제 데이터 없음
Read {0}, expect {1}.: '{0}에서 다음을 예상함. {1}'
Standard answer longer than user output.: 출력이 짧습니다.
Testdata configuration incorrect.: TC config 오류
Too many files.: 파일이 너무 많습니다.
Too many files: 파일이 너무 많습니다.
Too many testcases. Cancelled.: TC가 너무 많습니다. 채점을 취소합니다.
Total time limit longer than {0}s. Cancelled.: 총 시간이 {0}초를 넘습니다. 채점을 취소합니다.
Unknown checker type {0}.: Checker 형태 {0}을(를) 식별할 수 없습니다.
+4 -4
View File
@@ -6,7 +6,7 @@ Cannot find judge extra file {0}.: 找不到评测额外文件 {0}。
Cannot find output file {0}.: 找不到输出文件 {0}。
Cannot find user extra file {0}.: 找不到用户额外文件 {0}。
Cannot parse testdata.: 无法解析测试数据。
Checker returned {0}.: 比较器返回了{0}。
Checker returned {0}.: 比较器返回了 {0}。
Disable builtin judge: 禁用内置评测机
Executable file not found.: 没有找到可执行文件。
Found {0} testcases.: 识别到 {0} 个测试点。
@@ -27,13 +27,13 @@ Syncing testdata, please wait...: 正在同步测试数据,请稍候...
Temp directory: 临时目录
Testdata cache directory: 测试数据缓存目录
Testdata configuration incorrect.: 题目配置错误。
Too many files.: 文件过多。
Too many files: 文件过多。
Too many testcases. Cancelled.: 测试数据过多。评测取消。
Total time limit longer than {0}s. Cancelled.: 总时限超过{0}s。评测取消。
Total time limit longer than {0}s. Cancelled.: 总时限超过 {0}s。评测取消。
Total time limit per problem: 单题最多总评测时长
Unknown checker type {0}.: 未知的比较器类型 {0}。
Unknown language type.: 未知的语言类型。
Unsupported language {0}.: 不支持的语言 {0}。
User output longer than standard answer.: 选手输出比标准输出长。
You did not specify a checker.: 你没有指定比较器文件。
Your program returned {0}.: 您的程序返回了{0}。
Your program returned {0}.: 您的程序返回了 {0}。
+1 -1
View File
@@ -27,7 +27,7 @@ Syncing testdata, please wait...: 正在同步測試資料,請稍候...
Temp directory: 臨時目錄
Testdata cache directory: 測試資料快取目錄
Testdata configuration incorrect.: 題目配置錯誤。
Too many files.: 檔案過多。
Too many files: 檔案過多。
Too many testcases. Cancelled.: 測試資料過多。評測取消。
Total time limit longer than {0}s. Cancelled.: 總時限超過{0}s。評測取消。
Total time limit per problem: 單題最多總評測時長
+6 -6
View File
@@ -19,7 +19,7 @@ export interface CheckConfig {
type Checker = (config: CheckConfig) => Promise<{
status: number;
score: number;
message: string;
message: string | { message: string, params?: any[] };
nextPass?: { input: CopyInFile, state?: Record<string, CopyInFile> };
}>;
@@ -32,8 +32,8 @@ function parseDiffMsg(msg: string) {
const lline = meta.split('L=')[1];
if (lline?.trim() === 'EOF') {
const next = u.split('EOF on ')[1].split(' ')[0];
if (next === 'usrout.processed') return 'Standard answer longer than user output.';
if (next === 'answer.processed') return 'User output longer than standard answer.';
if (next === 'usrout.processed') return { message: 'Standard answer longer than user output.', params: [] };
if (next === 'answer.processed') return { message: 'User output longer than standard answer.', params: [] };
return `Unable to parse: ${u}`;
}
const lineNum = +lline;
@@ -42,8 +42,8 @@ function parseDiffMsg(msg: string) {
const std = t.trim().split(' ');
if (std.every((x) => !Number.isNaN(+x))) {
// Number mode, report length not match
if (usr.length > std.length) return 'User output longer than standard answer.';
if (usr.length < std.length) return 'Standard answer longer than user output.';
if (usr.length > std.length) return { message: 'User output longer than standard answer.', params: [] };
if (usr.length < std.length) return { message: 'Standard answer longer than user output.', params: [] };
}
for (let i = 0; i < usr.length; i++) {
if (usr[i] === std[i]) continue;
@@ -119,7 +119,7 @@ const getDefaultChecker = (strict: boolean) => async (config: CheckConfig) => {
status = STATUS.STATUS_WRONG_ANSWER;
if (config.detail === 'full') message = parseDiffMsg(stdout);
} else status = STATUS.STATUS_ACCEPTED;
if (message.length > 1024000) message = '';
if (typeof message === 'string' && message.length > 1024000) message = '';
return {
score: status === STATUS.STATUS_ACCEPTED ? config.score : 0,
status,
+2 -2
View File
@@ -94,7 +94,7 @@ export class JudgeTask {
status: STATUS.STATUS_COMPILE_ERROR, score: 0, time: 0, memory: 0,
});
} else if (e instanceof FormatError) {
this.next({ message: 'Testdata configuration incorrect.' });
this.next({ message: { message: 'Testdata configuration incorrect.', params: [] } });
this.next({ message: { message: e.message, params: e.params } });
this.end({
status: STATUS.STATUS_FORMAT_ERROR, score: 0, time: 0, memory: 0,
@@ -144,7 +144,7 @@ export class JudgeTask {
if (filenames.length) {
span.setAttribute('files', filenames);
logger.info(`Getting problem data: ${this.session?.config.host || 'local'}/${source}`);
this.next({ message: 'Syncing testdata, please wait...' });
this.next({ message: { message: 'Syncing testdata, please wait...', params: [] } });
this.mainContext = trace.setSpan(context.active(), span);
await this.session.fetchFile(source, Object.fromEntries(
files.filter((i) => filenames.includes(i.name))