feat(i18n): P0 — migrate all in-game strings to Component.translatable() - #159
Merged
Conversation
Fixes a live rendering bug where the server module used MessageFormat {0}
placeholders that PluginTranslationRegistry cannot resolve, causing raw
placeholder text in-game instead of formatted messages.
Changes:
- Fix elytrarace_en_US.properties: replace all {0}/{1}/{2} with <arg:N>
MiniMessage syntax; add 12 new keys (hud.*, end.*, dev.*)
- Set MinestomAdventure.AUTOMATIC_COMPONENT_TRANSLATION = true so Minestom
renders Component.translatable() against GlobalTranslator before sending
packets to clients
- Add .join() to LanguageService initialization in Paper plugins so
translations are registered before any player command runs
- Delete GameHud.java / GameHudManager.java (duplicate of HudComponent ECS)
- Migrate server: HudComponent, MinestomEndPhase, DevStartCommand,
VoyagerServer
- Add 70 new translation keys to setup plugin elytrarace.properties:
testfly.results.*, gui.portal.*, gui.cup.*, gui.cup.editor.*,
portal.label.name, wizard.*, map.status.*, spline.*, validation.*
- Migrate setup plugin: TestflyManager, PortalManagerGui, CupListGui,
CupEditorGui, CupGuiListener, PortalLabelManager, MapStatusCommand,
SplineConfigCommand, ValidationIssue, WizardManager, ElytraRace
- Add 4 keys to game plugin: game.motd.cup, game.motd.ingame,
game.init.test_cup, portal.display.label
- Migrate game plugin: DefaultListener, SimpleElytraRace, GamePortalDTO,
ElytraRace
- Replace hardcoded languages.add("en-US") in LanguageServiceImpl with
dynamic folder scan (discoverLanguagesFromFolder)
- Add key-coverage tests: TranslationKeysCoverageTest (server),
SetupTranslationKeysTest (setup), LanguageServiceImplTest (shared/common)
- Add docs/guides/how-to-add-a-translation.md
- Update CLAUDE.md: add <arg:N> vs {N} convention note
voyager-release-bot Bot
pushed a commit
that referenced
this pull request
Apr 25, 2026
# [1.4.0](v1.3.0...v1.4.0) (2026-04-25) ### Features * **i18n:** P0 — migrate all in-game strings to Component.translatable() ([#159](#159)) ([ea04435](ea04435))
|
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
elytrarace_en_US.propertiesused{0}(MessageFormat) placeholders thatPluginTranslationRegistrycannot resolve — players saw raw{0}text instead of valuesMinestomAdventure.AUTOMATIC_COMPONENT_TRANSLATION = truewas missing —Component.translatable()was sent as raw keys to clients.join()onloadLanguage()so translations are ready before player commands runComponent.text("...")toComponent.translatable("key", ...)GameHud.java/GameHudManager.javadeleted —HudComponent(ECS) is the authoritative HUD classLanguageServiceImplnow scanslang/folder dynamically instead of hardcodingen-USTranslationKeysCoverageTest,SetupTranslationKeysTest,LanguageServiceImplTestdocs/guides/how-to-add-a-translation.mdAffected modules
serverplugins/setupplugins/gameshared/commonLanguageServiceImplmulti-locale discoveryDeferred (P1)
HelpCommand(~30 admin-only strings) — no player impact, out of scope for this PR.Test plan
./gradlew :shared:common:test—LanguageServiceImplTest(7 tests)./gradlew :server:test—TranslationKeysCoverageTest(3×17 parameterized)./gradlew :plugins:setup:test—SetupTranslationKeysTest(3×196 parameterized){0}phase.lobby.player.joinrenders with player name and count🤖 Generated with Claude Code