Add optional manual material/entity name translations in locale files#286
Merged
Conversation
Material and entity names in the limits GUI and hit-limit messages were always the prettified English Bukkit IDs. Locale files may now provide translations under island.limits.materials.<material> and island.limits.entities.<entity> (lowercase Bukkit names), following the same pattern as Challenges. Anything not listed falls back to the automatic English name, so the sections are entirely optional. Fixes #188 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB
c41e1d0 to
6878631
Compare
|
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.



Fixes #188.
Follows the Challenges pattern the reporter asked for: locale files can now translate the block/entity names shown in the limits GUI and in hit-limit chat messages.
Material/EntityTypenames; anything not listed falls back to the automatic prettified English name, so the sections are optional and existing locale files need no changes.DisplayNameshelper centralises the lookup; it's applied in the limits panel (block rows, entity rows, group member lists) and in every hit-limit notification (block, hanging place, entity spawn, nearby-player broadcast).en-US.yml.Tests cover translated and fallback paths for both materials and entities. Full suite green.
In-game check: add
materials: { hopper: "Trichter" }to your locale,/ob limits→ the hopper row shows "Trichter"; hit the hopper limit → the message uses "Trichter".🤖 Generated with Claude Code
https://claude.ai/code/session_015dbJyrv2uxHfTmiWkqGUJB