ui/phase-23: turn-report view with twenty sections and TOC
Replaces the Phase 10 report stub with a scrollable orchestrator that renders every FBS array as a dedicated section (galaxy summary, votes, player status, my/foreign sciences, my/foreign ship classes, battles, bombings, approaching groups, my/foreign/uninhabited/unknown planets, ships in production, cargo routes, my fleets, my/foreign/unidentified ship groups). A sticky table of contents (a <select> on mobile), "back to map" affordance, IntersectionObserver-driven active-section highlight, and SvelteKit Snapshot-based scroll save/restore round out the view. GameReport gains six new fields (players, otherScience, otherShipClass, battleIds, bombings, shipProductions); decodeReport, the synthetic- report loader, the e2e fixture builder, and EMPTY_SHIP_GROUPS extend in lockstep. ~90 new i18n keys land in en + ru together. The legacy-report parser is extended to populate the new sections from the dg/gplus text formats (Your Sciences, <Race> Sciences, <Race> Ship Types, Bombings, Ships In Production). Ships-in-production prod_used is derived through a new pkg/calc.ShipBuildCost helper; the engine's controller.ProduceShip refactors to call the same helper without any behaviour change (engine tests stay unchanged and green). Battles remain in the parser's Skipped list — the legacy text carries no stable per-battle UUID. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -408,6 +408,143 @@ const en = {
|
||||
"game.inspector.planet.ship_groups.row.mass": "mass {mass}",
|
||||
"game.inspector.planet.ship_groups.race.unknown": "unknown",
|
||||
"game.inspector.planet.ship_groups.race.foreign": "foreign",
|
||||
|
||||
"game.report.loading": "loading report…",
|
||||
"game.report.back_to_map": "back to map",
|
||||
"game.report.toc.title": "sections",
|
||||
"game.report.toc.mobile_label": "jump to section",
|
||||
"game.report.section.galaxy_summary.title": "galaxy summary",
|
||||
"game.report.section.galaxy_summary.field.turn": "turn",
|
||||
"game.report.section.galaxy_summary.field.size": "map size",
|
||||
"game.report.section.galaxy_summary.field.planets": "planet count",
|
||||
"game.report.section.galaxy_summary.field.race": "your race",
|
||||
"game.report.section.votes.title": "votes",
|
||||
"game.report.section.votes.mine": "my votes",
|
||||
"game.report.section.votes.target": "I vote for",
|
||||
"game.report.section.votes.target_none": "(no recipient yet)",
|
||||
"game.report.section.votes.received_header": "votes received last tally",
|
||||
"game.report.section.votes.column.race": "race",
|
||||
"game.report.section.votes.column.votes": "votes received",
|
||||
"game.report.section.votes.empty": "no votes cast yet",
|
||||
"game.report.section.player_status.title": "player status",
|
||||
"game.report.section.player_status.column.name": "name",
|
||||
"game.report.section.player_status.column.drive": "drive %",
|
||||
"game.report.section.player_status.column.weapons": "weapons %",
|
||||
"game.report.section.player_status.column.shields": "shields %",
|
||||
"game.report.section.player_status.column.cargo": "cargo %",
|
||||
"game.report.section.player_status.column.population": "population",
|
||||
"game.report.section.player_status.column.industry": "production",
|
||||
"game.report.section.player_status.column.planets": "planets",
|
||||
"game.report.section.player_status.column.votes": "votes received",
|
||||
"game.report.section.player_status.local_marker": "you",
|
||||
"game.report.section.player_status.extinct_marker": "RIP",
|
||||
"game.report.section.my_sciences.title": "my sciences",
|
||||
"game.report.section.my_sciences.column.name": "name",
|
||||
"game.report.section.my_sciences.column.drive": "drive %",
|
||||
"game.report.section.my_sciences.column.weapons": "weapons %",
|
||||
"game.report.section.my_sciences.column.shields": "shields %",
|
||||
"game.report.section.my_sciences.column.cargo": "cargo %",
|
||||
"game.report.section.my_sciences.empty": "no sciences defined yet",
|
||||
"game.report.section.foreign_sciences.title": "foreign sciences",
|
||||
"game.report.section.foreign_sciences.race_header": "{race} sciences",
|
||||
"game.report.section.foreign_sciences.empty": "no foreign sciences observed yet",
|
||||
"game.report.section.my_ship_classes.title": "my ship classes",
|
||||
"game.report.section.my_ship_classes.column.name": "name",
|
||||
"game.report.section.my_ship_classes.column.drive": "drive",
|
||||
"game.report.section.my_ship_classes.column.armament": "armament",
|
||||
"game.report.section.my_ship_classes.column.weapons": "weapons",
|
||||
"game.report.section.my_ship_classes.column.shields": "shields",
|
||||
"game.report.section.my_ship_classes.column.cargo": "cargo",
|
||||
"game.report.section.my_ship_classes.empty": "no ship classes designed yet",
|
||||
"game.report.section.foreign_ship_classes.title": "foreign ship classes",
|
||||
"game.report.section.foreign_ship_classes.race_header": "{race} ship classes",
|
||||
"game.report.section.foreign_ship_classes.column.mass": "mass",
|
||||
"game.report.section.foreign_ship_classes.empty": "no foreign ship classes observed yet",
|
||||
"game.report.section.battles.title": "battles",
|
||||
"game.report.section.battles.empty": "no battles last turn",
|
||||
"game.report.section.battles.id_label": "battle",
|
||||
"game.report.section.bombings.title": "bombings",
|
||||
"game.report.section.bombings.empty": "no bombings last turn",
|
||||
"game.report.section.bombings.column.planet": "planet",
|
||||
"game.report.section.bombings.column.owner": "owner",
|
||||
"game.report.section.bombings.column.attacker": "attacker",
|
||||
"game.report.section.bombings.column.production": "production",
|
||||
"game.report.section.bombings.column.industry": "industry",
|
||||
"game.report.section.bombings.column.population": "population",
|
||||
"game.report.section.bombings.column.colonists": "colonists",
|
||||
"game.report.section.bombings.column.industry_stockpile": "industry stockpile ($)",
|
||||
"game.report.section.bombings.column.materials_stockpile": "materials stockpile (M)",
|
||||
"game.report.section.bombings.column.attack_power": "attack power",
|
||||
"game.report.section.bombings.wiped": "wiped",
|
||||
"game.report.section.approaching_groups.title": "approaching groups",
|
||||
"game.report.section.approaching_groups.empty": "no approaching groups",
|
||||
"game.report.section.approaching_groups.column.from": "from",
|
||||
"game.report.section.approaching_groups.column.to": "to",
|
||||
"game.report.section.approaching_groups.column.distance": "distance",
|
||||
"game.report.section.approaching_groups.column.speed": "speed",
|
||||
"game.report.section.approaching_groups.column.mass": "mass",
|
||||
"game.report.section.my_planets.title": "my planets",
|
||||
"game.report.section.my_planets.empty": "no planets owned yet",
|
||||
"game.report.section.my_planets.column.number": "#",
|
||||
"game.report.section.my_planets.column.name": "name",
|
||||
"game.report.section.my_planets.column.coordinates": "x, y",
|
||||
"game.report.section.my_planets.column.size": "size",
|
||||
"game.report.section.my_planets.column.resources": "resources",
|
||||
"game.report.section.my_planets.column.population": "population",
|
||||
"game.report.section.my_planets.column.industry": "production",
|
||||
"game.report.section.my_planets.column.industry_stockpile": "$",
|
||||
"game.report.section.my_planets.column.materials_stockpile": "M",
|
||||
"game.report.section.my_planets.column.colonists": "colonists",
|
||||
"game.report.section.my_planets.column.production": "current production",
|
||||
"game.report.section.my_planets.column.free_industry": "free",
|
||||
"game.report.section.ships_in_production.title": "ships in production",
|
||||
"game.report.section.ships_in_production.empty": "no ships in production",
|
||||
"game.report.section.ships_in_production.column.planet": "planet",
|
||||
"game.report.section.ships_in_production.column.class": "class",
|
||||
"game.report.section.ships_in_production.column.cost": "cost",
|
||||
"game.report.section.ships_in_production.column.prod_used": "invested",
|
||||
"game.report.section.ships_in_production.column.percent": "percent",
|
||||
"game.report.section.ships_in_production.column.free": "free industry",
|
||||
"game.report.section.cargo_routes.title": "cargo routes",
|
||||
"game.report.section.cargo_routes.empty": "no cargo routes set",
|
||||
"game.report.section.cargo_routes.column.source": "source",
|
||||
"game.report.section.cargo_routes.column.load": "load type",
|
||||
"game.report.section.cargo_routes.column.destination": "destination",
|
||||
"game.report.section.foreign_planets.title": "foreign planets",
|
||||
"game.report.section.foreign_planets.empty": "no foreign planets observed",
|
||||
"game.report.section.foreign_planets.column.owner": "owner",
|
||||
"game.report.section.uninhabited_planets.title": "uninhabited planets",
|
||||
"game.report.section.uninhabited_planets.empty": "no uninhabited planets observed",
|
||||
"game.report.section.unknown_planets.title": "unknown planets",
|
||||
"game.report.section.unknown_planets.empty": "no unknown planets",
|
||||
"game.report.section.my_fleets.title": "my fleets",
|
||||
"game.report.section.my_fleets.empty": "no fleets created yet",
|
||||
"game.report.section.my_fleets.column.name": "name",
|
||||
"game.report.section.my_fleets.column.groups": "groups",
|
||||
"game.report.section.my_fleets.column.state": "state",
|
||||
"game.report.section.my_fleets.column.destination": "destination",
|
||||
"game.report.section.my_fleets.column.origin": "origin",
|
||||
"game.report.section.my_fleets.column.range": "range",
|
||||
"game.report.section.my_fleets.column.speed": "speed",
|
||||
"game.report.section.my_ship_groups.title": "my ship groups",
|
||||
"game.report.section.my_ship_groups.empty": "no ship groups yet",
|
||||
"game.report.section.my_ship_groups.column.id": "id",
|
||||
"game.report.section.my_ship_groups.column.class": "class",
|
||||
"game.report.section.my_ship_groups.column.count": "count",
|
||||
"game.report.section.my_ship_groups.column.cargo": "cargo",
|
||||
"game.report.section.my_ship_groups.column.state": "state",
|
||||
"game.report.section.my_ship_groups.column.destination": "destination",
|
||||
"game.report.section.my_ship_groups.column.origin": "origin",
|
||||
"game.report.section.my_ship_groups.column.range": "range",
|
||||
"game.report.section.my_ship_groups.column.speed": "speed",
|
||||
"game.report.section.my_ship_groups.column.mass": "mass",
|
||||
"game.report.section.my_ship_groups.column.fleet": "fleet",
|
||||
"game.report.section.foreign_ship_groups.title": "foreign ship groups",
|
||||
"game.report.section.foreign_ship_groups.empty": "no foreign ship groups observed",
|
||||
"game.report.section.unidentified_groups.title": "unidentified groups",
|
||||
"game.report.section.unidentified_groups.empty": "no unidentified groups",
|
||||
"game.report.section.unidentified_groups.column.x": "x",
|
||||
"game.report.section.unidentified_groups.column.y": "y",
|
||||
} as const;
|
||||
|
||||
export default en;
|
||||
|
||||
Reference in New Issue
Block a user