Skip to content

Help: Changed help and pagination to translatable components - #17

Merged
whereareiam merged 1 commit into
devfrom
feature/translatable-help
Nov 8, 2026
Merged

whereareiam merged 1 commit into
devfrom
feature/translatable-help

Conversation

@whereareiam

@whereareiam whereareiam commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Help and pagination are now Adventure components that each reader's translator renders, instead of one MiniMessage string for everyone.

  • HelpBuilder.build returns a Component made of translatable keys under a prefix the plugin chooses (for example arbor.help). Named arguments come from an ArgumentFactory the plugin passes, such as semantica's TextArgument::of. Commandant does not depend on semantica.
  • HelpBuilder.Text and PaginationBuilder.Text list every key with the named arguments it gets, and plugins write the texts in their own wording: title{host}, command{command, arguments, description}, argument{name}, optionalArgument{name}, empty, and under pagination: line{current, max, previous, next}, previous{page}, next{page}.
  • TranslatableDescription.of(key) gives a command a translatable description. The help renders any Description that is also a ComponentLike as that component.
  • Commandant puts the click event on the page arrows itself, from pageCommand, so translations need no click tags.
  • HelpMessages, PaginationMessages and the token path are removed. CommandantSyntaxFormatter now takes its two argument templates as strings.
  • It compiles against Adventure 4.17. Every Adventure method it calls exists with the same descriptor in 5.2.0 (checked with javap).

Release notes

  • The title follows Area: Description with a listed area
  • The title describes the effect in the past tense, for example Help: Fixed ...
  • Exactly one label: feature, change, bug, dependencies, or skip-changelog
  • bug only for a bug that shipped in a release; a fix for a bug that only existed on dev is skip-changelog
  • major added when plugins must change their code on upgrade
  • Upgrade steps added to .github/release-notes.md, if plugins need them

Checks

  • Tests added or updated
  • Javadocs updated for changed public API

🤖 Generated with Claude Code

@whereareiam whereareiam added change Changed behavior, configuration or API major Users or developers must act on upgrade labels Nov 8, 2026
whereareiam added a commit to whereareiam/chassis that referenced this pull request Nov 8, 2026
The module commands carry Commandant's TranslatableDescription of
<prefix>description.<name>, so Commandant's help shows them in each reader's
language; ExtensionMessages holds their English descriptions in the host's
words. Commandant moves to 2.0.0-local-aa2ac7e, the local build of
whereareiam/commandant#17, until that release is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Help and pagination are built from translatable components under a prefix
the plugin chooses, with named arguments from an ArgumentFactory such as
semantica's TextArgument::of. HelpBuilder.Text and PaginationBuilder.Text
list the keys and their arguments; plugins write the texts in their own
wording. TranslatableDescription gives commands translatable descriptions.
HelpMessages, PaginationMessages and the token path are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam
whereareiam force-pushed the feature/translatable-help branch from 517e3bb to f036759 Compare November 8, 2026 16:24
@whereareiam
whereareiam merged commit b9903b5 into dev Nov 8, 2026
2 checks passed
whereareiam added a commit to whereareiam/chassis that referenced this pull request Nov 9, 2026
The module commands carry Commandant's TranslatableDescription of
<prefix>description.<name>, so Commandant's help shows them in each reader's
language; ExtensionMessages holds their English descriptions in the host's
words. Commandant moves to 2.0.0-local-aa2ac7e, the local build of
whereareiam/commandant#17, until that release is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change Changed behavior, configuration or API major Users or developers must act on upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant