fix(report): join simultaneous Deeptadi states with a comma in English

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HwMNZEzdzmrbPhuRNmZe3C
This commit is contained in:
Jesse_Chen
2026-10-18 18:46:02 +08:00
co-authored by Claude Opus 5.5
parent 982c53dd17
commit 0b6e6a2d58
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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);
});
+2 -1
View File
@@ -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");
}
});