fix(ephemeris): alias the engine's three panchanga spellings to the table

Coordinator ruling (brief author, 2026-09-26): Aindra -> Indra (因陀罗),
Variyana -> Variyan (安逸), Dhanishtha -> Dhanishta (虚宿). Spelling aliases
only; the brief's table and its typed test copy are unchanged. BLOCKED item
struck through, PROGRESS / checklist / task index updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-09-26 06:58:41 +08:00
co-authored by Claude Opus 5.5
parent 2981da6fbc
commit dd8912fea0
6 changed files with 29 additions and 15 deletions
+15 -7
View File
@@ -85,6 +85,21 @@ test("the three listed aliases resolve to the same entry", () => {
assert.equal(panchangaNameZh("tithi", "Krishna Shashthi"), "黑分初六");
});
test("the engine's own spellings reach the existing entries (coordinator ruling 2026-09-26)", () => {
// `scripts/muhurta.py` spells these three differently from the brief's table.
// 原值:6de277a4 里断言这三个引擎拼法返回 null(照写梵文、待裁决)。
// 新值:映射到表内既有条目。
// 原因:协调方 2026-09-26 以任务书作者身份裁定补拼写别名,译名不变。
assert.equal(panchangaNameZh("yoga", "Aindra"), "因陀罗");
assert.equal(panchangaNameZh("yoga", "Indra"), "因陀罗");
assert.equal(panchangaNameZh("yoga", "Variyana"), "安逸");
assert.equal(panchangaNameZh("yoga", "Variyan"), "安逸");
assert.equal(panchangaNameZh("nakshatra", "Dhanishtha"), "虚宿");
assert.equal(panchangaNameZh("nakshatra", "Dhanishta"), "虚宿");
// An alias stays inside its own limb.
assert.equal(panchangaNameZh("nakshatra", "Aindra"), null);
});
test("case, spaces and hyphens are ignored", () => {
assert.equal(normalizePanchangaName("Uttara-Bhadra pada"), "uttarabhadrapada");
assert.equal(panchangaNameZh("nakshatra", "uttara bhadrapada"), "壁宿");
@@ -100,13 +115,6 @@ test("a name the table does not know returns null so the caller keeps the engine
assert.equal(panchangaNameZh("karana", "Unknown"), null);
// A yoga name is not looked up in another limb's table.
assert.equal(panchangaNameZh("nakshatra", "Vriddhi"), null);
/* Engine spellings (`scripts/muhurta.py`) that the brief's table spells
differently. Not aliased here: the brief allows only the three aliases
above, so these stay in Sanskrit until the table is ruled on — see
PROGRESS-people-ephemeris-ui-20260926 「待裁决」. */
assert.equal(panchangaNameZh("yoga", "Aindra"), null);
assert.equal(panchangaNameZh("yoga", "Variyana"), null);
assert.equal(panchangaNameZh("nakshatra", "Dhanishtha"), null);
});
test("tithi split separates the fortnight from the day", () => {