[PR #2635] [MERGED] launcher: French and Russian, following the system's language #4491

Closed
opened 2026-11-03 04:17:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2635
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-language


📝 Commits (1)

  • b3709b9 launcher: French and Russian, following the system's language

📊 Changes

16 files changed (+610 additions, -56 deletions)

View changed files

📝 docs/launcher-commands.md (+2 -2)
📝 launcher/Cargo.lock (+1 -0)
📝 launcher/Cargo.toml (+2 -0)
📝 launcher/README.md (+6 -0)
➕ launcher/lang/fr.json (+87 -0)
➕ launcher/lang/ru.json (+87 -0)
📝 launcher/src/backend.rs (+25 -0)
📝 launcher/src/cli.rs (+15 -2)
➕ launcher/src/i18n.rs (+134 -0)
➕ launcher/src/i18n/tests.rs (+135 -0)
➕ launcher/src/language_page.rs (+35 -0)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+56 -31)
📝 launcher/src/skin_page.rs (+9 -6)
📝 launcher/src/switch_page.rs (+13 -13)
📝 launcher/src/while_playing.rs (+2 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Launcher features, item 19 (first part): the launcher translated. Stacked on #2632 (skins).

The brief asks for French and the languages the game's own UI already covers. Horizon's own game menus (crates/horizon-client/assets/horizon/lang/) have English and Russian, so the launcher gets English, French and Russian.

  • String table: launcher/lang/fr.json and ru.json map English text to its translation.
    • The code keeps its English strings and asks tr("…"), or trf("…{name}…", …) for strings with values (launcher/src/i18n.rs).
    • A string a table lacks shows in English, so a page can be translated bit by bit.
    • Buttons, segmented controls, section titles and page headers translate through their widgets. Element ids stay English, so agents' ui clicks keep working in any language.
  • Which language:
    • The system's by default: the first of its preferred languages the launcher has (fr-CH → French, de-CH, ru-RU → Russian), else English.
    • Settings > Launcher > Language picks one instead (System / English / Français / Русский, each named in itself). It switches the window at once.
    • settings.json gains language (left out while it follows the system). A code from a newer launcher follows the system and keeps the other settings.
  • Translated in this part:
    • the top bar and the account switch menu;
    • the Settings page's Account rows, offline names and skin panel;
    • Updates, Launcher (appearance, language, while playing, opening) and About (statuses, folders, logs);
    • the group titles.
    • That is 85 strings, written for Horizon: French and Russian in the formal "vous"/"вы", like the game.
    • The other pages are still English; the next part translates them.
  • CLI and MCP: settings language system|en|fr|ru, and settings shows language. The CLI itself stays English.
  • sys-locale becomes a direct dependency. It was already in the lock through GPUI, at the same version.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (189 + 36). The new tests:
    • Every language has every string the code asks for. The test scans launcher/src for tr("…") and trf("…"). A table can't keep a string the code no longer has. {holes} match, and no translation is empty.
    • The system language is the first one the launcher has, else English.
    • A missing string shows in English.
    • The setting follows the system unless picked; an unknown code keeps the rest of the settings.
  • CLI, scratch homes:
    • settings language fr → "language": "fr".
    • settings language xx → "xx: say system, en, fr or ru".
  • Window, scratch homes:
    • Opened in French: the top bar, the account chip ("Hors ligne"), Paramètres, the offline names and the Launcher rows were all French. Accents render in both fonts.
    • Clicking Русский switched the whole window to Russian at once and saved "language": "ru". Cyrillic renders in the pixel face.
Français Français, Launcher rows Русский Русский, Launcher rows

🤖 Generated with Claude Code


🔄 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/2635 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-language` --- ### 📝 Commits (1) - [`b3709b9`](https://github.com/horizon-rust/horizon/commit/b3709b9766f56743ac324031cb93b49fc9384fa0) launcher: French and Russian, following the system's language ### 📊 Changes **16 files changed** (+610 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+2 -2) 📝 `launcher/Cargo.lock` (+1 -0) 📝 `launcher/Cargo.toml` (+2 -0) 📝 `launcher/README.md` (+6 -0) ➕ `launcher/lang/fr.json` (+87 -0) ➕ `launcher/lang/ru.json` (+87 -0) 📝 `launcher/src/backend.rs` (+25 -0) 📝 `launcher/src/cli.rs` (+15 -2) ➕ `launcher/src/i18n.rs` (+134 -0) ➕ `launcher/src/i18n/tests.rs` (+135 -0) ➕ `launcher/src/language_page.rs` (+35 -0) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+56 -31) 📝 `launcher/src/skin_page.rs` (+9 -6) 📝 `launcher/src/switch_page.rs` (+13 -13) 📝 `launcher/src/while_playing.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Launcher features, item 19 (first part): the launcher translated. Stacked on #2632 (skins). The brief asks for French and the languages the game's own UI already covers. Horizon's own game menus (`crates/horizon-client/assets/horizon/lang/`) have English and Russian, so the launcher gets English, French and Russian. - **String table**: `launcher/lang/fr.json` and `ru.json` map English text to its translation. - The code keeps its English strings and asks `tr("…")`, or `trf("…{name}…", …)` for strings with values (`launcher/src/i18n.rs`). - A string a table lacks shows in English, so a page can be translated bit by bit. - Buttons, segmented controls, section titles and page headers translate through their widgets. Element ids stay English, so agents' `ui` clicks keep working in any language. - **Which language**: - The system's by default: the first of its preferred languages the launcher has (`fr-CH` → French, `de-CH, ru-RU` → Russian), else English. - Settings > Launcher > **Language** picks one instead (System / English / Français / Русский, each named in itself). It switches the window at once. - `settings.json` gains `language` (left out while it follows the system). A code from a newer launcher follows the system and keeps the other settings. - **Translated in this part**: - the top bar and the account switch menu; - the Settings page's Account rows, offline names and skin panel; - Updates, Launcher (appearance, language, while playing, opening) and About (statuses, folders, logs); - the group titles. - That is 85 strings, written for Horizon: French and Russian in the formal "vous"/"вы", like the game. - The other pages are still English; the next part translates them. - CLI and MCP: `settings language system|en|fr|ru`, and `settings` shows `language`. The CLI itself stays English. - `sys-locale` becomes a direct dependency. It was already in the lock through GPUI, at the same version. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (189 + 36). The new tests: - Every language has every string the code asks for. The test scans `launcher/src` for `tr("…")` and `trf("…")`. A table can't keep a string the code no longer has. `{holes}` match, and no translation is empty. - The system language is the first one the launcher has, else English. - A missing string shows in English. - The setting follows the system unless picked; an unknown code keeps the rest of the settings. - CLI, scratch homes: - `settings language fr` → `"language": "fr"`. - `settings language xx` → "xx: say system, en, fr or ru". - Window, scratch homes: - Opened in French: the top bar, the account chip ("Hors ligne"), Paramètres, the offline names and the Launcher rows were all French. Accents render in both fonts. - Clicking **Русский** switched the whole window to Russian at once and saved `"language": "ru"`. Cyrillic renders in the pixel face. | Français | Français, Launcher rows | Русский | Русский, Launcher rows | |---|---|---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/language/french.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/language/french-launcher.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/language/russian.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/language/russian-launcher.png) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:33 +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#4491
No description provided.