[PR #6629] [MERGED] Localization: sign edit's Done, the AI Agent page, the newer graphics settings and the Extras page follow the language #6996

Closed
opened 2026-11-03 06:31:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6629
Author: @mariuslozo-boop
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/finish-1927


📝 Commits (1)

  • 78a634a Localization: sign edit's Done, the AI Agent page, the newer graphics settings and the Extras page follow the language (#1927)

📊 Changes

14 files changed (+714 additions, -52 deletions)

View changed files

📝 crates/horizon-client-core/src/lang.rs (+106 -2)
📝 crates/horizon-client-render/src/graphics_ui.rs (+108 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+55 -0)
📝 crates/horizon-client/assets/horizon/lang/de_de.json (+52 -2)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+32 -2)
📝 crates/horizon-client/assets/horizon/lang/es_es.json (+0 -1)
📝 crates/horizon-client/assets/horizon/lang/fr_fr.json (+52 -2)
📝 crates/horizon-client/assets/horizon/lang/pl_pl.json (+52 -2)
📝 crates/horizon-client/assets/horizon/lang/ru_ru.json (+0 -1)
📝 crates/horizon-client/assets/horizon/lang/tr_tr.json (+0 -1)
📝 crates/horizon-client/assets/horizon/lang/uk_ua.json (+52 -2)
📝 crates/horizon-client/assets/horizon/lang/zh_cn.json (+35 -2)
📝 crates/horizon-client/src/game/agent_settings.rs (+139 -28)
📝 crates/horizon-client/src/game/sign_edit.rs (+31 -7)

📄 Description

🤖 Opened by mariuslozo-boop's AI agent (Claude Code, Claude Sonnet 5.5 + Claude Opus 5.5 review), not by mariuslozo-boop personally.

What and why

Part of #1927 (it stays open: es_es, ru_ru, tr_tr and the languages with no Horizon file still need translations).

A check of main in the real client, offscreen in de_de, pl_pl and ja_jp, found the vanilla screens in the selected language (the creative inventory with all its tabs, the search, the survival and saved-hotbar tabs and the Destroy Item tooltip; pause, chat, death, crafting, the furnaces, anvil, enchanting, brewing, smithing, trading, advancements, statistics, world select, Create World and F3+F6). These were still English:

  • Sign edit's Done button was a literal "Done": now gui.done (CommonComponents.GUI_DONE, as AbstractSignEditScreen.init uses it), for its narration too.
  • The AI Agent page's status lines were English sentences built in code: now horizon.agent.* keys, with the connection count and the seconds since the last command as arguments. status_lines is a function of the socket's state, so a test can reach it. Languages with three plural forms word the count so it reads right for any number (pl_pl "Połączenia agenta: %s").
  • Advanced Graphics: the Culling header, Leaf Culling, Frame Generation, Shadow Cache, Screenshot Quality, Distant Plant Dither, the Synchronous/Asynchronous and Solid/Solid Aggressive/Hollow values and their descriptions are English captions that the language table keys by themselves, and en_us.json did not have them, so every language showed English. They are in the table now, with de/pl/uk/fr/zh_cn translations. The Entity Culling description's key had drifted from the text the code asks for; it is replaced (in es_es, ru_ru and tr_tr too, where the old key was never asked for). Translucent Batching, its description and the reason it is blocked (new on main, #6455) are translated too.
  • Extras and Horizon Settings: 17 keys added to en_us.json after the de/pl/uk/fr files were written had no translation there (Particles, Hide block-break particles, Smooth chat, Message indicator, Keep channels for UI sounds, Splitscreen and its page): added.
  • Controller Binds: "Hotbar: Previous Slot" and "Hotbar: Next Slot", with the hotbar words vanilla's own lang files use for key.hotbar.* and inventory.hotbarInfo.

Every placeholder (%s) is the same in each translation as in en_us, and de_de, pl_pl, uk_ua, fr_fr and zh_cn now have all 341 of its keys.

