feat: localize menu chrome, results, baseline prompt, and command palette#13
Merged
Conversation
…ette Footer binding labels and the dashboard tagline rendered in English even with a Russian UI locale, because BINDINGS descriptions and the tagline were static literals fixed at import time. Translate footer labels via an active_bindings override on AppScreen (read by the Footer on every recompose), and drive the tagline from the translator. Also localize the results-screen body (summary_lines now takes an injected translator + locale), the baseline prompt buttons, and the command palette (system command titles/help and the search placeholder). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
on_screen_resume re-assigned the same ListView index after clearing and re-extending the list. Re-assigning an unchanged reactive is a no-op, so watch_index never re-applied the -highlight class to the rebuilt rows and the selected lesson became invisible at startup and after a lesson. Await clear/extend so the index is restored against the rebuilt rows, and clear the index first to force the watcher to run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add drift-guard tests asserting every footer binding and Textual system command has an i18n key, and that the map keys still match Textual's English strings. Drop the unused footer.yes/footer.skip keys, default a menu rebuild with no selection to the first row, and expand the docs on the i18n maps and command-palette override. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collapse the repeated translator/ui_locale lookup into a single AppScreen.t(key) method and route footer, menu, settings, and baseline prompt strings through it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
With a Russian UI locale, parts of the interface still rendered in English. This translates the remaining chrome so the whole visible UI follows the selected UI language.
palettelabel.How
AppScreen.active_bindingsis overridden to translate each binding's description to the current UI locale. TheFooterreads this property on every recompose, so labels stay in sync without mutating the staticBINDINGS.MenuScreen.on_screen_resumecallsrefresh_bindings()so the menu footer updates after a language switch in settings.ResultsScreen.summary_linestakes an injectedtranslator+locale, keeping it unit-testable without a running TUI.BaselinePromptacceptsyes_label/skip_label, passed translated from the menu.TypeHeroApp.get_system_commandsrewrites built-in command title/help via a map keyed on the unique English help string, preserving Textual's stateful callbacks;action_command_palettepasses a translated placeholder.footer.*,results.*,baseline.*, andpalette.*keys inen.yaml/ru.yaml.Tests
Added regression tests for footer/tagline localization, live language-switch refresh, results-body localization, baseline button labels, and palette command/placeholder localization. Full suite: 269 passed;
ruffandtyclean.🤖 Generated with Claude Code