Repository navigation
studio: EU mode applies every I18N string, not 13 of 23 - #6704
dukefissura wants to merge 1 commit into
Conversation
…of the page in Russian viewer/studio.html defines an I18N table with an English (EU) entry for each string, but applyTranslations used 13 of its 23 keys. The model stats labels, the Reset Camera button, the texture gallery heading and count, the not-found messages, the All chip and the category names (catNames) stayed in Russian after switching to EU, and seven more strings (the model load error, the two show-more buttons, the texture loading and load-error texts) had no key at all. Every key is now applied: the stat labels, the Reset Camera button and the gallery heading get ids, the category chips and group headers show catNames, the chips keep the selected category when re-rendered, and the seven strings get keys in both languages. A model without a category is grouped under the 'Прочее (Miscellaneous)' key that catNames translates; Russian mode reads as before. tests/test_viewer_studio.cjs: switch to EU with models, categories and 81 textures loaded and check that no rendered text has Cyrillic characters, plus the not-found and load-error texts, then back to Russian. It fails before the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fi5BEBqGPiXnY67f9mzu13
|
Tested e3cb3bb merged with main a66e6e3 on Linux/Node v22.23.5 (no Python involved; the test is a .cjs file run by ci.yml with Commands (fresh worktree of upstream/main with the PR head merged):
Negative control: Diff read: the test drives the page through a stubbed DOM, so it checks every element's text/innerHTML/placeholder for Cyrillic after |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
viewer/studio.html adds IDs to previously hard-coded Russian labels and applies every I18N string in setLanguage, including new texLoading, texLoadError, showMore, showAll, and modelLoadError entries. A categoryLabel helper maps gallery.py's Russian-with-English-gloss category names through I18N[currentLang].catNames; updateTexCount handles loaded, error, and idle states; chips, empty states, and the model-load alert now use the active language. tests/test_viewer_studio.cjs adds an EU-mode test asserting no Cyrillic appears and checking RU still works afterward.
Why merge
English-mode users were seeing Russian in stats, category chips, and error states because those strings never had translation entries. This closes the gaps and keeps category labels consistent between gallery and studio. The test walks the full element tree for Cyrillic, so future untranslated additions fail loudly.
Verdict: Approve
Summary
Why mergeEnglish-mode users were seeing Russian in stats, category chips, and error states because those strings never had translation entries. This closes the gaps and keeps category labels consistent between gallery and studio. The test walks the full element tree for Cyrillic, so future untranslated additions fail loudly. Verdict: Approve |
Claimed in the coordination issue as: STUDIO-EU-STRINGS (in #6603)
Depends on: none. It conflicts only textually with #6697 (my STUDIO-MODAL-STALE-IMAGE PR), at the end of
tests/test_viewer_studio.cjs, where both append a test. Itsviewer/studio.htmlchanges don't touchopenModalor the<img onerror>lines that #6529 and #6441 change.What and why
viewer/studio.htmldefines anI18Ntable with an English (EU) entry for each string, butapplyTranslationsused only 13 of its 23 keys. After switching to EU, these stayed in Russian: the model stats labels, the Reset Camera button, the texture gallery heading and count, the not-found messages, the All chip and the category names (catNames). Seven more user-visible strings had no key at all: the model load error, the two show-more buttons, and the texture loading and load-error texts.Now every key is applied:
applyTranslationssets;catNames, and the chips keep the selected category when re-rendered;texLoading,texLoadError,showMore,showAll,modelLoadError), and the texture count is rebuilt fromtexCountSuffixwhenever the language changes.A model without a category is grouped under the
Прочее (Miscellaneous)key thatcatNamestranslates. Russian mode reads as before.Tested
Linux, Node 22.23.5, CPU only, no GPU or driver involved, no game files.
node --test tests/test_viewer_studio.cjs: 4/4 on top of main 1cc6e3c.EU mode shows no Russiantest loads 101 synthetic models (one without a category), a category map and 81 textures, switches to EU, and checks that no rendered text, placeholder or tab label contains Cyrillic characters. It also checks the not-found and load-error texts, then switches back to Russian. It fails without theviewer/studio.htmlchange and passes with it.tests/test_viewer_streaming.cjs: the only failure is the Shift/Ctrl test that already fails on main (fixed by test(viewer): pass AbortController and timers into camera-speed vm context #5692).git diff --checkis clean.AI-assisted: yes (Claude)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)