[PR #4173] [CLOSED] Launcher and game: the strings that were never translated, in Russian #5459

Closed
opened 2026-11-03 05:12:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4173
Author: @Domanffe
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: feat/ru-strings


📝 Commits (3)

  • 8e5dd8c Launcher: the Settings and Home strings that never reached tr()
  • abc2216 Graphics screens: their text through the language table
  • 140c9dc Launcher: no borrow clippy says is needless

📊 Changes

13 files changed (+583 additions, -67 deletions)

View changed files

📝 crates/horizon-client-render/src/graphics_style.rs (+4 -2)
📝 crates/horizon-client-render/src/graphics_ui.rs (+34 -19)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+133 -1)
📝 crates/horizon-client/assets/horizon/lang/ru_ru.json (+133 -1)
📝 launcher/lang/de.json (+30 -1)
📝 launcher/lang/es.json (+30 -1)
📝 launcher/lang/fr.json (+30 -1)
📝 launcher/lang/pl.json (+30 -1)
📝 launcher/lang/ru.json (+30 -1)
📝 launcher/lang/uk.json (+30 -1)
📝 launcher/lang/zh.json (+30 -1)
📝 launcher/src/line_edit.rs (+1 -1)
📝 launcher/src/main.rs (+68 -36)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

Two halves of one problem: text nobody can translate, in the launcher and in the game.

The launcher. Twenty-nine strings were literals drawn straight into the window, so tr() never saw them and the tables never had them: the Settings rows for the game arguments and the proxy and both of their explanations, the two field placeholders of those rows, Manage versions, follows updates, VERSION, No version, Got it, Loading releases…, No releases yet., Couldn't load releases. {error}, No build for this platform, In use, Installed, the patch notes' empty and failed states, Launcher updated to {version}, the download percentage, Minecraft {version}, {count} playing now, {version} available, Signed in as {name}., Support the work below and the sponsors sentence. Every one of them is a tr/trf call now, and every table has the key: Russian in ru.json, the English source in the other six, which is what an untranslated entry looks like in this launcher (they show English, as they did before).

One place covers four of them at once: line_edit::content draws every text field's placeholder, so the placeholder goes through the table there instead of at each field. For example --server-thread, For example http://127.0.0.1:7890, Paste an invite code and Search, then Enter are keys now.

The game. The graphics screens (Simple, Advanced, HDR) are the largest untranslated surface: 100 strings, and none of them could reach the table because they never pass a key. They are English display text handed to a widget, so the widget's text is the key and the table holds the Russian: labelled() translates a control's caption and its value, graphics_style::description translates the sentence before it wraps it, and the headers, page titles, cost tags, blocked reasons and the two level buttons go through lang::get where they are drawn. Values composed with a number became templates the table can hold (%s chunks, Auto (%s nits), %s MiB/frame), which format_translation already reads.

That shape is a trade: the keys are English sentences rather than horizon.graphics.* names, because the alternative is rewriting a hundred call sites instead of six. A key the table lacks shows the English sentence, never a key name, so a miss looks like untranslated text rather than a bug.

en_us.json and ru_ru.json gain the same 132 keys: the sentences, the captions, the values (Off, Unlimited, Vulkan, Ultra Performance…) and the templates.

What is still English, from the same audit (195 strings in 14 files): the Extras page (33), the Play with Friends screen and its chat lines (17), the connecting screen and its messages (10), pre-generation messages (8), the title screen (4), the loading-stage labels (4), and three in mods. They are the next slice, not this one.

Evidence.

  • cargo test -p horizon-client-core --lib lang — the bundled tables still carry every key in both languages.
  • cargo test -p horizon-client-render --lib graphics — the screens' own tests (layout, scrollbar, cycling) still pass with the lookups in the draw path.
  • cd launcher && cargo test --lib i18n — all five launcher table tests, including "every language has every string the code asks for".
  • Coverage of the graphics page was measured with a throwaway test in graphics_ui that walked rows() for all three levels and asserted every header, description and Horizon caption has a ru_ru entry: 0 missing. It is not in this branch (it reads another crate's asset file), and this line is the record of it.
  • The launcher was built and looked at on Windows (HORIZON_LAUNCHER_HOME, HORIZON_LAUNCHER_PAGE=settings, Russian): the Settings page shows Аргументы игры, Прокси, both explanations and both placeholders in Russian.
  • Not observed: the game's graphics screens on screen. Building the client and driving it needs the prepared resources and a real window, so the Russian there rests on the tests and on the catalog, not on a screenshot. That is the one thing this PR does not show.

Scope, and two reds. The block flags 13 files and both halves in one change. They are one change — the strings nobody could translate — and they are split by crate in two commits because the launcher's tables and the game's catalog share nothing. title::tests::each_world_preset_writes_its_own_generator fails on Windows with os error 267: it makes a folder out of preset.id(), which is minecraft:normal, and a colon is not a legal path character there. git diff origin/main -- crates/horizon-client/src/title/ crates/horizon-client/src/save.rs is empty, so this branch does not touch it.

The pr_ready block follows as a comment.


🔄 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/4173 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/ru-strings` --- ### 📝 Commits (3) - [`8e5dd8c`](https://github.com/horizon-rust/horizon/commit/8e5dd8c61900a7d97b93efa02a5ef7f96141ce97) Launcher: the Settings and Home strings that never reached tr() - [`abc2216`](https://github.com/horizon-rust/horizon/commit/abc22160c9df38d63cd1ad74b07b06c3bd3b592e) Graphics screens: their text through the language table - [`140c9dc`](https://github.com/horizon-rust/horizon/commit/140c9dceb4a25e0e44128a32967d32717dd9ede6) Launcher: no borrow clippy says is needless ### 📊 Changes **13 files changed** (+583 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/graphics_style.rs` (+4 -2) 📝 `crates/horizon-client-render/src/graphics_ui.rs` (+34 -19) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+133 -1) 📝 `crates/horizon-client/assets/horizon/lang/ru_ru.json` (+133 -1) 📝 `launcher/lang/de.json` (+30 -1) 📝 `launcher/lang/es.json` (+30 -1) 📝 `launcher/lang/fr.json` (+30 -1) 📝 `launcher/lang/pl.json` (+30 -1) 📝 `launcher/lang/ru.json` (+30 -1) 📝 `launcher/lang/uk.json` (+30 -1) 📝 `launcher/lang/zh.json` (+30 -1) 📝 `launcher/src/line_edit.rs` (+1 -1) 📝 `launcher/src/main.rs` (+68 -36) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. Two halves of one problem: text nobody can translate, in the launcher and in the game. **The launcher.** Twenty-nine strings were literals drawn straight into the window, so `tr()` never saw them and the tables never had them: the Settings rows for the game arguments and the proxy and both of their explanations, the two field placeholders of those rows, `Manage versions`, `follows updates`, `VERSION`, `No version`, `Got it`, `Loading releases…`, `No releases yet.`, `Couldn't load releases. {error}`, `No build for this platform`, `In use`, `Installed`, the patch notes' empty and failed states, `Launcher updated to {version}`, the download percentage, `Minecraft {version}`, `{count} playing now`, `{version} available`, `Signed in as {name}.`, `Support the work below` and the sponsors sentence. Every one of them is a `tr`/`trf` call now, and every table has the key: Russian in `ru.json`, the English source in the other six, which is what an untranslated entry looks like in this launcher (they show English, as they did before). One place covers four of them at once: `line_edit::content` draws every text field's placeholder, so the placeholder goes through the table there instead of at each field. `For example --server-thread`, `For example http://127.0.0.1:7890`, `Paste an invite code` and `Search, then Enter` are keys now. **The game.** The graphics screens (Simple, Advanced, HDR) are the largest untranslated surface: 100 strings, and none of them could reach the table because they never pass a key. They are English display text handed to a widget, so the widget's text is the key and the table holds the Russian: `labelled()` translates a control's caption and its value, `graphics_style::description` translates the sentence before it wraps it, and the headers, page titles, cost tags, blocked reasons and the two level buttons go through `lang::get` where they are drawn. Values composed with a number became templates the table can hold (`%s chunks`, `Auto (%s nits)`, `%s MiB/frame`), which `format_translation` already reads. That shape is a trade: the keys are English sentences rather than `horizon.graphics.*` names, because the alternative is rewriting a hundred call sites instead of six. A key the table lacks shows the English sentence, never a key name, so a miss looks like untranslated text rather than a bug. `en_us.json` and `ru_ru.json` gain the same 132 keys: the sentences, the captions, the values (`Off`, `Unlimited`, `Vulkan`, `Ultra Performance`…) and the templates. **What is still English**, from the same audit (195 strings in 14 files): the Extras page (33), the Play with Friends screen and its chat lines (17), the connecting screen and its messages (10), pre-generation messages (8), the title screen (4), the loading-stage labels (4), and three in `mods`. They are the next slice, not this one. **Evidence.** - `cargo test -p horizon-client-core --lib lang` — the bundled tables still carry every key in both languages. - `cargo test -p horizon-client-render --lib graphics` — the screens' own tests (layout, scrollbar, cycling) still pass with the lookups in the draw path. - `cd launcher && cargo test --lib i18n` — all five launcher table tests, including "every language has every string the code asks for". - Coverage of the graphics page was measured with a throwaway test in `graphics_ui` that walked `rows()` for all three levels and asserted every header, description and Horizon caption has a `ru_ru` entry: 0 missing. It is not in this branch (it reads another crate's asset file), and this line is the record of it. - The launcher was built and looked at on Windows (`HORIZON_LAUNCHER_HOME`, `HORIZON_LAUNCHER_PAGE=settings`, Russian): the Settings page shows Аргументы игры, Прокси, both explanations and both placeholders in Russian. - Not observed: the game's graphics screens on screen. Building the client and driving it needs the prepared resources and a real window, so the Russian there rests on the tests and on the catalog, not on a screenshot. That is the one thing this PR does not show. **Scope, and two reds.** The block flags 13 files and both halves in one change. They are one change — the strings nobody could translate — and they are split by crate in two commits because the launcher's tables and the game's catalog share nothing. `title::tests::each_world_preset_writes_its_own_generator` fails on Windows with os error 267: it makes a folder out of `preset.id()`, which is `minecraft:normal`, and a colon is not a legal path character there. `git diff origin/main -- crates/horizon-client/src/title/ crates/horizon-client/src/save.rs` is empty, so this branch does not touch it. The pr_ready block follows as a comment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:44 +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#5459
No description provided.