Skip to content

Add generated drive catalog with localized drive metadata #53

Description

@FennexFox

Problem

The repository already keeps normalized repo-local snapshots for research and ship/module data:

  • data/generated/research_catalog.json
  • data/generated/ship_catalog.json

However, the core drive comparison data still relies on drive, power plant, and radiator templates being processed directly into the published chart output. In practice, docs/index.html and its embedded DATA can become the durable source for normal UI-only rebuilds, even though docs/** is generated output rather than project source.

This makes the data pipeline harder to reason about and complicates upcoming localization work. For example, some drive names in raw datafiles differ from the current Terra Invicta localization strings. The Poseidon family is a visible case where raw data still exposes older Neutron Flux-style names. Drive descriptions such as TIDriveTemplate.description.<dataName> also exist in localization and should be available to the UI, especially in the right-side detail card.

Proposed direction

Introduce a repo-local generated drive catalog, preferably:

data/generated/drive_catalog.json

The catalog should normalize the game-data inputs currently consumed by the drive comparison build path, including:

  • drive templates
  • power plant templates
  • radiator templates
  • stable raw dataName identifiers
  • raw/fallback display names
  • localized drive display names, where available
  • localized drive descriptions, where available
  • raw aliases/fallback metadata useful for search/debugging
  • source fingerprints and detected game version metadata, where appropriate

The chart builder should consume this repo-local catalog when rebuilding the page, so normal builds do not need the local Terra Invicta install and do not need to treat docs/index.html embedded DATA as the primary source of truth.

Intended build model

npm run build
  uses repo-local generated catalogs
  rebuilds docs/index.html and client assets

npm run build:from-game
  reads the local Terra Invicta install
  regenerates data/generated/*.json catalogs
  rebuilds docs/index.html

The local game install remains the canonical external source, but the app's project-local source of truth should be the normalized generated catalog snapshot.

Localization behavior

When building the drive catalog from a local Terra Invicta install, resolve drive localization keys such as:

TIDriveTemplate.displayName.<dataName>
TIDriveTemplate.description.<dataName>

For example:

TIDriveTemplate.displayName.ApexSolidRocketx1=Apex Solid Rocket x1
TIDriveTemplate.description.ApexSolidRocketx1=Powerful but inefficient rocket that mixes polybutadiene acrylonitrile with an ammonium perchlorate oxidizer to produce thrust.

The catalog should preserve stable identity separately from display text. Do not replace internal IDs with localized names.

Recommended conceptual shape:

{
  "dataName": "ApexSolidRocketx1",
  "rawDisplayName": "Apex Solid Rocket x1",
  "displayName": {
    "en": "Apex Solid Rocket x1"
  },
  "description": {
    "en": "Powerful but inefficient rocket that mixes polybutadiene acrylonitrile with an ammonium perchlorate oxidizer to produce thrust."
  }
}

Exact schema may differ if the existing project conventions suggest a better shape.

Scope

Include:

  • Add or extend a drive catalog generation path.
  • Keep raw game template files out of the repo.
  • Store only normalized/minimal fields needed by the app.
  • Preserve stable drive IDs and current chart behavior.
  • Include localized TIDriveTemplate.displayName.<dataName> fields when available.
  • Include localized TIDriveTemplate.description.<dataName> fields when available.
  • Keep fallback behavior for missing localization.
  • Document how the catalog differs from generated docs/** output.

Exclude:

  • Do not vendor raw Terra Invicta template files.
  • Do not vendor full localization files wholesale.
  • Do not rewrite the full app UI localization system from issue Create translator-friendly localization catalog workflow #51.
  • Do not change preset/localStorage schema unless strictly necessary.
  • Do not make broad visual/UI changes in this PR.

Relationship to issue #51

This is a prerequisite/data-pipeline slice for localization work, but it should remain separate from the broader translator-friendly UI localization workflow in #51.

Issue #51 can later consume this catalog structure for drive display names and descriptions, while continuing to address UI copy localization separately.

Acceptance criteria

  • A repo-local generated drive catalog exists.
  • Full game-data rebuild regenerates the drive catalog from the local Terra Invicta install.
  • Normal build can rebuild the page from repo-local generated catalogs without reading the local game install.
  • docs/index.html is treated as generated output, not the durable data source.
  • Drive IDs remain stable.
  • Existing chart behavior is preserved.
  • Drive display-name localization fields are represented in the catalog when available.
  • Drive description localization fields are represented in the catalog when available.
  • Missing localization falls back to existing names and existing detail-card behavior.
  • Build and verification commands pass, or unrelated/known limitations are documented.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions