Skip to content

Commands: Changed the answers to translatable keys with named arguments - #6

Merged
whereareiam merged 1 commit into
devfrom
feature/commands-translatable
Nov 9, 2026
Merged

whereareiam merged 1 commit into
devfrom
feature/commands-translatable

Conversation

@whereareiam

@whereareiam whereareiam commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

ExtensionCommands no longer renders MiniMessage itself. Each answer is now Component.translatable(<prefix> + message, arguments...), so the host's translator in Adventure's GlobalTranslator can word it for each sender's language. Arbor needs this to translate /arbor module ….

  • keys(String) sets the key prefix. It defaults to <root>.<kind>., which for Arbor is arbor.module..
  • arguments(BiFunction<String, Object, ComponentLike>) names each argument, for example Semantica's TextArgument::of. Chassis does not depend on Semantica. Without this factory, the values are passed by position.
  • Values keep their types: count is an Integer. state (state.enabled|disabled|waiting|failed) and reason (reason{why}) are translatable components of their own.
  • Messages: list.header{count}, list.line{id, version, state, reason}, list.footer, list.empty, info{… name, description, authors, jar}, enabled|disabled|reloaded{id, version, state, reason}, rescanned{count}, unknown{id}, refused{id, why}, description.<command>. They are listed in the class Javadoc and in docs/content/developers/commands/.
  • Each command's description is TranslatableDescription.of(<prefix> + "description." + name) (Commandant dev-b9903b5, the development build that includes Help: Changed help and pagination to translatable components commandant#17).
  • Chassis ships no wording: ExtensionMessages is removed. The keys and arguments are the contract, and the host writes the messages in its own translations. The guide shows an example.
  • Removed: ExtensionMessages, Builder#messages(...) and the MiniMessage rendering, with no compatibility path. The module no longer needs MiniMessage. It compiles against Adventure 4.25, and its tests run on Adventure 5.2.0 (the version Arbor bundles).

API change to a public type of chassis-adapter-commandant. It is labelled skip-changelog because the adapter has not been released yet (there are no release tags).

Release notes

  • The title follows Area: Description with a listed area
  • The title describes the effect in the past tense
  • Exactly one label: skip-changelog, because the adapter has never shipped
  • major not needed, since nothing released changes
  • No upgrade notes needed

Checks

  • Tests added or updated (ExtensionCommandsTest checks keys and argument names)
  • Documentation under docs/content/ updated

🤖 Generated with Claude Code

@whereareiam whereareiam added the skip-changelog Left out of the release notes label Nov 8, 2026
@whereareiam
whereareiam force-pushed the feature/commands-translatable branch from 3cfcad0 to 9aa7c2e Compare November 9, 2026 09:17
… arguments

ExtensionCommands sends each answer as Component.translatable(<prefix> + message)
with arguments the host's factory names (Semantica's TextArgument::of), so the
host's translator words it for each sender. A state and a reason are
translatable components themselves; a count stays a number. Each command is
described by Commandant's TranslatableDescription of <prefix>description.<name>,
so Commandant's help is translated too. Chassis ships no wording: the keys and
their arguments are the contract, and the host writes the messages.

The MiniMessage rendering, ExtensionMessages and Builder#messages are gone.
Commandant moves to dev-b9903b5, the development build with translatable
descriptions. The module compiles against Adventure 4.25 and is tested on 5.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam
whereareiam force-pushed the feature/commands-translatable branch from 9aa7c2e to 63ed35d Compare November 9, 2026 09:18
@whereareiam
whereareiam merged commit 05c7f62 into dev Nov 9, 2026
3 of 4 checks passed
@whereareiam
whereareiam deleted the feature/commands-translatable branch November 9, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Left out of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant