feat(ui): built-in multilingual overlay with Chinese, Japanese and Korean catalogs #2244

Open
github-bot wants to merge 1 commit from github-bot/gh-2244 into main AGit
Owner

@⁠Yuanzer on GitHub · 2026-11-29 10:59 UTC · original
Yuanzer:codex/i18n-overlay → main · +2420 −74 · 20 files · 1 commits · open

Summary

Make VIctory's own F1 settings/save/binding UI, F2 performance advisor, F3 stats panel, start notices and frame-generation notices localizable. English remains the source/fallback language, and the game's own locale is untouched.

This is now a built-in multilingual overlay, with complete Simplified Chinese, Japanese and Korean catalogs plus a data-only path for every other language:

  • F1 > LANGUAGE or VICTORY_UI_LANGUAGE selects Auto, English, built-in Simplified Chinese/Japanese/Korean, or any user-installed TOML catalog.
  • Catalogs live under %LOCALAPPDATA%\victory\ui-locales or VICTORY_HOME\ui-locales. User files override a built-in catalog with the same language tag, so wording can be fixed without rebuilding.
  • Built-in tags and aliases are zh-CN/zh, ja-JP/ja, and ko-KR/ko. Windows Auto therefore works directly on Simplified Chinese, Japanese and Korean systems.
  • All three built-in catalogs contain the same 363 message keys. Missing keys, malformed community catalogs and unavailable language tags safely fall back to English.
  • Integrated with the #4635 anti-aliased GDI canvas: Latin keeps Segoe UI/Consolas, while text containing Han, Japanese kana or Korean Hangul selects SimSun, Yu Gothic UI or Malgun Gothic respectively.
  • Unicode display width, rather than UTF-8 byte length, drives clipping, padding and wrapping. CJK occupies two cells. Supplementary-plane characters are passed as UTF-16 surrogate pairs.
  • Simplified and Traditional Chinese tags are kept distinct; zh-Hant is not silently collapsed into the built-in Simplified catalog.
  • Language changes apply live and are saved with the other F1 settings.

Current readiness

Latest head 91b6a048 is based on current main 5fabb46e. GitHub reports MERGEABLE, and the latest CI is green: run 46564692739.

The added coverage checks:

  • all three built-in catalogs parse, keep every placeholder, and a permanent test enforces an identical 363-key set; Auto locale resolution is cached once per process;
  • every F1 row/action and all three lines of translated help fit the 60-cell menu without truncation in zh-CN, ja-JP and ko-KR;
  • all menu labels, actions and help paragraphs have catalog entries; dynamic F2 advice and the new slim F3 labels are localized without changing #4635 pixel scaling;
  • every start, warm-up, no-audio and frame-generation notice branch fits the 52-cell overlay in zh-CN, ja-JP and ko-KR, including HAGS and driver-update notices using Windows/NVIDIA terminology;
  • Japanese kana and Korean Hangul use the expected Windows fonts, produce visible glyph ink and occupy two cells;
  • user catalogs larger than 1 MiB are ignored as a whole, and discovery/load share the same validation path;
  • an F1-saved VICTORY_UI_LANGUAGE=zh-CN value and the saved FPS value both survive menu-file parsing and enter the child launch environment. This covers the launch-path omission reported against the overlapping #1977 design.

Local targeted verification on the latest head:

  • full workspace passed: core 36, GPU 1099, HLE 470, shader 536; app/play passed 92 tests, and the HLE parallel harness was rerun after isolating its shared range-lock integration state.
  • Both cargo clippy --workspace --all-targets configurations with -D warnings passed.
  • cargo xtask policy: 469 files ok.

The branch retains the minimal pre-existing gate fixes needed for current main to compile warning-clean and pass tests/policy, preserving their original authors. They can be removed after the corresponding upstream changes land.

Why multilingual support matters

VIctory's F1 menu is the main tuning surface for DLSS, frame generation, console profile and many compatibility switches. Players who cannot read it rely on handwritten translation tables, especially for the F2 LIMIT/TRY advice they act on when troubleshooting stutter. This PR now gives three major East Asian language communities complete built-in coverage and makes further languages a catalog contribution rather than another UI fork or font/layout implementation.

Overlap and review choice

  • #1977, #1997 and #2755 cover narrower F1 localization.
  • #3617 is a much larger Fluent/DirectWrite proposal spanning CLI, launchers and diagnostics as well as the overlay.
  • This PR is deliberately still overlay-focused and currently fully tested. It now also demonstrates that the shared renderer is genuinely multilingual rather than a one-off Chinese patch.

