Skip to content

Add optional manual material/entity name translations in locale files#286

Merged
tastybento merged 1 commit into
masterfrom
feat/188-material-translations
Jul 10, 2026
Merged

Add optional manual material/entity name translations in locale files#286
tastybento merged 1 commit into
masterfrom
feat/188-material-translations

Conversation

@tastybento

Copy link
Copy Markdown
Member

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.

island:
  limits:
    materials:
      hopper: "漏斗"
    entities:
      enderman: "末影人"
  • Keys are lowercase Bukkit Material / EntityType names; anything not listed falls back to the automatic prettified English name, so the sections are optional and existing locale files need no changes.
  • A new DisplayNames helper 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).
  • Commented showcase entries added to 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

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
@tastybento tastybento force-pushed the feat/188-material-translations branch from c41e1d0 to 6878631 Compare July 10, 2026 20:33
@sonarqubecloud

Copy link
Copy Markdown

@tastybento tastybento merged commit ec0c148 into master Jul 10, 2026
3 checks passed
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