diff --git a/frontend/src/lib/report-fact-tables.ts b/frontend/src/lib/report-fact-tables.ts index 57a7bd23..a61f4fcb 100644 --- a/frontend/src/lib/report-fact-tables.ts +++ b/frontend/src/lib/report-fact-tables.ts @@ -172,7 +172,7 @@ export function assembleReportFactTables(packet: unknown, language: ReportLangua const cells = ["Bala", "Jagrat", "Deeptadi", "Lajjitadi", "Shayanadi"].map(kind => { const item = record(at(value, `avasthas.${kind}`)); if (kind === "Deeptadi" && Array.isArray(item.applicable_states) && item.applicable_states.length) { - return item.applicable_states.join("、"); + return item.applicable_states.join(en ? ", " : "、"); } return L.text(item.state); }); diff --git a/frontend/tests/report-fact-tables.test.ts b/frontend/tests/report-fact-tables.test.ts index b072bf4d..b4c7077b 100644 --- a/frontend/tests/report-fact-tables.test.ts +++ b/frontend/tests/report-fact-tables.test.ts @@ -204,6 +204,7 @@ test("avastha table shows simultaneous Deeptadi conditions in Chinese and Englis const table = assembleReportFactTables(altered, language).find(item => item.id === "avasthas")!; assert.equal(table.columns[3], "Deeptadi"); const row = table.rows.find(item => item.sourcePath.endsWith(".Sun"))!; - assert.equal(row.cells[3], "Deepta、Kopa"); + // 原值:中英文都断言 "Deepta、Kopa"。新值:英文版 "Deepta, Kopa"。原因:BUG-1391,英文报告不该出现中文顿号。 + assert.equal(row.cells[3], language === "en" ? "Deepta, Kopa" : "Deepta、Kopa"); } });