If maintainers prefer the unified #3617 architecture, we can coordinate or retire this branch after that direction is confirmed. Otherwise this PR is merge-ready and can serve as the working multilingual overlay foundation now, with additional catalogs added in follow-ups without another Rust layout rewrite.

AI-assisted. Implementation and translations were tested locally on the reporter's machine; community native-speaker wording review is welcome.

**@⁠Yuanzer** on GitHub · 2026-11-29 10:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2244) `Yuanzer:codex/i18n-overlay` → `main` · +2420 −74 · 20 files · 1 commits · open ## Summary Make VIctory's own F1 settings/save/binding UI, F2 performance advisor, F3 stats panel, start notices and frame-generation notices localizable. English remains the source/fallback language, and the game's own locale is untouched. This is now a **built-in multilingual overlay**, with complete Simplified Chinese, Japanese and Korean catalogs plus a data-only path for every other language: - **F1 > LANGUAGE** or **VICTORY_UI_LANGUAGE** selects Auto, English, built-in Simplified Chinese/Japanese/Korean, or any user-installed TOML catalog. - Catalogs live under **%LOCALAPPDATA%\victory\ui-locales** or **VICTORY_HOME\ui-locales**. User files override a built-in catalog with the same language tag, so wording can be fixed without rebuilding. - Built-in tags and aliases are **zh-CN/zh**, **ja-JP/ja**, and **ko-KR/ko**. Windows Auto therefore works directly on Simplified Chinese, Japanese and Korean systems. - All three built-in catalogs contain the same 363 message keys. Missing keys, malformed community catalogs and unavailable language tags safely fall back to English. - Integrated with the #4635 anti-aliased GDI canvas: Latin keeps Segoe UI/Consolas, while text containing Han, Japanese kana or Korean Hangul selects SimSun, Yu Gothic UI or Malgun Gothic respectively. - Unicode display width, rather than UTF-8 byte length, drives clipping, padding and wrapping. CJK occupies two cells. Supplementary-plane characters are passed as UTF-16 surrogate pairs. - Simplified and Traditional Chinese tags are kept distinct; **zh-Hant** is not silently collapsed into the built-in Simplified catalog. - Language changes apply live and are saved with the other F1 settings. ## Current readiness Latest head **91b6a048** is based on current main **5fabb46e**. GitHub reports **MERGEABLE**, and the latest CI is green: [run 46564692739](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46564692739). The added coverage checks: - all three built-in catalogs parse, keep every placeholder, and a permanent test enforces an identical 363-key set; Auto locale resolution is cached once per process; - every F1 row/action and all three lines of translated help fit the 60-cell menu without truncation in zh-CN, ja-JP and ko-KR; - all menu labels, actions and help paragraphs have catalog entries; dynamic F2 advice and the new slim F3 labels are localized without changing #4635 pixel scaling; - every start, warm-up, no-audio and frame-generation notice branch fits the 52-cell overlay in zh-CN, ja-JP and ko-KR, including HAGS and driver-update notices using Windows/NVIDIA terminology; - Japanese kana and Korean Hangul use the expected Windows fonts, produce visible glyph ink and occupy two cells; - user catalogs larger than 1 MiB are ignored as a whole, and discovery/load share the same validation path; - an F1-saved **VICTORY_UI_LANGUAGE=zh-CN** value and the saved FPS value both survive menu-file parsing and enter the child launch environment. This covers the launch-path omission reported against the overlapping #1977 design. Local targeted verification on the latest head: - full workspace passed: core 36, GPU 1099, HLE 470, shader 536; app/play passed 92 tests, and the HLE parallel harness was rerun after isolating its shared range-lock integration state. - Both **cargo clippy --workspace --all-targets** configurations with **-D warnings** passed. - **cargo xtask policy**: 469 files ok. The branch retains the minimal pre-existing gate fixes needed for current main to compile warning-clean and pass tests/policy, preserving their original authors. They can be removed after the corresponding upstream changes land. ## Why multilingual support matters VIctory's F1 menu is the main tuning surface for DLSS, frame generation, console profile and many compatibility switches. Players who cannot read it rely on handwritten translation tables, especially for the F2 LIMIT/TRY advice they act on when troubleshooting stutter. This PR now gives three major East Asian language communities complete built-in coverage and makes further languages a catalog contribution rather than another UI fork or font/layout implementation. ## Overlap and review choice - #1977, #1997 and #2755 cover narrower F1 localization. - #3617 is a much larger Fluent/DirectWrite proposal spanning CLI, launchers and diagnostics as well as the overlay. - This PR is deliberately still overlay-focused and currently fully tested. It now also demonstrates that the shared renderer is genuinely multilingual rather than a one-off Chinese patch. If maintainers prefer the unified #3617 architecture, we can coordinate or retire this branch after that direction is confirmed. Otherwise this PR is merge-ready and can serve as the working multilingual overlay foundation now, with additional catalogs added in follow-ups without another Rust layout rewrite. AI-assisted. Implementation and translations were tested locally on the reporter's machine; community native-speaker wording review is welcome.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 11:01:06 +00:00
f9de61c5 moved Tables::parse to BCPack.dll's layout (the word after an
entry's widths is pixel 0's index) but left the test oracle's copy of
the parser on the old one, so the three oracle_parity tests failed on
main. The oracle now reads all 32 slots the same way.
Author
Owner

