studio: show the EU strings the page already defines (STUDIO-EU-STRINGS) #2339

Merged
syfyra merged 1 commit from upstream-pr/2339 into main 2026-12-01 15:19:44 +00:00
syfyra commented 2026-11-26 14:06:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by syfyra on 2026-11-26T14:06:28Z.


Claimed in the coordination issue as: STUDIO-EU-STRINGS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194265327)

What and why

viewer/studio.html (served by tools/gallery.py) has an RU/EU switch and an I18N table with both languages, but several entries were never applied, so after choosing EU the page kept Russian text:

Text on main Entry that existed but was unused
stats labels Модель / Категория / Полигонов (треугольников) / Вершин / Размер файла statModel, statCategory, statTriangles, statVertices, statSize
button Сброс камеры resetCamera
heading Галерея текстур (DDS & PNG) texHeading
chip Все (N) allCategories
N текстур найдено texCountSuffix
Текстуры не найдены / Ничего не найдено texNotFound / modelsNotFound
Показать все (N ещё), Ошибка загрузки текстур none: added as showAllTextures and texLoadError

applyTranslations now sets the stats labels, the button, the heading, the chip and the texture count; the model and texture lists, which already re-render on a switch, read their messages from I18N. The markup is unchanged apart from two ids (btn-reset-camera, tex-heading): each stats label is the text node in front of its value (<div>Модель: <b id="stat-name">), set the way the tab buttons' labels already are. Russian stays the default and reads exactly as before.

