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:
co-authored by
Claude Opus 5.5
parent
982c53dd17
commit
0b6e6a2d58
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user