mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 15:17:07 +01:00
* CTAs speak as a command to the learner: «Frag Heidi» Buttons and links that start an action are imperatives addressed to the learner (owner's decision), so the brand phrase, the domain and the buttons say the same thing: «Frag Heidi» (was «Heidi fragen»), «Frag Heidi, warum», «Entdecke die Situationen», «Fang an», «Probier es aus», «Erstell dein Gratis-Konto», and the home, chat, plans, warm-up, practice, play, groups, languages and organisations doors alike. du-form in German (Sie kept on the organisations page, which addresses organisations as Sie), tu in fr/it, ti in rm, ты in ru; English only «Create your free account». Swiss German changes only where the imperative has a source: «Frag d Heidi» (verb «frage» in the gsw-zh pack; imperative «frag» in Wiktionary's Zurich conjugation table), «Lueg … aa» and «Mach …» (the pack's imperative topic). Other gsw labels keep their infinitives. Single-word tab-like labels («Üben», «Starten») and status texts unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * gsw: «Frög d Heidi» (Zurich imperative of fröge) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r --------- Co-authored-by: Claude <noreply@anthropic.com>
31 lines
1.4 KiB
TypeScript
31 lines
1.4 KiB
TypeScript
import { test } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { PACK_ITEMS } from "./published.ts";
|
|
import { recallItems } from "./kinds/recall.ts";
|
|
import { answerOf, questionOf } from "./answer.ts";
|
|
|
|
test("every question can be quoted to Heidi, with its answer", () => {
|
|
// "Frag Heidi, warum" sends both. An empty quote would be a message that
|
|
// asks about nothing.
|
|
const kept = recallItems([{ target: "däm", bridge: "diesem", savedAt: "2026-09-30T10:00:00Z" }]);
|
|
for (const item of [...PACK_ITEMS, ...kept]) {
|
|
assert.ok(questionOf(item).trim(), `${item.id}: no question`);
|
|
assert.ok(answerOf(item).trim(), `${item.id}: no answer`);
|
|
}
|
|
});
|
|
|
|
test("the recap names the Zurich side and the German side, never one for the other", async () => {
|
|
const { recapOf } = await import("./answer.ts");
|
|
const kept = recallItems([{ target: "däm", bridge: "diesem", savedAt: "2026-09-30T10:00:00Z" }]);
|
|
for (const item of [...PACK_ITEMS, ...kept]) {
|
|
const { dialect } = recapOf(item);
|
|
assert.ok(dialect.trim(), `${item.id}: no dialect side`);
|
|
}
|
|
const meaning = PACK_ITEMS.find((item) => item.kind === "meaning" && "optionsIn" in item && item.optionsIn === "bridge");
|
|
assert.ok(meaning && meaning.kind === "meaning");
|
|
const recap = recapOf(meaning);
|
|
assert.equal(recap.german, answerOf(meaning));
|
|
assert.notEqual(recap.dialect, recap.german);
|
|
assert.deepEqual(recapOf(kept[0]), { dialect: "däm", german: "diesem" });
|
|
});
|