victory menu: speak Portuguese where Windows does (stacked on #1609) #1617
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1618"
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 Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T19:51:58Z.
Stacked on #1609 (which is stacked on #959): this branch adds one commit,
e62dd00, on top of them. Optional: if the project would rather keep the tools in English, this is easy to leave out.What
The double-click menu, its PC check, the keyboard guide and the doctor's findings now follow Windows' display language. They come out in Portuguese where Windows is in Portuguese (
GetUserDefaultUILanguage, primary language0x16) and in English otherwise.VICTORY_LANG=en|ptoverrides the choice.How it works:
lang::localizetranslates the finished text by whole phrases (longest first) as the menu prints it, so the menu's logic and tests stay in one language.Adding a language is a phrase table, the same as
lang::PT. A test keeps the table honest: every English phrase in it must be one the menu or the doctor actually writes, so a reworded string can't leave a stale translation behind unnoticed.Tested
Native Windows 10 22H2 (19045) with a Portuguese display language, GTX 1060:
cargo test -p victory: 22 tests. The new ones cover:cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.victory.exewith noVICTORY_LANGset, it picked Portuguese by itself for the menu, the check (including the wrapped Windows 10 hint), a failed run and its What happened findings.Not exercised in the exe: that the copied report stays English while the menu speaks Portuguese. That's
lang::in_englisharound the report's text, but I skipped the clipboard round-trip, so as not to overwrite what the machine's clipboard held.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:32:23Z.
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:Cargo.lock,apps/victory/src/main.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 02:06:26 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.