2. Texts apart from rules
- [E] Name, abbreviation, short and long description of an entry live in
its own text file (
texts.de.ts), keyed by the entry key. Rules contain no German text. Renaming (#94) and explanations (#63) then never touch a rule file. - [V] First step (#131, owner 2026-11-12: display texts are not
mutation-tested): the display texts of the catalog and the mission names
are in
src/core/texts.ts, keyed by the entry key, and each catalog entry spreads its texts; Stryker leaves the file out (see Test strategy). The per-featuretexts.de.tsfollow with the folder skeleton. - [E] #113 builds on
src/core/texts.tsof #131 (all display texts in one data file that Stryker leaves out): after #112 it splits that file into onetexts.de.tsper entry and adds the accessortext(key); the text files stay out of the mutation run (owner, 2026-11-13). - [E] Decided for #113 (owner, 2026-11-13): the mission names stay in
src/core/texts.ts, still left out by Stryker, until #116 moves them into the mission folders;text(key)covers the catalog entries only (spyis both a research and a mission). The 12 classic ships and defenses that never had a short text get one in #113 (see Grimdark naming); after that every entry needs a name, an abbreviation and a short text. - [E] Built with #113: every entry folder holds
texts.de.tsbesideentry.ts;scripts/gen-features.tsstops on an entry folder without either, and lists the text files asTEXTSin the generated index besideENTRIES.src/core/text.tsholds the typeEntryText(n,ab,ds, optionallt) andtext(key), undefined for a key that is no entry; server and browser read every name, abbreviation, short and long text through it, andBuildingDef,ResearchDef,ShipDefandDefenseDefhold no text. Stryker leavessrc/features/**/texts.de.tsout likesrc/core/texts.ts;src/core/text.tsis mutated.src/core/text.test.tsfails on a missing name, abbreviation or short text, an abbreviation used twice, a text file without an entry and a text field in a rule. - [E] Choices of #113 within the decisions above, confirmed by the
owner (2026-11-13): each
texts.de.tsexports one objecttextstyped withEntryText(not single exportsn,ab, …), so the compiler checks every file on its own; the index has its own listTEXTSinstead of a third element inENTRIES; the accessor is its own filetext.ts, becausetexts.tsis not mutated. - [E] Decided for #116 (owner, 2026-11-14): every mission folder holds a
texts.de.tswith its name; the generator lists them asMISSION_TEXTS; the accessormissionText(m)stands next totext(key), so thattext('spy')stays the research.src/core/texts.tsis removed, andMISSIONmoves fromcatalog.tstosrc/core/missions.ts. - [E] Built with #116:
src/features/missions/<m>/texts.de.tsexportstextstyped withMissionText(n, the name), like the entry texts;missionText(m)is insrc/core/text.ts, undefined for a name that is no mission.MISSION(src/core/missions.ts) builds the names in the order of the rules;catalog.tsre-exports it for the existing imports of the tests. Stryker leaves the mission texts out through the existing globsrc/features/**/texts.de.ts.