Show line-ups before kickoff, bind form and table widgets, rewrite the press wording

- Live ticker: the paused live state carries both starting elevens; the ticker lists
  them until the first report. A single match no longer gets an empty strip above the
  score, repeated status lines are gone, whistles carry no club badge, dates are
  written out.
- Desk: "Die letzten Spiele" and the table place curve are fed by the engine
  (desktop-widgets read: recent, rankCurve) and belong to the default layout; the own
  crest widget is bound.
- News: the German press templates are rewritten to one plain sentence each (the
  catalogue accepts a single sentence now); the reference snapshots follow, and the
  catalogue test can rewrite them with --update. Mailbox texts show world spellings
  of clubs and players and the euro sign.
- Small type raised in advertising, lineup, news, toto, transfer and others; the
  transfer market column no longer runs under its scrollbar.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 12:36:33 +01:00
1 parent bd20960f90
commit 9708b720b2
33 files changed
+418 -373

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@ void test(Fixture &f) {
if (o.at("widget") == true && o.at("visible") == true)
++visible;
}
require(visible == 8 && desktop_routes().size() == 32,
require(visible == 10 && desktop_routes().size() == 32,
"Default desktop counts wrong");
for (const auto &d : widget_catalogue()) {
bool found = false;
+12 -2
View File
@@ -19,9 +19,19 @@ void no(const Json &value, const std::string &code) {
} // namespace
int main(int argc, char **argv) {
try {
require(argc == 3, "Catalogue and synthetic reference paths required");
// a fourth argument "--update" rewrites the expected snapshots after a deliberate
// change of the catalogue's wording
const bool update = argc == 4 && std::string(argv[3]) == "--update";
require(argc == 3 || update, "Catalogue and synthetic reference paths required");
const auto catalog = NewsCatalog::load(argv[1]);
const auto reference = Json::parse(bmh::editor::read_file(argv[2]));
auto reference = Json::parse(bmh::editor::read_file(argv[2]));
if (update) {
for (auto &test : reference.at("cases"))
test["result"] = catalog.from_event(test.at("event"), test.at("context"));
bmh::editor::write_atomic(argv[2], reference.dump());
std::cout << "reference updated\n";
return 0;
}
require(catalog.registry().size() == 113,
"113 own authored templates registered");
size_t passed = 0, mismatches = 0;
@@ -1 +1 @@
{"source_commit":"7dbf70f5be5505af41fa532e37dd27aced86bd76","catalogue_sha256":"e249142f2635c897803d3016eb05d3f94297a75a013316fd536f82f2ef982339","description":"Synthetic own authored catalogue events and expected HTML-contract snapshots; no original game data.","cases":[{"name":"match-win:club:de","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"club","id":"example-nordstadt","name":"FC Nordstadt"},"data":{"competition":{"id":"example-league","name":"Regionalliga","names":{"de":"Regionalliga","en":"Regional League"},"kind":"league"},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"de"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-1f772e4a07a5042c","eventId":"demo:match-win:8a50928da6fcf6f9","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"dedupeKey":"[\"club\",\"example-nordstadt\",\"demo:match-win:8a50928da6fcf6f9\"]","fingerprint":"47ab160ae2128b71","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","date":"2027-07-07","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"data":{"competition":{"id":"example-league","name":"Regionalliga","kind":"league","names":{"de":"Regionalliga","en":"Regional League"}},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"variant":"win","templateId":"match-win","demo":true},"language":"de","headline":"Erfolg für FC Nordstadt","body":"FC Nordstadt gewinnt gegen SV Hafenstadt mit 2:1. Die Partie gehörte zu Regionalliga.","translations":{"de":{"headline":"Erfolg für FC Nordstadt","body":"FC Nordstadt gewinnt gegen SV Hafenstadt mit 2:1. Die Partie gehörte zu Regionalliga."},"en":{"headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League."}},"demo":true}}},{"name":"match-win:club:en","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"club","id":"example-nordstadt","name":"FC Nordstadt"},"data":{"competition":{"id":"example-league","name":"Regionalliga","names":{"de":"Regionalliga","en":"Regional League"},"kind":"league"},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"en"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-1f772e4a07a5042c","eventId":"demo:match-win:8a50928da6fcf6f9","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"dedupeKey":"[\"club\",\"example-nordstadt\",\"demo:match-win:8a50928da6fcf6f9\"]","fingerprint":"47ab160ae2128b71","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","date":"2027-07-07","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"data":{"competition":{"id":"example-league","name":"Regionalliga","kind":"league","names":{"de":"Regionalliga","en":"Regional League"}},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"variant":"win","templateId":"match-win","demo":true},"language":"en","headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League.","translations":{"de":{"headline":"Erfolg für FC Nordstadt","body":"FC Nordstadt gewinnt gegen SV Hafenstadt mit 2:1. Die Partie gehörte zu Regionalliga."},"en":{"headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League."}},"demo":true}}},{"name":"match-win:national:de","event":{"id":"demo:match-win:599266f6a6d2d79b","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"national","id":"national-de","name":"Deutschland","names":{"de":"Deutschland","en":"Germany"}},"data":{"competition":{"id":"example-international","name":"Länderspiel","names":{"de":"Länderspiel","en":"International Match"},"kind":"competition"},"opponent":{"kind":"national","id":"national-at","name":"Österreich","names":{"de":"Österreich","en":"Austria"}},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"de"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-d149e8841f861660","eventId":"demo:match-win:599266f6a6d2d79b","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"national-de","name":"Deutschland","kind":"national","names":{"de":"Deutschland","en":"Germany"}},"dedupeKey":"[\"national\",\"national-de\",\"demo:match-win:599266f6a6d2d79b\"]","fingerpLine truncated
{"source_commit":"7dbf70f5be5505af41fa532e37dd27aced86bd76","catalogue_sha256":"21bede3ee7a26fcc69357a451211f78dca3e329368e80f458736efa294df8586","description":"Synthetic own authored catalogue events and expected HTML-contract snapshots; no original game data.","cases":[{"name":"match-win:club:de","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"club","id":"example-nordstadt","name":"FC Nordstadt"},"data":{"competition":{"id":"example-league","name":"Regionalliga","names":{"de":"Regionalliga","en":"Regional League"},"kind":"league"},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"de"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-1f772e4a07a5042c","eventId":"demo:match-win:8a50928da6fcf6f9","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"dedupeKey":"[\"club\",\"example-nordstadt\",\"demo:match-win:8a50928da6fcf6f9\"]","fingerprint":"47ab160ae2128b71","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","date":"2027-07-07","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"data":{"competition":{"id":"example-league","name":"Regionalliga","kind":"league","names":{"de":"Regionalliga","en":"Regional League"}},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"variant":"win","templateId":"match-win","demo":true},"language":"de","headline":"Erfolg für FC Nordstadt","body":"Regionalliga: FC Nordstadt gewinnt mit 2:1 gegen SV Hafenstadt.","translations":{"de":{"headline":"Erfolg für FC Nordstadt","body":"Regionalliga: FC Nordstadt gewinnt mit 2:1 gegen SV Hafenstadt."},"en":{"headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League."}},"demo":true}}},{"name":"match-win:club:en","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"club","id":"example-nordstadt","name":"FC Nordstadt"},"data":{"competition":{"id":"example-league","name":"Regionalliga","names":{"de":"Regionalliga","en":"Regional League"},"kind":"league"},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"en"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-1f772e4a07a5042c","eventId":"demo:match-win:8a50928da6fcf6f9","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"dedupeKey":"[\"club\",\"example-nordstadt\",\"demo:match-win:8a50928da6fcf6f9\"]","fingerprint":"47ab160ae2128b71","event":{"id":"demo:match-win:8a50928da6fcf6f9","type":"match.result","date":"2027-07-07","scope":{"id":"example-nordstadt","name":"FC Nordstadt","kind":"club"},"data":{"competition":{"id":"example-league","name":"Regionalliga","kind":"league","names":{"de":"Regionalliga","en":"Regional League"}},"opponent":{"id":"example-hafen","name":"SV Hafenstadt","kind":"club"},"score":{"for":2,"against":1}},"variant":"win","templateId":"match-win","demo":true},"language":"en","headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League.","translations":{"de":{"headline":"Erfolg für FC Nordstadt","body":"Regionalliga: FC Nordstadt gewinnt mit 2:1 gegen SV Hafenstadt."},"en":{"headline":"Victory for FC Nordstadt","body":"FC Nordstadt beat SV Hafenstadt 2–1. The match was part of Regional League."}},"demo":true}}},{"name":"match-win:national:de","event":{"id":"demo:match-win:599266f6a6d2d79b","type":"match.result","variant":"win","date":"2027-07-07","scope":{"kind":"national","id":"national-de","name":"Deutschland","names":{"de":"Deutschland","en":"Germany"}},"data":{"competition":{"id":"example-international","name":"Länderspiel","names":{"de":"Länderspiel","en":"International Match"},"kind":"competition"},"opponent":{"kind":"national","id":"national-at","name":"Österreich","names":{"de":"Österreich","en":"Austria"}},"score":{"for":2,"against":1}},"demo":true},"context":{"language":"de"},"result":{"ok":true,"article":{"schema":"bmh-news-article@1","catalogueVersion":1,"id":"evt-d149e8841f861660","eventId":"demo:match-win:599266f6a6d2d79b","eventType":"match.result","templateId":"match-win","date":"2027-07-07","kind":"fixture","tone":"positive","scope":{"id":"national-de","name":"Deutschland","kind":"national","names":{"de":"Deutschland","en":"Germany"}},"dedupeKey":"[\"national\",\"national-de\",\"demo:match-win:599266f6a6d2d79b\"]","fingerprint":"777bbef17e4a4bc7","event":{"id":"demo:match-win:599266f6a6d2d7Line truncated