studio: show category names in the chosen language (carry of #2377) #3094
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3094"
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?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T10:31:10Z.
Claimed in the coordination issue as: STUDIO-CATEGORY-NAMES (https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7197726846), the original author's item ID and claim
What and why
Carry of #2377 (syfyra), unchanged since 2026-11-26 (last commit; the only later activity is a verification comment and a draft-status review note by others). Branch = main + the author's head (both commits kept) + a clean merge, no conflicts + no commits of mine.
The studio's
I18Ntable has acatNamesentry in both languages, but nothing read it, so the category chips and the model list headers showed the server's two-language name (Транспорт (Vehicles)) whatever the language. The change:categoryLabel(cat), which iscatNames[cat]of the current language, or the server's name whencatNameshas no entry for it.selectCategory,activeCategory, the search), so filtering is unchanged.The original was stacked on #2339 (STUDIO-EU-STRINGS), which has since merged; the merge with current main drops that part, so the diff against main is the category-names change only (
viewer/studio.html,tests/test_viewer_studio.cjs).Review: the only review is a draft-status note (rebase once #2339 merges, run CI, mark ready), which this branch addresses by being on current main. There are no inline review comments and no reported defects, so I made no fixes. The verification comment (VERIFY-2377) found nothing against the change.
Tested
Windows 11, Node v26.13.0, no GPU, no game files, on main
80910637fplus this branch:node --test tests/test_viewer_studio.cjs: 21 tests, 21 pass.viewer/studio.htmlrestored to main's version (git show origin/main:viewer/studio.html) and the branch's test file, 21 tests, 20 pass, 1 fails: "category chips and headers show the catNames of the chosen language and keep the server name as the filter". The file was restored afterwards.python -I scripts/check_no_game_data.py viewer/studio.html tests/test_viewer_studio.cjs: clean (exit 0).Not run: the full suite, CI. The tests run the page's script in a
vmcontext, so the HTML and CSS are not rendered and no browser was used.GPUs tested: n/a (unit tests only)
AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Supersedes #2377 once merged; the original stays open until a maintainer decides.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T11:05:34Z.
Checked in a real browser, since the description notes the tests run the script in a
vmcontext only.Setup: Windows 11, head
c6b51d1a4merged with currentmain, no conflicts. I startedtools/gallery.py --models-diron a folder of 8 placeholder.glbfiles named to hit every category (veh_car_a,w_pistol_a,ped_male_a,tree_oak_aand so on, 4 bytes each, no game data). The page ran in a Chromium-based browser.node --test tests/test_viewer_studio.cjs: 21 pass, 0 fail (Node 20).Works as described:
Транспорт (2),Оружие (1)and so on, and the accordion headers match.Vehicles (2),Vegetation & Nature (1),World & Architecture (1)and so on, again with matching headers.Транспорт, then switched EU → RU. The chip kept itsactiveclass and was relabelled.activeCategorystayed the server keyТранспорт (Vehicles), so the filter is unaffected.One small gap: search does not match the label it shows. The model search box says "Search by name or category...", but
renderAccordionListstill matchesm.category, the server key. With EU selected and All chosen:VegetationArchitectureNatureWorldТранспортSo a word that is only in the shown label finds nothing, while a word that is only in the hidden RU key does. Before this PR the chips showed the key itself, so this mismatch is new. A possible fix is to also test
categoryLabel(m.category).toLowerCase().includes(modelSearchQuery)in thematchesSearchcheck. This is not a blocker.Not checked: the 3D view. The placeholder files are not real glTF. The
/vendor/three.js requests also returned 404 in this setup.GPUs tested: n/a (UI only).
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:15:27Z.
Thanks for the browser check. The search gap is fixed in
f17157c8f: the model search now matches the category name shown in the chosen language as well as the server's name, soVegetationfinds Vegetation & Nature in EU whileТранспортandNaturestill work. A test covers the three queries; it fails with the previousstudio.htmland passes now (node --test tests/test_viewer_studio.cjs: 22 pass).AI-assisted (Claude Code, Claude Opus 5.5)
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-02T13:10:14Z.
RUN (independent run on Windows, #3094 head
f17157c8f, merged locally intomain23a51c494withgit merge --no-ff, no conflicts. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)45a128d32(syfyra) is an ancestor of the head through the mergec6b51d1a4, under its author's name. The body says "no commits of mine", but the head isf17157c8f, the carrier's search fix made after Kal0s-design's browser check. The counts below are for that head.node --test tests/test_viewer_studio.cjs(Node 24.18): main 21 tests pass; merge 23 pass.node --test tests/test_*.cjs, the viewer suite CI runs: main 111 pass; merge 113 pass.main'sviewer/studio.htmlwith the head's test file gives 23 tests and 2 failures:Транспорт (Vehicles) (1), whereТранспорт (1)is wanted.Vegetationfinds nothing.main.viewer/studio.html, each run withtests/test_viewer_studio.cjsand restored afterwards (git statusclean). 4 of 6 are killed:categoryLabelreturning the server's name: killed (both new tests).c6b51d1a4behaviour: killed (the search test).selectCategory(categoryLabel(cat), chip)inonclick). The chips test callsselectCategorydirectly with the server's name, so the key the chip itself passes is not pinned. Clicking the "Vehicles" chip with this mutation would match no model.categoryChips.length = 0dropped). Old chips would then be relabelled too, but they are no longer on the page, so nothing visible changes in the tests.Not covered here: a real browser (the tests run the page's script in a
vmcontext; Kal0s-design checkedc6b51d1a4in Chromium), and Linux and macOS.Verdict: PASS. Chips and headers follow the chosen language and the filter keeps the server's key, the search matches the shown label (the gap from the browser check is fixed and pinned), red on
mainand green on the merge hold, and the author's commit is kept. One gap remains: no test clicks a chip, so the key passed byonclickis not pinned.Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, Node 24.18.0; unit tests only, no GPU or game files used.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T13:13:45Z.
Merging. Head
f17157c8fmerges cleanly withmainbf7886746and does not force a rebase of #2566. Independent check on headf17157c8f: enlight3d's red/green on main + this head (2 failures with main's page: untranslated chips, empty search for a translated category; green 23 node tests, viewer suite 111 -> 113; 4 of 6 mutations killed, no test clicks a chip), comment 7346456743; syfyra's commits from #2377 are kept; CI green incl. no-game-data. Merged by MoonEyes.AI-assisted (Claude Code).