feat(strategies): make the human captions a preference, on by default - #447
Merged
Conversation
The localized name under every section title and field identifier (#441) is useful to someone reading a strategy in their own language and noise to someone who thinks in Moonbot's identifiers and wants a denser pane. Both are real users of the same window, so the caption becomes a preference in the Strategies settings gear rather than a fixed part of the row. It ships ON: the captions arrived on by construction, so keeping them is what leaves an upgraded pane unchanged. Off, the sections pane keeps one line per section, the parameters header reads `Main` instead of `Main · Основные`, and a field row keeps only the name the core speaks — the help tooltip is unaffected, it never was a translation of the name. Persisted as one optional lenient key in layout.toml next to the other Strategies preferences, resolved through the same PrefRow table, so an absent key keeps the default and a malformed hand edit cannot discard the surrounding layout.
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 & why
The localized caption under every section title and field identifier in the Strategies window (#441) becomes a preference — a checkbox in the window's settings gear, on by default. Some users read a strategy in their own language; others think in Moonbot's identifiers and want a denser pane.
Maininstead ofMain · Основные, field rows keep only the identifier. Help tooltips are unaffected.layout.toml(strategies_human_labels), resolved through the existingPrefRowtable: an absent key keeps the default, a malformed hand edit cannot discard the layout.strat.settings.human_labels(ru/en/es).How to verify
cargo test --workspacegreen,cargo fmt --all -- --checkclean,make tour-checkup to date.