[GH-ISSUE #6072] Options: Horizon's own captions hard-code ": " between label and value, so French, Chinese and Japanese get the wrong separator #1956

Open
opened 2026-11-02 15:50:54 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @mariuslozo-boop on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6072

Originally assigned to: @ratuser1 on GitHub.

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

Horizon-only option captions (the Extras page, Horizon's Graphics pages, Mods, Shader packs) join the label and the value with a literal ": ". Vanilla builds the same caption with the translatable options.generic_value, and some languages use a different separator.

What vanilla does

Options.genericValueLabel (Options.java:2014-2016) and CommonComponents.optionNameValue (CommonComponents.java:61-63) both return Component.translatable("options.generic_value", caption, value). Percent and pixel values use options.percent_value / options.pixel_value (Options.java:2006-2012). The values in 26.3's lang files (.local/.../assets/minecraft/lang/*.json):

language options.generic_value options.percent_value
en_us "%s: %s" "%s: %s%%"
fr_fr, fr_ca, fr_ch "%s : %s" "%s : %s %%"
de_de "%s: %s" "%s: %s %%"
zh_cn, zh_hk, zh_tw, ja_jp "%s:%s" (full-width colon) "%s:%s%%"
lzh "%s: %s"
en_ud "%2$s :%1$s" (value first)

A hand-written format!("{}: {}") cannot give any of these.

Where Horizon does it by hand (all on 183b53f0e)

  • crates/horizon-client-render/src/graphics_ui.rs:476-479, labelled(): format!("{}: {}", lang::get(caption), lang::get(&value)). It builds every Horizon-only caption of the Simple, Advanced and HDR pages (graphics_ui.rs:530-618), and "Full Detail Distance", which replaces vanilla's Render Distance caption while LOD is on (graphics_ui.rs:791-794). Its percent values are also written by hand (format!("{}%", ..), graphics_ui.rs:570 and :611), where fr_fr and de_de put a space before the %.
  • crates/horizon-client-render/src/options_ui.rs:1979 (extra_button) and :2277 (the Extras page's list): format!("{}: {}", item.caption(), item.value(&s.extras)).
  • options_ui.rs:2573 (Mods page, "Title: On") and :2636 (Shader packs page, "Pack: On").
  • options_ui.rs:1681 (native shader pack options, "Option: value") and crates/horizon-client-render/src/shader_options.rs:181 ("{}: " before the profile name; :228 and :239 append ": " after an option's name).

Vanilla screens Horizon ported look fine. The vanilla option labels in options_ui.rs use generic(), percent() and chat_px() (options_ui.rs:22-41), and so do Create World, Game Rules, LAN, Command Block, Jigsaw and the debug options (rg options.generic_value crates). A search of horizon-client and horizon-client-render for hand-built label: value text finds only the lines above and debug/log output, so I found no ported vanilla screen that formats a caption by hand. So this is a localization bug on Horizon-only pages, not a parity bug.

How it was seen

A temporary unit test (not committed) in options_ui.rs loaded the real 26.3 lang files with Language::load for four languages and printed the Extras button (extra_button), a Horizon Graphics caption (graphics_ui::Item::Horizon(H::CaveCulling).label), a vanilla Graphics caption (Item::Vanilla(Opt::Vsync).label) and generic("options.fov", "On"):

en_us: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[VSync: ON] generic_value=[FOV: On]
fr_fr: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[Synchro verticale : Oui] generic_value=[Champ de vision : On]
zh_cn: extras=[Fullbright: Off] graphics_horizon=[洞穴剔除: 开] graphics_vanilla=[垂直同步:开] generic_value=[视场角:On]
ja_jp: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[垂直同期:オン] generic_value=[視野:On]

In zh_cn the Horizon caption is translated (洞穴剔除) but joined with an ASCII ": ", while the vanilla one on the same page uses :. In fr_fr the vanilla caption has a space before the colon and Horizon's does not.

Open PRs. #5643 (Extras captions and tooltips into the language table) changes these two lines to format!("{}: {}", item.caption_text(), ..): the caption becomes translatable, the separator stays hard-coded. #5644 and #5645 don't touch any of the lines above (#5644 only moves "Shortcut:" and the HDR calibration strings to %s templates). So the separator in the Extras page and everywhere else listed here is still open after all three.

Not known

  • How the shader-pack and mod names (their own text) should join a value; vanilla has no such screen.
  • Whether the English "On"/"Off" values and the Horizon % and x suffixes should get their own keys; that is the value side, a separate question from the separator.
  • Not tested: ar_sa and other right-to-left languages, where the order matters more.

Likely fix. Build these captions with Text::translate("options.generic_value", ..) (the generic() helper in options_ui.rs), and options.percent_value for percent values.

Originally created by @mariuslozo-boop on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6072 Originally assigned to: @ratuser1 on GitHub. > 🤖 Filed by mariuslozo-boop's AI agent (Claude Code, Claude Sonnet 5.5 + Claude Opus 5.5 review), not by mariuslozo-boop personally. Horizon-only option captions (the Extras page, Horizon's Graphics pages, Mods, Shader packs) join the label and the value with a literal `": "`. Vanilla builds the same caption with the translatable `options.generic_value`, and some languages use a different separator. **What vanilla does** `Options.genericValueLabel` (`Options.java:2014-2016`) and `CommonComponents.optionNameValue` (`CommonComponents.java:61-63`) both return `Component.translatable("options.generic_value", caption, value)`. Percent and pixel values use `options.percent_value` / `options.pixel_value` (`Options.java:2006-2012`). The values in 26.3's lang files (`.local/.../assets/minecraft/lang/*.json`): | language | `options.generic_value` | `options.percent_value` | | --- | --- | --- | | en_us | `"%s: %s"` | `"%s: %s%%"` | | fr_fr, fr_ca, fr_ch | `"%s : %s"` | `"%s : %s %%"` | | de_de | `"%s: %s"` | `"%s: %s %%"` | | zh_cn, zh_hk, zh_tw, ja_jp | `"%s:%s"` (full-width colon) | `"%s:%s%%"` | | lzh | `"%s: %s"` | | | en_ud | `"%2$s :%1$s"` (value first) | | A hand-written `format!("{}: {}")` cannot give any of these. **Where Horizon does it by hand** (all on `183b53f0e`) - `crates/horizon-client-render/src/graphics_ui.rs:476-479`, `labelled()`: `format!("{}: {}", lang::get(caption), lang::get(&value))`. It builds every Horizon-only caption of the Simple, Advanced and HDR pages (`graphics_ui.rs:530-618`), and "Full Detail Distance", which replaces vanilla's Render Distance caption while LOD is on (`graphics_ui.rs:791-794`). Its percent values are also written by hand (`format!("{}%", ..)`, `graphics_ui.rs:570` and `:611`), where fr_fr and de_de put a space before the `%`. - `crates/horizon-client-render/src/options_ui.rs:1979` (`extra_button`) and `:2277` (the Extras page's list): `format!("{}: {}", item.caption(), item.value(&s.extras))`. - `options_ui.rs:2573` (Mods page, "Title: On") and `:2636` (Shader packs page, "Pack: On"). - `options_ui.rs:1681` (native shader pack options, "Option: value") and `crates/horizon-client-render/src/shader_options.rs:181` (`"{}: "` before the profile name; `:228` and `:239` append `": "` after an option's name). **Vanilla screens Horizon ported look fine.** The vanilla option labels in `options_ui.rs` use `generic()`, `percent()` and `chat_px()` (`options_ui.rs:22-41`), and so do Create World, Game Rules, LAN, Command Block, Jigsaw and the debug options (`rg options.generic_value crates`). A search of `horizon-client` and `horizon-client-render` for hand-built `label: value` text finds only the lines above and debug/log output, so I found no ported vanilla screen that formats a caption by hand. So this is a localization bug on Horizon-only pages, not a parity bug. **How it was seen** A temporary unit test (not committed) in `options_ui.rs` loaded the real 26.3 lang files with `Language::load` for four languages and printed the Extras button (`extra_button`), a Horizon Graphics caption (`graphics_ui::Item::Horizon(H::CaveCulling).label`), a vanilla Graphics caption (`Item::Vanilla(Opt::Vsync).label`) and `generic("options.fov", "On")`: ``` en_us: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[VSync: ON] generic_value=[FOV: On] fr_fr: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[Synchro verticale : Oui] generic_value=[Champ de vision : On] zh_cn: extras=[Fullbright: Off] graphics_horizon=[洞穴剔除: 开] graphics_vanilla=[垂直同步:开] generic_value=[视场角:On] ja_jp: extras=[Fullbright: Off] graphics_horizon=[Cave Culling: On] graphics_vanilla=[垂直同期:オン] generic_value=[視野:On] ``` In zh_cn the Horizon caption is translated (`洞穴剔除`) but joined with an ASCII `": "`, while the vanilla one on the same page uses `:`. In fr_fr the vanilla caption has a space before the colon and Horizon's does not. **Open PRs.** #5643 (Extras captions and tooltips into the language table) changes these two lines to `format!("{}: {}", item.caption_text(), ..)`: the caption becomes translatable, the separator stays hard-coded. #5644 and #5645 don't touch any of the lines above (#5644 only moves "Shortcut:" and the HDR calibration strings to `%s` templates). So the separator in the Extras page and everywhere else listed here is still open after all three. **Not known** - How the shader-pack and mod names (their own text) should join a value; vanilla has no such screen. - Whether the English "On"/"Off" values and the Horizon `%` and `x` suffixes should get their own keys; that is the value side, a separate question from the separator. - Not tested: ar_sa and other right-to-left languages, where the order matters more. **Likely fix.** Build these captions with `Text::translate("options.generic_value", ..)` (the `generic()` helper in `options_ui.rs`), and `options.percent_value` for percent values.
Author
Owner

@ratuser1 commented on GitHub (Nov 1, 2026):

/claim

<!-- gh-comment-id:6560995059 --> @ratuser1 commented on GitHub (Nov 1, 2026): /claim
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#1956
No description provided.