Skip to content

Localization Phase 1: production and Done buttons on tactical.* keys (1-4d) - #6306

Open
wholton wants to merge 2 commits into
l10n/phase1-modify-unitsfrom
l10n/phase1-production
Open

wholton wants to merge 2 commits into
l10n/phase1-modify-unitsfrom
l10n/phase1-production

Conversation

@wholton

@wholton wholton commented Dec 6, 2026

Copy link
Copy Markdown
Collaborator

Row 1-4d of the localization plan (docs/LOCALIZATION_PLAN.md §5.0): production and the Done* buttons. Stacked on #6305 (1-4c) → #6303 → #6302 → #6301; this PR targets the 1-4c branch, so the diff shows 1-4d only.

What moved (tactical.production.*, tactical.done.*, common.done*)

  • Produce buttons (Helper.getPlaceUnitButtons): ships with their reinforcements count, fighters, infantry and mechs on planets and in space, space dock and PDS placement, Self-Assembly Routines, Reset Build, Yin Spinner, the War Machine reminder.
  • Production summary (Helper.buildProducedUnitsMessage): the per-place header, the cost line and totals (ICU plurals for units and resources), the PRODUCTION and Bellum Gloriosum limits and warnings.
  • Placement notices (ButtonHelperModifyUnits place_ and placeOneNDone_): one ICU select per sentence for placed or produced; the Construction token, the Mahact agent prompt and its three buttons; Orbital Drop, Planetary Defense Nexus, Bellum Gloriosum and Rally the Horde follow-ups (the last two now share one helper each).
  • Done handler (DeleteButtonsButtonHandler): the payment prompt with its official cost reducers (Hegemonic Trade Policy, AI Development Algorithm, Sarween Tools, Sled Factories, Hacan hero), the command token allocation notices (an ICU select for the net gain line), the expected-gain warning, the Fog of War homework reminder, the Mercer offer and the end-turn prompt (reuses tactical.end.endTurn).
  • DoneButtonKind: each kind has a common.done*.button key, and red/bareRed/bareBlue take a language. The English label stays for legacyKindFromLabel, so buttons already posted still resolve. New Buttons.doneExhaustingPlanets(lang), doneExhaustingPlanetsSpitItOut(lang) and doneExhaustingPlanetsFinishComponentAction(lang); the three DONE_EXHAUSTING_PLANETS_* constants are @Deprecated until their other 46 callers move.

Homebrew texts stay literal (monuments, Rally to the Cause, Cloaked Fleets, Imperial Shipyard, Merged Replicators, Theodisi discounts, Moyin's Chosen, Tyris, Roh'Dhna...). Not in this PR: the spend summary (Helper.buildSpentThingsMessage) and the stored action summary.

Ratchet

New class lines ti4.helpers.Helper 34 and DeleteButtonsButtonHandler 6; ButtonHelperModifyUnits 88 → 80.

Visible changes (small, on purpose)

  • Construction notices name the structure by its emoji, like the placeOneNDone_ notices already did. The Mirveda PDS placed in space used to be announced as a space dock; it now says PDS.
  • placeOneNDone_ notices: "@player Placed 1 …" → "@player placed 1 …", and "produced a " → "produced 1 ".
  • "Your final command tokens allocation" → "command token allocation"; "heads up, bot thinks" → "the bot thinks".
  • Bellum Gloriosum: "ships capacity" → "ship's capacity". Rally the Horde ends "Press the button to resolve."
  • The end-turn prompt after a tactical build reads "use buttons to end turn, or do another action." (the 1-4b key).

Everything else is byte-identical.

Tests

  • ProductionMessagesTest: Done buttons keep their ids and English labels (and still resolve by label), produce-button labels, the production summary, placed and produced notices, and command token notices, each against the old string expression, Fog of War off and on. Intentional wording changes are marked in the test.
  • Full mvn verify with the Postgres tests: 3919 tests, 0 failures.

🤖 Generated with Claude Code

wholton and others added 2 commits December 6, 2026 03:17
Moves the produce buttons, the running production summary, the place_
and placeOneNDone_ notices, the Construction and Mahact agent prompts,
the payment prompt and the Done handler's command token notices onto
tactical.production.* and tactical.done.* keys. DoneButtonKind labels
come from common.done*.button keys through language-aware overloads;
the English label stays for the legacy label lookup. The three
DONE_EXHAUSTING_PLANETS_* constants get factory methods and are
deprecated. Homebrew texts stay literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant