Skip to content

Content-fallback logging & server-message localization #427

Description

@marceld23

Two server-side content/localization gaps. The load-time content validator is strict and fails the server on any dangling reference — but two runtime paths silently paper over bad ids, and a large set of player-facing server messages bypasses the locale system entirely.

  • S19 — silent content fallbacks defeat the strict validator (good first issue). An unknown ship-layout block id silently becomes iron_wall (GameServerSpaceStructure.cs:193, ?? wall), and a board-mission template with a missing item silently reverts to template[0] (GameServerMissions.cs:466). Every current id resolves, so nothing is broken today — but a future data typo would ship invisibly instead of surfacing at load. Fix: log a warning (or fail validation) on the fallback path so missing ids become visible.
  • S20 — ~182 hardcoded-English server messages bypass the locale system. The game is required to be bilingual (DE/EN), and NPC greetings/hints already use Localize(session.Locale, key) — but ~182 operational messages are hardcoded English literals, e.g. Reject(session, "ctx", "Not enough materials to repair the ship.") and new ServerMessage { Text = "Alliance request declined." }. Spread over 27 GameServer/*.cs files; worst offenders: GameServer.cs (52), GameServerSpaceStructure.cs (20), GameServerSpeeders.cs (16), GameServerWrecks.cs (10). German players see English text for all of these. Fix: move the strings behind Localize(session.Locale, key) with keys added to en.json/de.json. Coordinate with 🌍 Localization: fill in missing or awkward translation keys #98.

Found in a static code audit of the server (internal finding IDs S19, S20).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: serverGameServer / Networking / WorldHost / Api / PersistenceauditSurfaced by the static bug-hunt audit (bugreports/bughunt.md)bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededpriority: lowCosmetic / latent / dormant hardening

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions