mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6688] [MERGED] fix(narration): strip internal vn tags from translation source and ha… #7286
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#7286
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/6688
Author: @menemorofaan
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/vn-dialogue-translation-tags📝 Commits (6)
beae328fix(narration): strip internal vn tags from translation source and harden dialogue parser7f14ea4Merge branch 'staging' into fix/vn-dialogue-translation-tags63e65b4fix(narration): isolate inline readable placeholders with newlines1030dbeMerge branch 'staging' into fix/vn-dialogue-translation-tags07dd518Merge branch 'staging' into fix/vn-dialogue-translation-tags087543btest(game): cover translated dialogue tags and inline readables📊 Changes
3 files changed (+84 additions, -29 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
e2e/game-translation-edits.e2e.ts(+67 -0)📝
packages/client/src/components/game/GameNarration.tsx(+15 -29)📄 Description
Linked issue
Closes #6687
Why this change
Follow-up to #6615 / #6618. In Game mode, unedited GM messages bypass
getGameTranslationSourcesegment reassembly and pass raw markup like[The Unnamed] [main] [patient]: "..."directly to external translators.Translators often translate or alter these internal channel and sprite tokens (e.g.
[главный] [пациент]). Upon receiving the translated text:partyLineRegexrejects the line because translated channel tokens no longer match the English keywords (main,side, etc.).compactDialogueRegexreject lines having 3 bracketed tokens before the colon (they only supported up to 2 brackets).What changed
packages/client/src/components/game/GameNarration.tsx:getGameTranslationSource(): Gated the earlyplainSource()return to non-GM messages (if (!isGmMessage && !hasGameSegmentOverrides(...))). Clean segment reassembly now runs consistently for all GM messages, ensuring dialogue lines are stripped of internal channel and sprite tags before translation, emitting strictly[${withEdit.speaker}]: ${dialogueBody}(wheredialogueBodyhandles its own quote wrapping).parseNarrationSegments(): Hardened both duplicated definitions ofcompactDialogueRegex(lines ~6592 and ~6768) to tolerate arbitrary bracketed tokens before the colon while preserving the 3 capture groups (dialogueMatch[1]speaker,dialogueMatch[2]expression/sprite,dialogueMatch[3]dialogue text) required by downstream logic. This prevents multi-bracketed translated dialogue lines from dropping into fallback narration.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkcompleted with 0 errors.[Speaker] [main] [emotion]: "..."):Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
No UI layout changes — internal translation source sanitization and regex parsing resilience.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.