mojira.dev
MC-251763

Hyphenated words are inconsistently capitalized in title case

The bug

In strings written in title case (button labels, headings, etc.), there is an inconsistency in how capitalisation is applied to hyphenated words.

Sometimes, all the words linked by a hyphen are capitalised, but other strings only capitalise the first word in a group of words linked by a hyphen.

All words

Translation key

String

selectWorld.recreate

Re-Create

multiplayerWarning.header

Caution: Third-Party Online Play

options.autoJump

Auto-Jump

First word only

Translation key

String

item.minecraft.firework_star.shape.star

Star-shaped

item.minecraft.firework_star.shape.creeper

Creeper-shaped

title.multiplayer.other

Multiplayer (3rd-party Server)

Steps to reproduce

Pick one translation string from each table to search for in the vanilla language file. Search for them and note the two different capitalisation schemes.

Alternatively, you can test it in-game by giving yourself a firework star with the command below, then navigating the menus to find a string from the first table.

/give @s firework_star[firework_explosion = {shape: "star"}]

To find all hyphenated word pairs, run the following regular expression on the vanilla language file: \w-\w

Linked issues

Comments 2

Discovered while testing MC-251754

Can confirm in 1.19.

MMK21

(Unassigned)

Confirmed

Platform

Low

Text

1.18.2, 22w19a, 1.19 Pre-release 1, 1.19 Pre-release 2, 1.19, ..., 24w13a, 1.20.5 Pre-Release 1, 1.20.5 Release Candidate 3, 1.20.5, 24w18a

Retrieved