mojira.dev
MC-313144

UpgradeProgress.Type.REGIONS produces untranslated "upgradeWorld.progress.type.regions"

Short description of the issue:
In net.minecraft.util.worldupdate.UpgradeProgress$Type, the REGIONS enum constant uses the serialized name "regions" (plural), which constructs the translation key "upgradeWorld.progress.type.regions". However, the language file (assets/minecraft/lang/en_us.json) only defines the singular key "upgradeWorld.progress.type.region".

Steps to reproduce the issue:

  1. Trigger a world upgrade that reaches the region storage upgrade stage (WorldUpgrader#upgradeLevels setting UpgradeProgress.Type.REGIONS).

  2. Observe the progress stage label displayed on the world upgrade screen (or compare UpgradeProgress$Type#getSerializedName with assets/minecraft/lang/en_us.json).

Expected result:
The translation key should match the language file ("upgradeWorld.progress.type.region") and display the localized text ("Upgrading region files...").

Actual result:
The game constructs "upgradeWorld.progress.type.regions", which does not exist in en_us.json, resulting in the raw translation key being used.

Code analysis (26.3):

  1. In net.minecraft.util.worldupdate.WorldUpgrader#upgradeLevels (line 164), the progress type is set via:
    this.upgradeProgress.setType(Type.REGIONS);
    before calling upgraders.forEach(RegionStorageUpgrader::upgrade); (line 175).

  2. In net.minecraft.util.worldupdate.UpgradeProgress$Type (lines 268-279), the enum constants are defined as:
    FILES("files"),
    LEGACY_STRUCTURES("legacy_structures"),
    REGIONS("regions");

And the label component is built in the constructor (line 278) as:
this.label = Component.translatable("upgradeWorld.progress.type." + this.getSerializedName());

  1. Because REGIONS has id "regions", this produces "upgradeWorld.progress.type.regions", whereas en_us.json only contains "upgradeWorld.progress.type.region".

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media]

PRO100KatYT

(Unassigned)

Unconfirmed

26.3

Retrieved