mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #2377] studio: show category names in the chosen language (STUDIO-CATEGORY-NAMES) #2380
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2380
Loading…
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/ubiquitarianism/leonida/pull/2377
Author: @syfyra
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/studio-category-names📝 Commits (2)
3c9a09fstudio: show the EU strings the page already defines (STUDIO-EU-STRINGS)45a128dstudio: show category names in the chosen language (STUDIO-CATEGORY-NAMES)📊 Changes
2 files changed (+95 additions, -10 deletions)
View changed files
📝
tests/test_viewer_studio.cjs(+54 -0)📝
viewer/studio.html(+41 -10)📄 Description
Claimed in the coordination issue as: STUDIO-CATEGORY-NAMES (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7197726846)
Depends on: #2339 (STUDIO-EU-STRINGS). This branch is built on it, so the diff here shows both commits; the change of this pull request is the last commit,
45a128d32. Once #2339 lands, only that commit remains.What and why
viewer/studio.html(served bytools/gallery.py) has acatNamesentry in both languages of itsI18Ntable.tools/gallery.pynames each category in both languages ("Транспорт (Vehicles)");catNamesmaps that to"Транспорт"for RU and"Vehicles"for EU. Nothing readcatNames, so the category chips and the model list headers showed the server's two-language name whatever the language. It is the last unused entry of the table: #2339 applies the others and left this one out because the chips are built once per load.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.Tested
Windows 11, Node 26.12.1, no game files:
node --test tests/test_viewer_studio.cjs: 14 pass. The new test builds chips and the list forТранспорт (Vehicles)and an unlistedCustom. It checksТранспорт (1)/Custom (1)and the headers in RU, thenVehicles (1)/Custom (1)aftersetLanguage('eu'), then that selecting the chip filters by the server's name. It fails on #2339's head; the other 13 pass.scripts/check_no_game_data.pyon both files.GPUs tested: n/a (no GPU code)
AI-assisted: yes (Claude Code, 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)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.