Add seven-language support to the F1 menu #1997

Open
SkivHisink wants to merge 3 commits from upstream-pr/1997 into main
SkivHisink commented 2026-11-29 06:28:20 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by SkivHisink on 2026-11-29T06:28:20Z.


What it changes

  • Adds an Interface Language setting to F1. The default follows the first supported language in the user's Windows UI preferences and falls back to English.
  • Applies a manual choice immediately and saves it in victory-settings.txt as VICTORY_UI_LANGUAGE.
  • Covers settings, key bindings, help text, and save import/export in English, Simplified Chinese, Spanish, German, Russian, Hindi, and French.
  • Uses Windows text shaping for Unicode labels and keeps prompts and confirmation messages visible at 640×360.

How it was tested

  • Windows release build passed.
  • cargo test passed for victory and victory-gpu (622 passed, 44 ignored).
  • A standalone Windows rendering probe checked the translated catalog at 1× and 2×, including Simplified Chinese glyphs and Hindi conjuncts.
  • In-game validation is pending.

Checked for overlap

  • Searched open pull requests for F1 localization. #1977 also changes the F1 menu and focuses on Simplified Chinese.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5548267239 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1997). Originally posted by [SkivHisink](https://github.com/SkivHisink) on 2026-11-29T06:28:20Z. --- ## What it changes - Adds an Interface Language setting to F1. The default follows the first supported language in the user's Windows UI preferences and falls back to English. - Applies a manual choice immediately and saves it in `victory-settings.txt` as `VICTORY_UI_LANGUAGE`. - Covers settings, key bindings, help text, and save import/export in English, Simplified Chinese, Spanish, German, Russian, Hindi, and French. - Uses Windows text shaping for Unicode labels and keeps prompts and confirmation messages visible at 640×360. ## How it was tested - Windows release build passed. - `cargo test` passed for `victory` and `victory-gpu` (622 passed, 44 ignored). - A standalone Windows rendering probe checked the translated catalog at 1× and 2×, including Simplified Chinese glyphs and Hindi conjuncts. - In-game validation is pending. ## Checked for overlap - [x] Searched open pull requests for F1 localization. #1977 also changes the F1 menu and focuses on Simplified Chinese.
ANDREANIADS commented 2026-11-29 07:21:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ANDREANIADS on 2026-11-29T07:21:09Z.


At 62c0934, the PR lists Simplified Chinese and says Auto uses the first supported UI preference. I ran preferred_language and from_tag in isolation with synthetic UTF-16 lists. [zh-Hant-HK, fr-CA] and [zh-Hans-CN, fr-CA] both selected the Simplified Chinese catalog. [ja-JP, fr-CA] selected French, and an empty list fell back to English.

The existing single-tag test explicitly accepts zh-Hant-HK. Could you clarify the intended Auto behavior with the two-preference case? If support is script-specific, skip explicit Hant and continue to French. If all zh variants intentionally use Simplified Chinese ahead of later preferences, please document that fallback.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252419378 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1997#issuecomment-7252419378). Originally posted by [ANDREANIADS](https://github.com/ANDREANIADS) on 2026-11-29T07:21:09Z. --- At `62c0934`, the PR lists Simplified Chinese and says Auto uses the first supported UI preference. I ran `preferred_language` and `from_tag` in isolation with synthetic UTF-16 lists. `[zh-Hant-HK, fr-CA]` and `[zh-Hans-CN, fr-CA]` both selected the Simplified Chinese catalog. `[ja-JP, fr-CA]` selected French, and an empty list fell back to English. The existing single-tag test explicitly accepts `zh-Hant-HK`. Could you clarify the intended Auto behavior with the two-preference case? If support is script-specific, skip explicit Hant and continue to French. If all `zh` variants intentionally use Simplified Chinese ahead of later preferences, please document that fallback.
SkivHisink commented 2026-11-29 08:18:34 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by SkivHisink on 2026-11-29T08:18:34Z.


@ANDREANIADS Thanks for the repro. Auto now skips Traditional Chinese preferences and continues to the next supported Windows UI language. The regression test covers both examples: [zh-Hant-HK, fr-CA] selects French, and [zh-Hans-CN, fr-CA] selects Simplified Chinese. If there is no supported preference, Auto falls back to English. The Windows release build and all 623 tests passed.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7253020785 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1997#issuecomment-7253020785). Originally posted by [SkivHisink](https://github.com/SkivHisink) on 2026-11-29T08:18:34Z. --- @ANDREANIADS Thanks for the repro. Auto now skips Traditional Chinese preferences and continues to the next supported Windows UI language. The regression test covers both examples: [zh-Hant-HK, fr-CA] selects French, and [zh-Hans-CN, fr-CA] selects Simplified Chinese. If there is no supported preference, Auto falls back to English. The Windows release build and all 623 tests passed.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1997:upstream-pr/1997'
git switch 'upstream-pr/1997'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1997'
git switch 'upstream-pr/1997'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1997'
git switch 'upstream-pr/1997'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1997'
git switch 'main'
git merge --squash 'upstream-pr/1997'
git switch 'main'
git merge --ff-only 'upstream-pr/1997'
git switch 'main'
git merge 'upstream-pr/1997'
git push origin 'main'
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
trustno1-coder/VIctory-NVIDIA!1997
No description provided.