lang::scoped(language, f) runs f with a language that only the calling thread sees, and returns the keys get and get_or looked up and that language did not have. Tests render a screen in another language with it without setting the process-wide one, so they can run beside each other. Language::load has no side effects, the scope is a thread-local put back by a guard (also when f panics), scopes nest, and only tests call it. bidirectional() stays the process-wide language's.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

  • AbstractSignEditScreen.init: the Done button's CommonComponents.GUI_DONE.
  • ClientLanguage.loadFrom (en_us first, then the selected language), which Language::load already follows; unchanged.
  • The rest is Horizon-only text (the AI Agent page, Horizon's graphics and Extras settings).

Harness: none covers these screens' text.

Other projects' code

none

Self-check

New tests. Each fails on main and passes here, except where noted:

  • graphics_ui::tests::every_graphics_text_is_in_the_language_table: every caption, description, value and blocked reason of the three graphics pages, with each setting cycled through its values, is a key of the table.
  • graphics_ui::tests::newer_graphics_settings_are_translated: Leaf Culling and Entity Culling in de/pl/uk/zh_cn/fr.
  • options_ui::tests::horizon_option_pages_follow_the_language: the Horizon, Extras and Controller Binds pages in de_de and pl_pl, and no Horizon key (or English caption) they ask for is missing.
  • game::agent_settings::tests::agent_page_lines_follow_the_language (de, pl, fr) and agent_page_lines_in_english, which passes on main too: English keeps its sentences, the plural and the time since the last command.
  • game::sign_edit::tests::done_button_reads_the_selected_language.
  • lang::tests::a_scoped_language_is_the_calling_threads_and_reports_what_it_lacks and scopes_nest_and_end_when_their_closure_panics, for the new helper itself: another thread keeps the process-wide language, the scope ends with its closure, and after a panic.

Real client (offscreen, isolated home, main and this branch): the sign edit screen in de_de, and the AI Agent page and the Horizon graphics, Extras and Controller Binds pages in de_de and pl_pl, show the translations above. The pl_pl and fr_fr hotbar wording was changed after those screenshots, to vanilla's words: the pl_pl one is checked by the options test, the fr_fr one by nothing but reading. The Translucent Batching strings came with the last rebase and were only read, not seen in the game.

pr_ready (tools/pr_ready.py --quick --base upstream/main on PCDKBLENDER, against upstream/main at 8d93d68f1, 12 min 35 s)

Check Result
Scope ⚠️ 14 files, +714 −52; 766 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 596 run, FAILED (errors=1, skipped=2) (57 s)
rustfmt ✅ (8 s)
clippy ✅ (50 s)
tests: horizon-client, horizon-client-core, horizon-client-lib, horizon-client-render ✅ 2970 passed (10 min 32 s)
doc tests ✅ 0 passed (4 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 113 affected, to run in CI (--quick): arrow, enchanting, enchantment_components, friends_integration, lan_integration, management_protocol, online_mode, remote_fireball, remote_fireworks, replace_blobs, replace_block, resource_pack and 101 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)
  • Scope: of the 766 lines, about 275 are translations (the JSON files), about 300 tests and about 140 code. The tests check the translations, so they ship together.
  • Python tests: the one error is test_world_input_capture.test_capture_lifecycle (its compiled fixture exits with 101). It fails the same on a clean checkout of 8d93d68f1: it came with #6410 and is not touched here.
  • Parity: listed for CI, not run (--quick). Since 5ebf42f7b the runner starts harnesses on Windows, but on this machine every one fails before it compares anything (its javac is JDK 21 and the oracles compile with --release 25), and the ones that start the game open a window.
  • Threads: RUST_TEST_THREADS=2 (the render tests can hang on Windows otherwise, #5238).

Overlap: #6395, #6397, #6398 and #6399 (open, Splitscreen Setup) also change en_us.json and fr_fr.json, and change the English of horizon.pages.split_setup and its tooltip, which this PR translates as they read on main. Whichever merges second has a merge to do in those two files, and those two keys may need their translations redone.

Not tested:

  • Right-to-left languages, the dedicated server console and LAN guest screens.
  • In the real client, languages other than de_de, pl_pl and ja_jp; uk_ua, fr_fr and zh_cn are checked by the unit tests only.

Still English, not changed here (for #1927): the splitscreen join prompt and notices in game/split/ ("X wants to join", "Controller disconnected", "Play as P1"), and the names the Play with Friends screen gives its widgets for the narrator and the control socket (friends_screen::TITLE).

🤖 Generated with Claude Code

https://claude.ai/code/session_01RodDbPWCByh96WKcbiEQpB


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6629 **Author:** [@mariuslozo-boop](https://github.com/mariuslozo-boop) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/finish-1927` --- ### 📝 Commits (1) - [`78a634a`](https://github.com/horizon-rust/horizon/commit/78a634a19152ca922f3890a370a46e0b3e56ee85) Localization: sign edit's Done, the AI Agent page, the newer graphics settings and the Extras page follow the language (#1927) ### 📊 Changes **14 files changed** (+714 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/lang.rs` (+106 -2) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+108 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+55 -0) 📝 `crates/horizon-client/assets/horizon/lang/de_de.json` (+52 -2) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+32 -2) 📝 `crates/horizon-client/assets/horizon/lang/es_es.json` (+0 -1) 📝 `crates/horizon-client/assets/horizon/lang/fr_fr.json` (+52 -2) 📝 `crates/horizon-client/assets/horizon/lang/pl_pl.json` (+52 -2) 📝 `crates/horizon-client/assets/horizon/lang/ru_ru.json` (+0 -1) 📝 `crates/horizon-client/assets/horizon/lang/tr_tr.json` (+0 -1) 📝 `crates/horizon-client/assets/horizon/lang/uk_ua.json` (+52 -2) 📝 `crates/horizon-client/assets/horizon/lang/zh_cn.json` (+35 -2) 📝 `crates/horizon-client/src/game/agent_settings.rs` (+139 -28) 📝 `crates/horizon-client/src/game/sign_edit.rs` (+31 -7) </details> ### 📄 Description > 🤖 Opened by mariuslozo-boop's AI agent (Claude Code, Claude Sonnet 5.5 + Claude Opus 5.5 review), not by mariuslozo-boop personally. ## What and why Part of #1927 (it stays open: `es_es`, `ru_ru`, `tr_tr` and the languages with no Horizon file still need translations). A check of main in the real client, offscreen in `de_de`, `pl_pl` and `ja_jp`, found the vanilla screens in the selected language (the creative inventory with all its tabs, the search, the survival and saved-hotbar tabs and the Destroy Item tooltip; pause, chat, death, crafting, the furnaces, anvil, enchanting, brewing, smithing, trading, advancements, statistics, world select, Create World and F3+F6). These were still English: - **Sign edit's Done button** was a literal "Done": now `gui.done` (`CommonComponents.GUI_DONE`, as `AbstractSignEditScreen.init` uses it), for its narration too. - **The AI Agent page's status lines** were English sentences built in code: now `horizon.agent.*` keys, with the connection count and the seconds since the last command as arguments. `status_lines` is a function of the socket's state, so a test can reach it. Languages with three plural forms word the count so it reads right for any number (`pl_pl` "Połączenia agenta: %s"). - **Advanced Graphics**: the Culling header, Leaf Culling, Frame Generation, Shadow Cache, Screenshot Quality, Distant Plant Dither, the Synchronous/Asynchronous and Solid/Solid Aggressive/Hollow values and their descriptions are English captions that the language table keys by themselves, and `en_us.json` did not have them, so every language showed English. They are in the table now, with de/pl/uk/fr/zh_cn translations. The Entity Culling description's key had drifted from the text the code asks for; it is replaced (in `es_es`, `ru_ru` and `tr_tr` too, where the old key was never asked for). Translucent Batching, its description and the reason it is blocked (new on main, #6455) are translated too. - **Extras and Horizon Settings**: 17 keys added to `en_us.json` after the de/pl/uk/fr files were written had no translation there (Particles, Hide block-break particles, Smooth chat, Message indicator, Keep channels for UI sounds, Splitscreen and its page): added. - **Controller Binds**: "Hotbar: Previous Slot" and "Hotbar: Next Slot", with the hotbar words vanilla's own lang files use for `key.hotbar.*` and `inventory.hotbarInfo`. Every placeholder (`%s`) is the same in each translation as in `en_us`, and `de_de`, `pl_pl`, `uk_ua`, `fr_fr` and `zh_cn` now have all 341 of its keys. `lang::scoped(language, f)` runs `f` with a language that only the calling thread sees, and returns the keys `get` and `get_or` looked up and that language did not have. Tests render a screen in another language with it without setting the process-wide one, so they can run beside each other. `Language::load` has no side effects, the scope is a thread-local put back by a guard (also when `f` panics), scopes nest, and only tests call it. `bidirectional()` stays the process-wide language's. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [x] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference - `AbstractSignEditScreen.init`: the Done button's `CommonComponents.GUI_DONE`. - `ClientLanguage.loadFrom` (en_us first, then the selected language), which `Language::load` already follows; unchanged. - The rest is Horizon-only text (the AI Agent page, Horizon's graphics and Extras settings). Harness: none covers these screens' text. ## Other projects' code none ## Self-check New tests. Each fails on main and passes here, except where noted: - `graphics_ui::tests::every_graphics_text_is_in_the_language_table`: every caption, description, value and blocked reason of the three graphics pages, with each setting cycled through its values, is a key of the table. - `graphics_ui::tests::newer_graphics_settings_are_translated`: Leaf Culling and Entity Culling in de/pl/uk/zh_cn/fr. - `options_ui::tests::horizon_option_pages_follow_the_language`: the Horizon, Extras and Controller Binds pages in `de_de` and `pl_pl`, and no Horizon key (or English caption) they ask for is missing. - `game::agent_settings::tests::agent_page_lines_follow_the_language` (de, pl, fr) and `agent_page_lines_in_english`, which passes on main too: English keeps its sentences, the plural and the time since the last command. - `game::sign_edit::tests::done_button_reads_the_selected_language`. - `lang::tests::a_scoped_language_is_the_calling_threads_and_reports_what_it_lacks` and `scopes_nest_and_end_when_their_closure_panics`, for the new helper itself: another thread keeps the process-wide language, the scope ends with its closure, and after a panic. Real client (offscreen, isolated home, main and this branch): the sign edit screen in `de_de`, and the AI Agent page and the Horizon graphics, Extras and Controller Binds pages in `de_de` and `pl_pl`, show the translations above. The `pl_pl` and `fr_fr` hotbar wording was changed after those screenshots, to vanilla's words: the `pl_pl` one is checked by the options test, the `fr_fr` one by nothing but reading. The Translucent Batching strings came with the last rebase and were only read, not seen in the game. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on PCDKBLENDER, against upstream/main at 8d93d68f1, 12 min 35 s) | Check | Result | | --- | --- | | Scope | ⚠️ 14 files, +714 −52; 766 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 596 run, FAILED (errors=1, skipped=2) (57 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (50 s) | | tests: horizon-client, horizon-client-core, horizon-client-lib, horizon-client-render | ✅ 2970 passed (10 min 32 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 113 affected, to run in CI (--quick): arrow, enchanting, enchantment_components, friends_integration, lan_integration, management_protocol, online_mode, remote_fireball, remote_fireworks, replace_blobs, replace_block, resource_pack and 101 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | - **Scope:** of the 766 lines, about 275 are translations (the JSON files), about 300 tests and about 140 code. The tests check the translations, so they ship together. - **Python tests:** the one error is `test_world_input_capture.test_capture_lifecycle` (its compiled fixture exits with 101). It fails the same on a clean checkout of `8d93d68f1`: it came with #6410 and is not touched here. - **Parity:** listed for CI, not run (`--quick`). Since 5ebf42f7b the runner starts harnesses on Windows, but on this machine every one fails before it compares anything (its `javac` is JDK 21 and the oracles compile with `--release 25`), and the ones that start the game open a window. - **Threads:** `RUST_TEST_THREADS=2` (the render tests can hang on Windows otherwise, #5238). Overlap: #6395, #6397, #6398 and #6399 (open, Splitscreen Setup) also change `en_us.json` and `fr_fr.json`, and change the English of `horizon.pages.split_setup` and its tooltip, which this PR translates as they read on main. Whichever merges second has a merge to do in those two files, and those two keys may need their translations redone. Not tested: - Right-to-left languages, the dedicated server console and LAN guest screens. - In the real client, languages other than `de_de`, `pl_pl` and `ja_jp`; `uk_ua`, `fr_fr` and `zh_cn` are checked by the unit tests only. Still English, not changed here (for #1927): the splitscreen join prompt and notices in `game/split/` ("X wants to join", "Controller disconnected", "Play as P1"), and the names the Play with Friends screen gives its widgets for the narrator and the control socket (`friends_screen::TITLE`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RodDbPWCByh96WKcbiEQpB --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:31:10 +07:00
Sign in to join this conversation.
No milestone
No project
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
horizon-rust/horizon#6996
No description provided.