Skip to content

Convert all locale files to MiniMessage - #555

Merged
tastybento merged 1 commit into
developfrom
chore/minimessage-locales
Aug 14, 2026
Merged

Convert all locale files to MiniMessage#555
tastybento merged 1 commit into
developfrom
chore/minimessage-locales

Conversation

@tastybento

Copy link
Copy Markdown
Member

BentoBox text is MiniMessage now. The old &-codes still parse, so nothing is broken today — but leaving the files in the legacy format is what makes formatting bugs possible: any code that builds a fragment and drops it into a translation has to guess which format the target line is written in, and guessing wrong renders colour codes as literal text. (That is exactly the bug this started as, in ChunkBlock's chunk map.)

All 18 locale files are now MiniMessage.

How

Converted with BentoBox's own Util.legacyToMiniMessage, so each value now literally says what the runtime was already rendering — nothing hand-translated. Then tidied: a straight conversion closes and immediately reopens a tag wherever the old text repeated a colour code (every line of a multi-line flag description, every run split by a placeholder), so those </aqua><aqua> seams are closed up.

# before
      description: |-
        &b Rank that can break the magic
        &b block if they can break blocks.

# after
      description: |-
        <aqua>Rank that can break the magic
        block if they can break blocks.</aqua>

Verification

  • Every one of the 1506 values rendered before and after and compared per character, with the style each character ends up with. Nothing moved. (Comparing component trees was too strict — the tidy pass can nest <bold> inside <green> rather than the reverse, which is the same thing to a player.)
  • Placeholder checker reports the same 47 pre-existing issues across the translations as before, none new.
  • Comments, quoting style and numeric-looking values (wrap-at: '50') survive the round trip.
  • Full test suite green (570 tests).

Left alone deliberately

Ten values in vi, tr, it, es, fr, uk and ja contain a broken colour code — & c, & l, &un bloc — that never rendered as colour. They still render as literal text, exactly as today. Fixing them changes what players see, so that is a translator's call, not this PR's.

Related

Same migration in ChunkBlock: BentoBoxWorld/ChunkBlock#33, where the shared locale strings came from.

🤖 Generated with Claude Code

https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp

BentoBox text is MiniMessage now; the &-codes still parse, but leaving
the files in the old format is what makes formatting bugs possible —
anything that builds a fragment and puts it into a translation has to
guess which format the target line is in.

Converted with BentoBox's own Util.legacyToMiniMessage, so each value
now says exactly what the runtime was already rendering, then tidied up:
a straight conversion closes and immediately reopens a tag wherever the
old text repeated a colour code, which is every line of a multi-line
description.

Verified by rendering all 1506 values before and after and comparing the
style of every character: no value moved. Placeholder checks report the
same 47 pre-existing issues as before, none new. Tests green.

Ten values across vi, tr, it, es, fr, uk and ja were left alone: they
contain a broken colour code ("& c", "&un", "& l") that never rendered
as colour and still doesn't. Worth a translator's eye, separately.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017EZEwab2kL4i1FNnBYvSmp
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit d0017fc into develop Aug 14, 2026
3 checks passed
@tastybento
tastybento deleted the chore/minimessage-locales branch August 14, 2026 22:43
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