Skip to content

fix(i18n): localize raw ids, enums and literals in in-game selection lists - #674

Merged
marceld23 merged 1 commit into
mainfrom
fix/ingame-menu-untranslated-lists
Aug 2, 2026
Merged

fix(i18n): localize raw ids, enums and literals in in-game selection lists#674
marceld23 merged 1 commit into
mainfrom
fix/ingame-menu-untranslated-lists

Conversation

@marceld23

Copy link
Copy Markdown
Owner

closes #672

Playing in German, several selection lists in the in-game (Tab) menu and the Esc settings still showed English. The en/de locale tables were already key-complete — these strings simply never went through the Localizer (raw data ids, enum names, hardcoded literals).

Changes

Client

  • New CraftingTechShipUI.IdLabel(prefix, id): resolves prefix + id.ToLowerInvariant() and falls back to the raw id when no key exists, so future data/enum values degrade to today's behaviour instead of showing a bracketed key.
  • Tech tab category sidebar: raw blueprints.json categories → ui.tech.cat_* (9 keys).
  • Map tab (list rows + detail pane): raw NetBody.Kind/Status enum names → ui.map.kind_* / ui.map.status_* (8 keys).
  • Mission creation: Mine/Collect/Deliver cycler + objective rows → ui.missions.objtype_*; PmTypes stays the wire value (NetMissionObjective.Type).
  • Story log: [vega]/[sps]/… tags → lore.cat.* keys in the story pack's own locale files (data/stories/vega_protocol/locales/).
  • Crafting detail pane: Max button → ui.craft.max.
  • Settings: quality preset raw enum (Potato/Low/Medium/High) → ui.settings.preset.*.
  • Arcade rail: Game.German ? "noch kein Rekord" : "no record yet"ui.arcade.no_record (also fixes the Italian locale silently getting English here).
  • Desc() guard was dead (s == key can never match Localizer.Get's [key] miss format) → now uses Localizer.Has; removed the inert ?? "{done}/{total}" fallbacks on the achievement templates.
  • VendorTradeUI.ItemName now parses composite item keys (dye/glow/shape suffixes) like the crafting menu, so a market recipe over a modified item can never render a bracketed key.

Server

  • Ruin A… and Guardian Core POI names are now localized per session locale (poi.ruin with a {0} letter placeholder, poi.guardian_core = „Wächterkern", consistent with the story's German terminology), matching the existing poi.treasure pattern.

Verification

  • dotnet build BlocksBeyondTheStars.CI.slnf -c Release -warnaserror — 0 warnings / 0 errors.
  • Fast-tier tests: 1334 server + 147 client passed, 0 failed (locale parity tests cover the new en/de keys).
  • Local Unity client build (worktree): completed, fresh BlocksBeyondTheStars.Client.dll; no generated files left to commit.

🤖 Generated with Claude Code

…lists (#672)

Several selection lists showed English on a German client because their
strings never reached the Localizer:

- Tech tab category sidebar: raw blueprints.json categories (ShipExpansion,
  Suit, ...) -> new ui.tech.cat_* keys via a new IdLabel(prefix, id) helper
  that falls back to the raw id for unknown values
- Map tab list + detail: raw NetBody.Kind/Status enum names -> ui.map.kind_*
  and ui.map.status_* keys
- Mission creation: Mine/Collect/Deliver cycler + objective rows localized
  via ui.missions.objtype_* (PmTypes stays the wire value)
- Story log: [vega]/[sps]/... tags -> lore.cat.* keys in the story pack's
  own locale files
- Crafting detail: "Max" button -> ui.craft.max
- Settings: quality preset enum (Potato/Low/Medium/High) ->
  ui.settings.preset.* keys
- Arcade: bilingual "no record yet" literal -> ui.arcade.no_record
- Server: Ruin A / Guardian Core POI names localized per session locale
  (poi.ruin, poi.guardian_core), matching the existing poi.treasure pattern
- Dead Desc() guard fixed (s == key never matches "[key]" misses -> use
  Localizer.Has), inert ?? fallbacks on the achievement templates removed
- VendorTradeUI.ItemName now parses composite item keys (dye/glow/shape)
  like the crafting menu

Co-Authored-By: Claude Fable 5 <[email protected]>
@marceld23
marceld23 force-pushed the fix/ingame-menu-untranslated-lists branch from 9d99cbd to 06e82c4 Compare August 2, 2026 21:25
@marceld23
marceld23 merged commit a2e5fa5 into main Aug 2, 2026
13 checks passed
@marceld23
marceld23 deleted the fix/ingame-menu-untranslated-lists branch August 2, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In-game menu: selection lists show raw English identifiers instead of localized text

1 participant