@⁠WZL203 on GitHub · 2026-11-29 16:24 UTC · original

Chinese player here (RTX 5070 12 GB, v2026.11.29.01) — this PR is exactly what I need.

The F1 menu is the main tuning surface of this fork (DLSS mode and model, frame generation, console profile), and I can't read it. I currently keep a hand-translated reference table next to me just to use the settings, and the F2 advisor lines — the LIMIT/TRY hints I act on when the game stutters — are the part I understand least, so having those in the zh-CN catalog too matters a lot.

Happy to test any build with this on my 5070 and report back. Thank you for the complete catalog.

**@⁠WZL203** on GitHub · 2026-11-29 16:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2244#issuecomment-7258882646) Chinese player here (RTX 5070 12 GB, v2026.11.29.01) — this PR is exactly what I need. The F1 menu is the main tuning surface of this fork (DLSS mode and model, frame generation, console profile), and I can't read it. I currently keep a hand-translated reference table next to me just to use the settings, and the F2 advisor lines — the LIMIT/TRY hints I act on when the game stutters — are the part I understand least, so having those in the zh-CN catalog too matters a lot. Happy to test any build with this on my 5070 and report back. Thank you for the complete catalog.
github-bot force-pushed github-bot/gh-2244 from a9cdbfc80a to e5c11c83a1 2026-11-29 20:51:53 +00:00 Compare
f9de61c5 moved Tables::parse to BCPack.dll's layout (the word after an
entry's widths is pixel 0's index) but left the test oracle's copy of
the parser on the old one, so the three oracle_parity tests failed on
main. The oracle now reads all 32 slots the same way.
1b4b6cd4 restored the GPU side of the reverted #479 and with it five
switch names in shader_cache: VICTORY_SCALAR_SPLITS in KEYED, and the
differential fuzzer's VICTORY_ORACLE_RUNS, _SEED, _AVOID and _OUT in the
test's NOT_TRANSLATION list. The translator's side and oracle_tests.rs
stayed reverted, so nothing in victory-shader reads any of the five:
the key took a value that changes no translation, and
shader_cache::tests::every_switch_of_the_translator_is_in_the_key fails
on main ("VICTORY_SCALAR_SPLITS is not read by the translator any
more"). The five are taken out; they go back with #479's shader side.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-29 22:15 UTC · original

Updated the branch from 14dc775e to d11a46bf on current main (716a0c99) and reran the full CI:\n\n- https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46316124905\n- check: passed\n- merge state: CLEAN / MERGEABLE\n\nI also rechecked the exact live F1/F2 rendering path on the RTX 5060 Ti / 1440p setup. The F1 and F2 Chinese glyphs now retain both upper and lower strokes; the earlier half-glyph screenshots were from the pre-fix bitmap path. For the remaining yellow Node 20 warning on the itle-labels check: it comes from the base-branch workflow, not this PR's code, and is addressed separately in #3360.

**@⁠Yuanzer** on GitHub · 2026-11-29 22:15 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2244#issuecomment-7263524501) Updated the branch from 14dc775e to d11a46bf on current main (716a0c99) and reran the full CI:\n\n- https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46316124905\n- check: passed\n- merge state: CLEAN / MERGEABLE\n\nI also rechecked the exact live F1/F2 rendering path on the RTX 5060 Ti / 1440p setup. The F1 and F2 Chinese glyphs now retain both upper and lower strokes; the earlier half-glyph screenshots were from the pre-fix bitmap path. For the remaining yellow Node 20 warning on the itle-labels check: it comes from the base-branch workflow, not this PR's code, and is addressed separately in #3360.
github-bot changed title from feat(ui): add localizable F1/F2/F3 overlays with complete Chinese catalog and Unicode glyph rendering to feat(ui): multilingual overlay foundation with built-in Simplified Chinese and CJK rendering 2026-11-30 05:02:08 +00:00
github-bot force-pushed github-bot/gh-2244 from c2d92565ef to d90a09cc33 2026-11-30 05:02:14 +00:00 Compare
Author
Owner

@⁠Yuanzer on GitHub · 2026-11-30 05:03 UTC · original

@⁠trustno1-coder This PR is now rebased onto current main (41adb551) as d90a09cc; GitHub reports MERGEABLE and the fresh CI is green: https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46356378964

The local verification after the rebase also passed the complete serial workspace suite, both Clippy configurations and the asset policy. The overlay-specific results include 33 core tests and 929 GPU tests passing, plus the CJK paint/layout and live F1/F2/F3 checks described in the PR body.

One product point is broader than Simplified Chinese: this is already a multilingual foundation. The same TOML catalog, Unicode-width layout and script-aware font path can ship Japanese and Korean catalogs without replacing the Rust renderer or forking the overlay. That should make future language contributions mostly translation work, not another font/layout implementation.

Could you confirm the preferred review direction: merge this narrower, currently green overlay-localization foundation and grow it with follow-up catalogs, or hold the overlay work for #3617's much larger unified Fluent/DirectWrite proposal? With #1977, #1997, #2755 and #3617 all overlapping, a direction decision here would avoid duplicated review and let contributors combine effort instead of maintaining five competing implementations.

**@⁠Yuanzer** on GitHub · 2026-11-30 05:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2244#issuecomment-7269311827) @⁠trustno1-coder This PR is now rebased onto current main (41adb551) as d90a09cc; GitHub reports **MERGEABLE** and the fresh CI is green: https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46356378964 The local verification after the rebase also passed the complete serial workspace suite, both Clippy configurations and the asset policy. The overlay-specific results include 33 core tests and 929 GPU tests passing, plus the CJK paint/layout and live F1/F2/F3 checks described in the PR body. One product point is broader than Simplified Chinese: this is already a multilingual foundation. The same TOML catalog, Unicode-width layout and script-aware font path can ship Japanese and Korean catalogs without replacing the Rust renderer or forking the overlay. That should make future language contributions mostly translation work, not another font/layout implementation. Could you confirm the preferred review direction: merge this narrower, currently green overlay-localization foundation and grow it with follow-up catalogs, or hold the overlay work for #3617's much larger unified Fluent/DirectWrite proposal? With #1977, #1997, #2755 and #3617 all overlapping, a direction decision here would avoid duplicated review and let contributors combine effort instead of maintaining five competing implementations.
github-bot changed title from feat(ui): multilingual overlay foundation with built-in Simplified Chinese and CJK rendering to feat(ui): built-in multilingual overlay with Chinese, Japanese and Korean catalogs 2026-11-30 05:51:41 +00:00
github-bot force-pushed github-bot/gh-2244 from 7ed36d530e to 6000d4bfc0 2026-11-30 18:10:32 +00:00 Compare
github-bot force-pushed github-bot/gh-2244 from 6000d4bfc0 to ffd83bad49 2026-11-30 18:34:22 +00:00 Compare
github-bot force-pushed github-bot/gh-2244 from ffd83bad49 to 2a495cc492 2026-12-01 00:05:41 +00:00 Compare
github-bot force-pushed github-bot/gh-2244 from 8a4141f978 to c10f5fe8aa 2026-12-01 02:53:08 +00:00 Compare
github-bot force-pushed github-bot/gh-2244 from c10f5fe8aa to 91b6a048d2 2026-12-01 02:59:10 +00:00 Compare
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/font.rs
  • crates/victory-gpu/src/host/menu.rs
  • crates/victory-gpu/src/host/panel.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2244/head:github-bot/gh-2244'
git switch 'github-bot/gh-2244'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2244'
git switch 'github-bot/gh-2244'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2244'
git switch 'github-bot/gh-2244'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2244'
git switch 'main'
git merge --squash 'github-bot/gh-2244'
git switch 'main'
git merge --ff-only 'github-bot/gh-2244'
git switch 'main'
git merge 'github-bot/gh-2244'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2244
No description provided.