[GH-ISSUE #4087] [Issue]: Extracted UI fragments cannot compose correct sentences in some languages #2212

Closed
opened 2026-10-21 05:46:19 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @mallang0723 on GitHub (Jul 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4087

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The static JSX localization migration split some UI sentences into several
locale keys. Each key is fine on its own, but the composed sentence cannot
be expressed correctly in languages whose grammar differs from English, and
a translator cannot fix it from the locale file. I hit four distinct
patterns while completing the Korean catalog.

Expected behavior

A translator can produce a correct sentence for every user-visible string
by editing only their locale file.

Actual behavior

Four patterns block that. Counts are as of 30c647f5c on staging.

1. The singular branch is a hardcoded empty string.
packages/client/src/components/agents/CustomAgentRepositoriesModal.tsx:81

value3: preview.changes.length === 1 ? "" : localizeUi("ui.noodle.stageprofileview.s")

The plural suffix is a locale key (ui.noodle.stageprofileview.s, English
value "s") but the singular branch is a literal "", so there is no key
to translate. That key appears at 114 call sites and
ui.lorebooks.lorebookeditor.es at 4.

  • Expected (ko): 에이전트 3개 삭제됨
  • Actual (ko): 에이전트 3개s 삭제됨

Korean has no grammatical number, so no value for "s" is correct. The
locale check requires every interpolation token to be preserved and rejects
empty strings, so this cannot be solved in ko.json.

2. One word split across two locale keys.
packages/client/src/components/lorebooks/LorebookEditor.tsx:2863 — the
host string is Re-vectorize all {{value1}} vectorizable entr{{value2}} with {{value3}}?, splitting the noun into entr + y/ies. Leaving the
fragments in English renders as 항목 3개ies. 8 call sites across 4
fragment pairs.

Both branches are keys here, so I could work around it by translating both
variants to the Korean counter 개 and letting the host sentence carry the
token. That only works because Korean collapses the two forms.

3. One key used in two grammatical roles.
ui.game.gamesurfacecomponent.no (English "No") is both a Yes/No button
label (SceneBanner.tsx:190, :236, GameSurface.tsx:11947) and the first
word of a sentence (AgentsPanel.tsx:999,
SpriteGenerationModal.tsx:1760). Korean needs 아니요 for the button but
expresses sentence negation at the end of the clause.

  • Expected (ko): 동영상 생성 연결이 없습니다.
  • Actual (ko): 아니요 동영상 생성 연결이 없습니다.

ui.agents.agentcatalogview.installed and ui.agents.agenteditor.use have
the same problem.

4. Missing separator between adjacent fragments.
packages/client/src/components/modals/STBulkImportModal.tsx:668
concatenates two fragments with no separator, and the second starts with
·. This one is visible in English too.

  • Expected: Custom or user preset · modified Mar 1, 2026
  • Actual: Custom or user preset· modified Mar 1, 2026

Steps to reproduce

  1. Set the interface language to Korean in Settings > General > App
    Behavior > Language.
  2. For 1: open an agent repository with more than one pending change and
    read the confirmation text.
  3. For 3: open the sprite generation modal with no image generation
    connection configured.
  4. For 4: open the SillyTavern bulk import modal and look at a preset row
    that has a modified date. Reproduces with the interface in English.

Environment

  • Marinara Engine version: 2.3.5
  • Install type: source
  • OS + version: Linux (Arch, kernel 7.1.4)
  • Browser or app shell: Chromium 150.0.7871.128

Additional context

en.json already uses i18next plural keys (_one / _other) correctly in
about 60 places, so the infrastructure is there; it is the migrated strings
that are inconsistent. Extracting whole sentences rather than grammatical
fragments would also address 2 and 3.

Patterns 1 and 3 are invisible in English, which is probably why they
survived the migration. Pattern 4 is not.

I am not sure what scope you would want, and these four could reasonably be
separate PRs. Happy to help with whichever part is useful, including the
Korean side once the keys settle — and equally fine if you would rather
handle it yourselves.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @mallang0723 on GitHub (Jul 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4087 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The static JSX localization migration split some UI sentences into several locale keys. Each key is fine on its own, but the composed sentence cannot be expressed correctly in languages whose grammar differs from English, and a translator cannot fix it from the locale file. I hit four distinct patterns while completing the Korean catalog. ## Expected behavior A translator can produce a correct sentence for every user-visible string by editing only their locale file. ## Actual behavior Four patterns block that. Counts are as of `30c647f5c` on `staging`. **1. The singular branch is a hardcoded empty string.** `packages/client/src/components/agents/CustomAgentRepositoriesModal.tsx:81` ```jsx value3: preview.changes.length === 1 ? "" : localizeUi("ui.noodle.stageprofileview.s") ``` The plural suffix is a locale key (`ui.noodle.stageprofileview.s`, English value `"s"`) but the singular branch is a literal `""`, so there is no key to translate. That key appears at 114 call sites and `ui.lorebooks.lorebookeditor.es` at 4. - Expected (ko): `에이전트 3개 삭제됨` - Actual (ko): `에이전트 3개s 삭제됨` Korean has no grammatical number, so no value for `"s"` is correct. The locale check requires every interpolation token to be preserved and rejects empty strings, so this cannot be solved in `ko.json`. **2. One word split across two locale keys.** `packages/client/src/components/lorebooks/LorebookEditor.tsx:2863` — the host string is `Re-vectorize all {{value1}} vectorizable entr{{value2}} with {{value3}}?`, splitting the noun into `entr` + `y`/`ies`. Leaving the fragments in English renders as `항목 3개ies`. 8 call sites across 4 fragment pairs. Both branches are keys here, so I could work around it by translating both variants to the Korean counter `개` and letting the host sentence carry the token. That only works because Korean collapses the two forms. **3. One key used in two grammatical roles.** `ui.game.gamesurfacecomponent.no` (English `"No"`) is both a Yes/No button label (`SceneBanner.tsx:190`, `:236`, `GameSurface.tsx:11947`) and the first word of a sentence (`AgentsPanel.tsx:999`, `SpriteGenerationModal.tsx:1760`). Korean needs `아니요` for the button but expresses sentence negation at the end of the clause. - Expected (ko): `동영상 생성 연결이 없습니다.` - Actual (ko): `아니요 동영상 생성 연결이 없습니다.` `ui.agents.agentcatalogview.installed` and `ui.agents.agenteditor.use` have the same problem. **4. Missing separator between adjacent fragments.** `packages/client/src/components/modals/STBulkImportModal.tsx:668` concatenates two fragments with no separator, and the second starts with `·`. **This one is visible in English too.** - Expected: `Custom or user preset · modified Mar 1, 2026` - Actual: `Custom or user preset· modified Mar 1, 2026` ## Steps to reproduce 1. Set the interface language to Korean in Settings > General > App Behavior > Language. 2. For 1: open an agent repository with more than one pending change and read the confirmation text. 3. For 3: open the sprite generation modal with no image generation connection configured. 4. For 4: open the SillyTavern bulk import modal and look at a preset row that has a modified date. Reproduces with the interface in English. ## Environment - Marinara Engine version: 2.3.5 - Install type: source - OS + version: Linux (Arch, kernel 7.1.4) - Browser or app shell: Chromium 150.0.7871.128 ## Additional context `en.json` already uses i18next plural keys (`_one` / `_other`) correctly in about 60 places, so the infrastructure is there; it is the migrated strings that are inconsistent. Extracting whole sentences rather than grammatical fragments would also address 2 and 3. Patterns 1 and 3 are invisible in English, which is probably why they survived the migration. Pattern 4 is not. I am not sure what scope you would want, and these four could reasonably be separate PRs. Happy to help with whichever part is useful, including the Korean side once the keys settle — and equally fine if you would rather handle it yourselves. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:46:19 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 25, 2026):

🔧 @SpicyMarinara is handling this in draft PR #4093 as part of the current open-issue sweep. The PR targets staging; implementation and validation are in progress.

<!-- gh-comment-id:5079230948 --> @SpicyMarinara commented on GitHub (Jul 25, 2026): 🔧 @SpicyMarinara is handling this in draft PR #4093 as part of the current open-issue sweep. The PR targets `staging`; implementation and validation are in progress.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 25, 2026):

Resolved by #4093 and merged into staging in commit 917c3128a4.

<!-- gh-comment-id:5079475421 --> @SpicyMarinara commented on GitHub (Jul 25, 2026): Resolved by #4093 and merged into staging in commit 917c3128a416e4a87e2b471a82446f16a442ad3d.
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#2212
No description provided.