Left out on purpose: the category names (catNames exists, but the chips are built once per load and the names already carry English in brackets) and the model download alert (it sits in the lines #2100 changes).

Merges cleanly with the open studio PRs #1138, #1490, #2100, #2136, #2250 and with #2335 (STUDIO-MODEL-DETAILS, which adds translated rows to the same panel); with #2335 merged in, the studio tests pass 16/16.

Tested

Windows 11, Node 26.12.1, no game files:

  • node --test tests/test_viewer_studio.cjs: 13 pass. The new test loads an empty texture list and an empty model list in RU, switches to EU and checks all of the strings above, then the "show all" button with 81 textures and the load-error text. It fails on main (the labels stay Russian); the 12 existing tests pass.
  • scripts/check_no_game_data.py on both files.

GPUs tested: n/a (no GPU code)

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5511486637 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339). Originally posted by [syfyra](https://github.com/syfyra) on 2026-11-26T14:06:28Z. --- Claimed in the coordination issue as: STUDIO-EU-STRINGS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194265327) ### What and why `viewer/studio.html` (served by `tools/gallery.py`) has an RU/EU switch and an `I18N` table with both languages, but several entries were never applied, so after choosing EU the page kept Russian text: | Text on `main` | Entry that existed but was unused | |---|---| | stats labels Модель / Категория / Полигонов (треугольников) / Вершин / Размер файла | `statModel`, `statCategory`, `statTriangles`, `statVertices`, `statSize` | | button Сброс камеры | `resetCamera` | | heading Галерея текстур (DDS & PNG) | `texHeading` | | chip Все (N) | `allCategories` | | N текстур найдено | `texCountSuffix` | | Текстуры не найдены / Ничего не найдено | `texNotFound` / `modelsNotFound` | | Показать все (N ещё), Ошибка загрузки текстур | none: added as `showAllTextures` and `texLoadError` | `applyTranslations` now sets the stats labels, the button, the heading, the chip and the texture count; the model and texture lists, which already re-render on a switch, read their messages from `I18N`. The markup is unchanged apart from two ids (`btn-reset-camera`, `tex-heading`): each stats label is the text node in front of its value (`<div>Модель: <b id="stat-name">`), set the way the tab buttons' labels already are. Russian stays the default and reads exactly as before. Left out on purpose: the category names (`catNames` exists, but the chips are built once per load and the names already carry English in brackets) and the model download alert (it sits in the lines #2100 changes). Merges cleanly with the open studio PRs #1138, #1490, #2100, #2136, #2250 and with #2335 (STUDIO-MODEL-DETAILS, which adds translated rows to the same panel); with #2335 merged in, the studio tests pass 16/16. ### Tested Windows 11, Node 26.12.1, no game files: - `node --test tests/test_viewer_studio.cjs`: 13 pass. The new test loads an empty texture list and an empty model list in RU, switches to EU and checks all of the strings above, then the "show all" button with 81 textures and the load-error text. It fails on `main` (the labels stay Russian); the 12 existing tests pass. - `scripts/check_no_game_data.py` on both files. GPUs tested: n/a (no GPU code) AI-assisted: yes (Claude Code, Claude Opus 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lixonik commented 2026-11-26 15:43:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T15:43:55Z.

Review: COMMENTED


Windows 11/Node: 13/13 Studio tests passed, including selecting the added locales and localized controls. No findings from these checks.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6076963347 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339#pullrequestreview-6076963347). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-26T15:43:55Z. **Review:** COMMENTED --- Windows 11/Node: 13/13 Studio tests passed, including selecting the added locales and localized controls. No findings from these checks. AI-assisted.
aslan2142 commented 2026-12-01 12:02:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:02:37Z.

Review: COMMENTED


Draft review against current main: wiring the defined EU i18n strings in viewer/studio.html:418-577 looks clean and clean-room verified (also note this is the base for stacked #2377). Still Draft with no CI run yet — please mark Ready for Review so CI runs green.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130885633 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339#pullrequestreview-6130885633). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:02:37Z. **Review:** COMMENTED --- Draft review against current `main`: wiring the defined EU i18n strings in `viewer/studio.html:418-577` looks clean and clean-room verified (also note this is the base for stacked `#2377`). Still Draft with no CI run yet — please mark Ready for Review so CI runs green. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 12:29:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:29:44Z.


Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7311212677 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339#issuecomment-7311212677). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:29:44Z. --- Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 13:05:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T13:05:57Z.

Review: APPROVED


Now ready for review and MERGEABLE. Clean-room verified: wiring the existing EU locale strings in viewer/studio.html with tests in tests/test_viewer_studio.cjs is clean and verified (@lixonik; also unblocks stacked Draft #2377 once merged).

Approving — ready to merge once CI runs green on current main.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6131824103 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339#pullrequestreview-6131824103). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T13:05:57Z. **Review:** APPROVED --- Now ready for review and `MERGEABLE`. Clean-room verified: wiring the existing EU locale strings in `viewer/studio.html` with tests in `tests/test_viewer_studio.cjs` is clean and verified (`@lixonik`; also unblocks stacked Draft `#2377` once merged). Approving — ready to merge once CI runs green on current `main`. *(AI-assisted review.)*
merzleckeier commented 2026-12-01 13:43:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T13:43:50Z.


Found a stale texture-error label after changing the language at 3c9a09f12 + 9f27ba2e1. In the existing Node Studio harness I made the first texture request fail in Russian, then switched to EU. The rest of the UI changed language and the Russian error remained. A second scenario succeeds once, then fails, then switches back to Russian. The failure should remain visible in the selected language. A local change that tracks the load result and refreshes the count/error label in one place makes both sequences pass alongside the original locale test. All requests in this test are synthetic.

AI-assisted with OpenAI Codex (GPT-6).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7313082506 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2339#issuecomment-7313082506). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T13:43:50Z. --- Found a stale texture-error label after changing the language at `3c9a09f12` + `9f27ba2e1`. In the existing Node Studio harness I made the first texture request fail in Russian, then switched to EU. The rest of the UI changed language and the Russian error remained. A second scenario succeeds once, then fails, then switches back to Russian. The failure should remain visible in the selected language. A local change that tracks the load result and refreshes the count/error label in one place makes both sequences pass alongside the original locale test. All requests in this test are synthetic. AI-assisted with OpenAI Codex (GPT-6).
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!2339
No description provided.