Skip to content

feat(strategies): make the human captions a preference, on by default - #447

Merged
kirillDevPro merged 1 commit into
mainfrom
feat/strategies-human-labels-toggle
Sep 7, 2026
Merged

feat(strategies): make the human captions a preference, on by default#447
kirillDevPro merged 1 commit into
mainfrom
feat/strategies-human-labels-toggle

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

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.

  • Off: sections pane keeps one line per section, the parameters header reads Main instead of Main · Основные, field rows keep only the identifier. Help tooltips are unaffected.
  • Persisted as one optional lenient key in layout.toml (strategies_human_labels), resolved through the existing PrefRow table: an absent key keeps the default, a malformed hand edit cannot discard the layout.
  • New locale key strat.settings.human_labels (ru/en/es).

How to verify

  1. Open the Strategies window → gear next to "active" → uncheck "Caption sections and fields in my language".
  2. Section list, parameters header and field rows lose the second line; hover a field still shows its help.
  3. Restart — the choice sticks.

cargo test --workspace green, cargo fmt --all -- --check clean, make tour-check up to date.

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.
@kirillDevPro
kirillDevPro merged commit 600bc07 into main Sep 7, 2026
6 checks passed
@kirillDevPro
kirillDevPro deleted the feat/strategies-human-labels-toggle branch September 7, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant