fix(menu): translate the current controls and automatic hints #2654

Merged
mooki000 merged 1 commit from fix/menu-hint-translations into main 2026-11-12 04:31:26 +00:00
mooki000 commented 2026-11-12 04:24:05 +00:00 (Migrated from github.com)

What this is for: make the current controls, automatic mesh-shader and automatic button-prompt hints find their translations (current main CI). What is measured: the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. This check is Python-only; the two environment runs do not claim compiler coverage. Not measured: a game run or Windows execution.

Cause

#1864 imported all thirteen catalogs after #1930, #2362 and #2435 had changed those three complete English hints; runtime lookup is exact, so their old keys no longer match (gpu/vk/menu_i18n.h, vk_menu.cpp, vk_menu_i18n.cpp).

The relevant failure in main's CI log is:

'Gamepad: the D-pad moves, A binds, B goes back.' is no text of vk_menu.cpp (renamed? then translate it again)

What changed

Update all 39 keys and their full translations; leave English help and runtime lookup unchanged. Retain exact membership, order, count, formatting and whitespace checks, and require all three current hints in every language so deleting an entry cannot hide the mismatch.

How it was tested

Recorded on 2026-11-11, Linux kernel 7.2.15-1-omarchy, base de866017, head f9a7e70f (version and test records).

  • Untouched main a016b7a6: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (python -I -B tests/run_all.py --strict --jobs 1 tests/test_menu_i18n.py records).
  • Each old key was restored independently, and each replacement was separately removed with its table count reduced: all six mutations fail in both environments (12 records), including the new completeness check.
  • One full python -I -B tests/run_all.py --strict: 456 passed, 14 failed, 20 skipped in 162 s (linux, 32 at once), load 81.38 → 42.70 (complete suite output).
  • That run's remaining failures are: test_wayland_libdecor_hint.py, test_display_startup_failure.py, test_texel_buffer_ownership.py, test_audio_aux.py, test_audio_biquad.py, test_dlss_checks.py, test_env_on.py, test_framegen_preset.py, test_hdr_encode.py, test_linux_docker_packages.py, test_mods_size_table.py, test_mouse_native.py, test_readback_part.py, test_rumble_menu.py (complete suite output). The companion fixture, capture-switch, PPA-parser and camera-handover branches address their separate causes; #2614 owns the HDR check and is not duplicated here.

About the translations

The added clauses in the 39 entries were written with a language model, in the wording of each catalogue's existing entry (the part that was already translated is kept word for word). Nobody who speaks these languages natively has read them; corrections are welcome and will not break the check, which compares only the English keys.

Not tested / risks

No game or layout screenshot was taken, and no native-speaker review was performed; the checks establish key coverage and structural consistency, not linguistic or visual polish.

Overlaps

#2417 is an alternative localization implementation, not a repair of these catalogs; it and #2566 merge cleanly with this change in the recorded overlap comparison.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]

