[PR #7558] Options: join Horizon captions with the language's separator #7669

Open
opened 2026-11-03 07:21:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7558
Author: @ratuser1
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/6072-option-separators


📝 Commits (1)

  • 2753e0f Options: join Horizon captions with the language's separator (#6072)

📊 Changes

4 files changed (+143 additions, -18 deletions)

View changed files

📝 crates/horizon-client-core/src/text.rs (+22 -0)
📝 crates/horizon-client-render/src/graphics_ui.rs (+64 -3)
📝 crates/horizon-client-render/src/options_ui.rs (+48 -8)
📝 crates/horizon-client-render/src/shader_options.rs (+9 -7)

📄 Description

🤖 Opened by ratuser1's AI agent (Claude Opus 5.5)

Fixes #6072.

Horizon-only option captions joined label and value with a hard-coded ": ". They now go through options.generic_value (vanilla's CommonComponents.optionNameValue), and the two percent values through options.percent_value, so French gets Caption : value / 75 %, Chinese and Japanese Caption:value, and en_ud puts the value first.

  • horizon-client-core/text.rs: Text::translate_with_fallback (Component.translatableWithFallback) and Text::option_name_value. The fallback is English's "%s: %s", used only when the language has no key (no prepared resources, as in unit tests), so existing English output is unchanged.
  • graphics_ui.rs: labelled() (Simple, Advanced, HDR, Full Detail Distance) and new labelled_percent() for Resolution Scale and UI Brightness.
  • options_ui.rs: Extras button and list, Mods page, Shader packs page, native shader pack options.
  • shader_options.rs: profile label, option label and its shortened form.

Mod and shader pack names (their own text) use the same template as every other caption on the page.

Tests: horizon_captions_use_the_languages_separator (graphics, en_us/fr_fr/zh_cn/en_ud, with 26.3's templates) and extras_captions_use_the_languages_separator.

Self-check (python3 tools/pr_ready.py --quick, Windows):

Check Result
Scope ✅ 7 files, +461 −18
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 614 run, FAILED (errors=1, skipped=12) (2 min 15 s)
rustfmt ✅ (17 s)
clippy ✅ (3 min 17 s)
tests: horizon-client-core, horizon-client-render ✅ 1224 passed (3 min 33 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

Scope counts three untracked local files; the commit itself is 4 files, +143 −18.
The one Python error is test_port_regen.py::test_python_is_an_interpreter_that_runs: on this Windows machine a python3 on PATH points to a missing path (WinError 3). Unrelated to this change; CI runs on Linux.


🔄 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/7558 **Author:** [@ratuser1](https://github.com/ratuser1) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/6072-option-separators` --- ### 📝 Commits (1) - [`2753e0f`](https://github.com/horizon-rust/horizon/commit/2753e0f8b9b2500a8a3fc87f51c1165ec5c72ba6) Options: join Horizon captions with the language's separator (#6072) ### 📊 Changes **4 files changed** (+143 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/text.rs` (+22 -0) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+64 -3) 📝 `crates/horizon-client-render/src/options_ui.rs` (+48 -8) 📝 `crates/horizon-client-render/src/shader_options.rs` (+9 -7) </details> ### 📄 Description > 🤖 Opened by ratuser1's AI agent (Claude Opus 5.5) Fixes #6072. Horizon-only option captions joined label and value with a hard-coded `": "`. They now go through `options.generic_value` (vanilla's `CommonComponents.optionNameValue`), and the two percent values through `options.percent_value`, so French gets `Caption : value` / `75 %`, Chinese and Japanese `Caption:value`, and en_ud puts the value first. - `horizon-client-core/text.rs`: `Text::translate_with_fallback` (Component.translatableWithFallback) and `Text::option_name_value`. The fallback is English's `"%s: %s"`, used only when the language has no key (no prepared resources, as in unit tests), so existing English output is unchanged. - `graphics_ui.rs`: `labelled()` (Simple, Advanced, HDR, Full Detail Distance) and new `labelled_percent()` for Resolution Scale and UI Brightness. - `options_ui.rs`: Extras button and list, Mods page, Shader packs page, native shader pack options. - `shader_options.rs`: profile label, option label and its shortened form. Mod and shader pack names (their own text) use the same template as every other caption on the page. Tests: `horizon_captions_use_the_languages_separator` (graphics, en_us/fr_fr/zh_cn/en_ud, with 26.3's templates) and `extras_captions_use_the_languages_separator`. Self-check (`python3 tools/pr_ready.py --quick`, Windows): | Check | Result | | --- | --- | | Scope | ✅ 7 files, +461 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 614 run, FAILED (errors=1, skipped=12) (2 min 15 s) | | rustfmt | ✅ (17 s) | | clippy | ✅ (3 min 17 s) | | tests: horizon-client-core, horizon-client-render | ✅ 1224 passed (3 min 33 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | Scope counts three untracked local files; the commit itself is 4 files, +143 −18. The one Python error is `test_port_regen.py::test_python_is_an_interpreter_that_runs`: on this Windows machine a `python3` on PATH points to a missing path (WinError 3). Unrelated to this change; CI runs on Linux. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7669
No description provided.