[PR #8629] [MERGED] fix(game): translate ruleset layer names in Game setup #8712

Closed
opened 2026-11-07 17:39:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8629
Author: @kolacheee
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @kolacheee

Base: staging ← Head: claude/project-thread-in9wee


📝 Commits (1)

  • 951aa80 fix(game): read ruleset layer names through the ruleset's translation in Game setup (#8628)

📊 Changes

2 files changed (+71 additions, -34 deletions)

View changed files

📝 packages/client/src/components/game/GameSetupRulesChooser.tsx (+56 -34)
📝 scripts/regressions/ruleset-layers-client.regression.ts (+15 -0)

📄 Description

Linked issue

Closes #8628

Why this change

In the Rules step of Game setup, a ruleset layer's toggle (for example the 5e SRD's Low magic) showed its name and summary in English even when the ruleset ships a language pack for the UI language. The game's sheet already showed the same names translated.

What changed

  • The layer toggles moved into their own small component that reads the ruleset's translation with useRulesetDefinitionText, the same lookup the sheet uses. The layer name, its summary and the "ruled out by" name go through it. The ids the toggles send are unchanged.
  • ruleset-layers-client.regression.ts now checks that the toggles read those words through the translation. It fails on the old chooser.

Validation

  • node scripts/run-regressions.mjs --filter scripts/regressions/ruleset-layers-client.regression.ts passes (and fails with the old chooser)
  • Client tsc --noEmit, the client-lanes tsconfig, ESLint and Prettier on the changed files pass
  • pnpm check passes locally
  • Ran the app, clicked through the changes manually

Manual verification notes

  • Not clicked through in a browser. With a non-English UI and the SRD language pack installed, the Low magic toggle should read in that language once the SRD pack carries the strings (SRD 1.0.3).

Docs and release impact

  • No docs changes needed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8629 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/project-thread-in9wee` --- ### 📝 Commits (1) - [`951aa80`](https://github.com/Pasta-Devs/Marinara-Engine/commit/951aa807cf4ff68a6c9da230ea601e1f51957d41) fix(game): read ruleset layer names through the ruleset's translation in Game setup (#8628) ### 📊 Changes **2 files changed** (+71 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameSetupRulesChooser.tsx` (+56 -34) 📝 `scripts/regressions/ruleset-layers-client.regression.ts` (+15 -0) </details> ### 📄 Description ## Linked issue Closes #8628 ## Why this change In the Rules step of Game setup, a ruleset layer's toggle (for example the 5e SRD's Low magic) showed its name and summary in English even when the ruleset ships a language pack for the UI language. The game's sheet already showed the same names translated. ## What changed - The layer toggles moved into their own small component that reads the ruleset's translation with `useRulesetDefinitionText`, the same lookup the sheet uses. The layer name, its summary and the "ruled out by" name go through it. The ids the toggles send are unchanged. - `ruleset-layers-client.regression.ts` now checks that the toggles read those words through the translation. It fails on the old chooser. ## Validation - [x] `node scripts/run-regressions.mjs --filter scripts/regressions/ruleset-layers-client.regression.ts` passes (and fails with the old chooser) - [x] Client `tsc --noEmit`, the client-lanes tsconfig, ESLint and Prettier on the changed files pass - [ ] `pnpm check` passes locally - [ ] Ran the app, clicked through the changes manually ### Manual verification notes - Not clicked through in a browser. With a non-English UI and the SRD language pack installed, the Low magic toggle should read in that language once the SRD pack carries the strings (SRD 1.0.3). ## Docs and release impact - [x] No docs changes needed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:39:09 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8712
No description provided.