mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7805] [MERGED] feat(i18n): localize tracker slice validation errors #7933
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7933
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7805
Author: @SpicyMarinara
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/7738-localize-tracker-errors📝 Commits (1)
e3ac4eefeat(i18n): localize tracker slice validation errors📊 Changes
8 files changed (+241 additions, -51 deletions)
View changed files
📝
packages/client/src/components/chat/AgentSuiteModal.tsx(+8 -3)📝
packages/client/src/components/modals/GameStateEditorModal.tsx(+4 -1)📝
packages/client/src/lib/agent-suite-tracker-slices.ts(+86 -15)📝
packages/client/src/lib/state-editor/game-state-editor-source.ts(+8 -5)📝
packages/client/src/localization/locales/en.json(+17 -0)📝
packages/shared/src/utils/inventory-tracker-rows.ts(+43 -10)📝
scripts/regressions/open-issues.regression.ts(+70 -17)📝
scripts/regressions/state-editor.regression.ts(+5 -0)📄 Description
Linked issue
Closes #7738
Why this change
AGENT_SUITE_TRACKER_SLICESas hard-coded English. People using another language saw English in both editors.open-issues.regression.tspinned their exact text.What changed
buildPatchinpackages/client/src/lib/agent-suite-tracker-slices.tsnow returns a typedTrackerSliceErrorcode (notObject/notArraywith the field,missingInventoryGroups, orinvalidInventoryRowwith the group and the row problem) instead of an English sentence.trackerSliceErrorMessage, turns a code into aui.trackerData.errors.*key with its parameters (group,index,field). Agent Suite (AgentSuiteModal.tsx) and the State Editor's game-state modal (GameStateEditorModal.tsx, still prefixed with the section label) both use it.trackerSlicePatchErrorreplaces the two copies of the"error" in patchcheck.findInventoryTrackerRowProblemreturns the row problem as a code.findInvalidInventoryTrackerRowkeeps its English string output (the server andprompt.regression.tsstill use it) and is now built on the new function, so the row rules live in one place.en.json: 17 new keys with the same English wording users see today. Community locale packs are untouched and fall back to English.open-issues.regression.tstracker assertions now pin exact codes (deep-equal, stricter than the old regex matches). New checks: every key inTRACKER_SLICE_ERROR_KEYSexists inen.json, and each error (all 17 cases) renders through the mapper to the exact English text from before.state-editor.regression.tsalso checks the forwarded error code.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent (results):
pnpm build:shared && node ./scripts/run-regressions.mjs --filter open-issues: 1/1 passednode ./scripts/run-regressions.mjs --filter state-editor: 1/1 passednode ./scripts/run-regressions.mjs --filter prompt: 17/17 passed (covers the shared row validator's English output)pnpm check(includespnpm localization:check): exit 0 (one pre-existing lint warning inHomeProfessorMariChat.tsx, unrelated)Manual verification notes
{}shows "Present characters must be a JSON array", as before.{"currencies": [], "equipped": [], "inventory": [{"name": "Rope", "qty": 0}]}showsInventory Tracker "inventory": row 0 has a "qty" below 1.{}shows "Active Quests: Active quests must be a JSON array".ui.trackerData.errors.*keys.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No user-facing docs changed.
UI evidence (if applicable)
Error text is unchanged in English; no visual change.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.