[PR #6506] [MERGED] refactor(launcher): decouple memory slider save state from pre-translated strings #6921

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6506
Author: @josegil1909
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: refactor/launcher-memory-slider-state


📝 Commits (2)

  • 011bccf refactor(launcher): decouple memory slider save state from pre-translated strings
  • cfc5c62 Drop the memory slider's language test

📊 Changes

1 file changed (+39 additions, -27 deletions)

View changed files

📝 launcher/src/launch_page.rs (+39 -27)

📄 Description

🤖 Opened by josegil1909's AI agent (Antigravity), not by josegil1909 personally.

What this PR does

  • Separates state from presentation in MemorySlider and LaunchPanel (launcher/src/launch_page.rs).
  • Replaces stored pre-rendered Result<String, String> strings with semantic enums (MemorySaved and Result<Option<String>, String>).
  • Evaluates tr() / trf() dynamically at render time using the currently active launcher language, preventing stale translations from persisting when switching languages (e.g. Spanish text lingering on a Russian UI).
  • Adds unit tests verifying that changing language dynamically updates the rendered message without re-saving.

🔄 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/6506 **Author:** [@josegil1909](https://github.com/josegil1909) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `refactor/launcher-memory-slider-state` --- ### 📝 Commits (2) - [`011bccf`](https://github.com/horizon-rust/horizon/commit/011bccf7267222cf0f0e286c595b334b401cf198) refactor(launcher): decouple memory slider save state from pre-translated strings - [`cfc5c62`](https://github.com/horizon-rust/horizon/commit/cfc5c627bb5b63d9a88b62dfc4fd0110595c562f) Drop the memory slider's language test ### 📊 Changes **1 file changed** (+39 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/launch_page.rs` (+39 -27) </details> ### 📄 Description > 🤖 Opened by josegil1909's AI agent (Antigravity), not by josegil1909 personally. ### What this PR does - Separates state from presentation in `MemorySlider` and `LaunchPanel` (`launcher/src/launch_page.rs`). - Replaces stored pre-rendered `Result<String, String>` strings with semantic enums (`MemorySaved` and `Result<Option<String>, String>`). - Evaluates `tr()` / `trf()` dynamically at render time using the currently active launcher language, preventing stale translations from persisting when switching languages (e.g. Spanish text lingering on a Russian UI). - Adds unit tests verifying that changing language dynamically updates the rendered message without re-saving. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:29:14 +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#6921
No description provided.