**What this is for:** make the current controls, automatic mesh-shader and automatic button-prompt hints find their translations ([current main CI](https://github.com/NotRexed/Hookshot/actions/runs/43151254256)). **What is measured:** the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. This check is Python-only; the two environment runs do not claim compiler coverage. **Not measured:** a game run or Windows execution. ## Cause #1864 imported all thirteen catalogs after #1930, #2362 and #2435 had changed those three complete English hints; runtime lookup is exact, so their old keys no longer match (`gpu/vk/menu_i18n.h`, `vk_menu.cpp`, `vk_menu_i18n.cpp`). The relevant failure in [main's CI log](https://github.com/NotRexed/Hookshot/actions/runs/43151254256) is: ```text 'Gamepad: the D-pad moves, A binds, B goes back.' is no text of vk_menu.cpp (renamed? then translate it again) ``` ## What changed Update all 39 keys and their full translations; leave English help and runtime lookup unchanged. Retain exact membership, order, count, formatting and whitespace checks, and require all three current hints in every language so deleting an entry cannot hide the mismatch. ## How it was tested Recorded on 2026-11-11, Linux kernel `7.2.15-1-omarchy`, base `de866017`, head `f9a7e70f` (version and test records). - Untouched main `a016b7a6`: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (`python -I -B tests/run_all.py --strict --jobs 1 tests/test_menu_i18n.py` records). - Each old key was restored independently, and each replacement was separately removed with its table count reduced: all six mutations fail in both environments (12 records), including the new completeness check. - One full `python -I -B tests/run_all.py --strict`: **`456 passed, 14 failed, 20 skipped in 162 s (linux, 32 at once)`**, load 81.38 → 42.70 (complete suite output). - That run's remaining failures are: `test_wayland_libdecor_hint.py`, `test_display_startup_failure.py`, `test_texel_buffer_ownership.py`, `test_audio_aux.py`, `test_audio_biquad.py`, `test_dlss_checks.py`, `test_env_on.py`, `test_framegen_preset.py`, `test_hdr_encode.py`, `test_linux_docker_packages.py`, `test_mods_size_table.py`, `test_mouse_native.py`, `test_readback_part.py`, `test_rumble_menu.py` (complete suite output). The companion fixture, capture-switch, PPA-parser and camera-handover branches address their separate causes; #2614 owns the HDR check and is not duplicated here. ## About the translations The added clauses in the 39 entries were written with a language model, in the wording of each catalogue's existing entry (the part that was already translated is kept word for word). Nobody who speaks these languages natively has read them; corrections are welcome and will not break the check, which compares only the English keys. ## Not tested / risks No game or layout screenshot was taken, and no native-speaker review was performed; the checks establish key coverage and structural consistency, not linguistic or visual polish. ## Overlaps #2417 is an alternative localization implementation, not a repair of these catalogs; it and #2566 merge cleanly with this change in the recorded overlap comparison. Assisted-by: GPT-6 Astra Co-Authored-By: GPT-6 Astra <[email protected]>
hckrman101 (Migrated from github.com) approved these changes 2026-11-12 04:27:59 +00:00
hckrman101 (Migrated from github.com) left a comment

Checked this against current main, not only the PR's base.

  • I ran the PR's tests/test_menu_i18n.py with the PR's menu_i18n.h against main's vk_menu.cpp and vk_menu_i18n.cpp: all 5 tests pass. With main's menu_i18n.h and the same test, test_texts_are_the_menus and the new test_current_hints_are_translated both fail on the stale key, so the new check does catch the bug.
  • Header diff against main is exactly 39 changed lines, one per language for each of the three hints (controls, automatic mesh shaders, automatic button prompts), and nothing else. Line count is unchanged (6942) and every changed line is a table entry, so order and counts are untouched.
  • The file is valid UTF-8. No entry here has printf conversions or edge spaces, and none are introduced. The 13 translations keep the existing wording as their prefix and add the new clause, and I read the added clauses in the languages I can follow (ES x2, FR, DE, IT, NL, PT-BR, RU, JA, ZH-CN/TW) and found nothing wrong in meaning.
  • Machine translation is marked: the file header (line 3) already says all the translations are machine-made and to be checked by speakers, and the PR description says the new clauses were written with a model and not reviewed by native speakers. A per-clause marker would be redundant.

Overlap: #1864 is already merged (this repairs what it imported). #2417 is a separate localization approach; this only edits table entries and a test, so it should not collide beyond whatever #2417 does to the same header.

Nit: the assertIn to assertTrue(... in ...) change in test_texts_are_the_menus does nothing useful (same check, but assertIn gives a better failure message). Fine to revert, not blocking.

CI was still running when I looked. The failures listed as known on main (env_on, hdr_encode, linux_docker_packages, mouse_native, Windows psychov35 and pcache_header_read) are not this PR's. Good to merge once CI is green apart from those.

Checked this against current main, not only the PR's base. - I ran the PR's `tests/test_menu_i18n.py` with the PR's `menu_i18n.h` against main's `vk_menu.cpp` and `vk_menu_i18n.cpp`: all 5 tests pass. With main's `menu_i18n.h` and the same test, `test_texts_are_the_menus` and the new `test_current_hints_are_translated` both fail on the stale key, so the new check does catch the bug. - Header diff against main is exactly 39 changed lines, one per language for each of the three hints (controls, automatic mesh shaders, automatic button prompts), and nothing else. Line count is unchanged (6942) and every changed line is a table entry, so order and counts are untouched. - The file is valid UTF-8. No entry here has printf conversions or edge spaces, and none are introduced. The 13 translations keep the existing wording as their prefix and add the new clause, and I read the added clauses in the languages I can follow (ES x2, FR, DE, IT, NL, PT-BR, RU, JA, ZH-CN/TW) and found nothing wrong in meaning. - Machine translation is marked: the file header (line 3) already says all the translations are machine-made and to be checked by speakers, and the PR description says the new clauses were written with a model and not reviewed by native speakers. A per-clause marker would be redundant. Overlap: #1864 is already merged (this repairs what it imported). #2417 is a separate localization approach; this only edits table entries and a test, so it should not collide beyond whatever #2417 does to the same header. Nit: the `assertIn` to `assertTrue(... in ...)` change in `test_texts_are_the_menus` does nothing useful (same check, but assertIn gives a better failure message). Fine to revert, not blocking. CI was still running when I looked. The failures listed as known on main (env_on, hdr_encode, linux_docker_packages, mouse_native, Windows psychov35 and pcache_header_read) are not this PR's. Good to merge once CI is green apart from those.
Commenting is not possible because the repository is archived.
No description provided.