From 0b6e6a2d585d32beb5cff678722b31060f9ae729 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Sun, 18 Oct 2026 18:46:02 +0800 Subject: [PATCH] fix(report): join simultaneous Deeptadi states with a comma in English Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01HwMNZEzdzmrbPhuRNmZe3C --- frontend/src/lib/report-fact-tables.ts | 2 +- frontend/tests/report-fact-tables.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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"); } });