Repository navigation
i18n: translate sheet tab context menu and AutoSave toggle (fixes #1537) - #1754
Merged
Merged
Conversation
) The sheet tab context menu buttons (Insert Sheet, Rename, Move or Copy…, Duplicate, Tab Color, Hide, Unhide…, Protect/Unprotect Sheet, Select All Sheets), the navigation tooltips (Previous/Next/All sheets, New sheet), and the AutoSave toggle label and tooltip in the ribbon were all hardcoded English — they were never routed through lang.tr(). Fix: - tabs.rs: wrap every hardcoded UI string with app.ui.language.tr(…) - ribbon.rs: wrap the AutoSave label and hover text with lang.tr(…) - i18n/cs,de,es,fr,ko,pt,ru,sr,zh: add the 130 missing translation entries (each language only gets the entries it was missing) Translations produced from first-principles per language, following the terminology used for other sheet/workbook strings already in each file. Closes storytold#1537
Contributor
|
Thanks for this! It now conflicts with
The Portuguese tooltip in this PR reads correctly to us (Brazilian Portuguese speakers). Feel free to Tested on Linux: (Prepared with the help of an AI coding agent.) |
aiongg
added a commit
to aiongg/gridcraft
that referenced
this pull request
Oct 22, 2026
aiongg
added a commit
to aiongg/gridcraft
that referenced
this pull request
Oct 22, 2026
…anish Hide and Autoguardado; test that the sheet-tab and AutoSave labels translate in es, de, fr, ko, ru, zh, sr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #1537 — with a non-English interface language set (e.g. Spanish on Linux/Fedora), the following UI elements remained in English regardless of the locale:
Root cause: All these strings were hardcoded literals in
tabs.rsandribbon.rs— none were passed throughlang.tr(), so they could never be translated. Additionally, the matching translation entries were absent from all 9 language files.Changes
crates/ui-egui/src/tabs.rs— wrap every hardcoded UI string (navigation tooltips, context menu buttons) withapp.ui.language.tr(…). Thetr()plumbing was already wired for other strings in the same file; these were simply overlooked.crates/ui-egui/src/ribbon.rs— wrap the AutoSave label ("AutoSave") and hover text withapp.ui.language.tr(…).crates/ui-egui/src/i18n/{cs,de,es,fr,ko,pt,ru,sr,zh}.rs— add the 130 missing translation entries (each file only receives what it was missing; strings already present are untouched).Translations follow the terminology of the surrounding strings already in each file.
Testing
cargo check -p gridcraft-ui-egui— cleancargo test -p gridcraft-ui-egui --lib— 92 tests, all pass