Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-253283

The percentage and chunk indicator symbols used within the optimize world menu are untranslatable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.2 Pre-release 1
    • 1.19, 22w24a, 1.19.1 Pre-release 1, 1.19.1 Pre-release 2, 1.19.1 Pre-release 5, 1.19.1 Release Candidate 2, 1.19.1, 1.19.2, 22w43a, 22w45a, 1.19.3, 1.19.4, 1.20.1
    • Community Consensus
    • Internationalisation
    • Low

      The Bug:

      The percentage and chunk indicator symbols used within the optimize world menu are untranslatable.

      The "%" symbol that's used to show the progress of the world's optimization and the "/" symbol that exists between the value of your currently upgraded chunks and total chunks within the optimize world menu, are untranslatable and are missing translation keys.

      Every other string throughout the game that contains the "%" or "/" symbols allows them to be correctly translatable, therefore introducing an inconsistency.

      Steps to Reproduce:

      1. Attempt to search for the existence of the percentage symbol within the optimize world menu by using this search filter on the official Minecraft crowdin project.
      2. Attempt to search for the existence of the chunk indicator symbol within the optimize world menu by using this search filter on the official Minecraft crowdin project.
      3. Take note as to whether or not the percentage and chunk indicator symbols used within the optimize world menu are untranslatable.

      Observed Behavior:

      The percentage and chunk indicator symbols used within the optimize world menu are untranslatable.

      Expected Behavior:

      The percentage and chunk indicator symbols used within the optimize world menu would be translatable.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 22w24a using Mojang mappings.

      net.minecraft.client.gui.screens.worldselection.OptimizeWorldScreen.java
      public class OptimizeWorldScreen extends Screen {
         ...
         public void render(PoseStack poseStack, int n, int n2, float f) {
            ...
            if (this.upgrader.getTotalChunks() > 0) {
               ...
               OptimizeWorldScreen.drawCenteredString(poseStack, this.font, n9 + " / " + this.upgrader.getTotalChunks(), this.width / 2, n5 + 2 * 9 + 2, 10526880);
               ...
               OptimizeWorldScreen.drawCenteredString(poseStack, this.font, Mth.floor(this.upgrader.getProgress() * 100.0f) + "%", this.width / 2, n5 + (n6 - n5) / 2 - 9 / 2, 10526880);
               ...

      If we look at the above class, we can see that the percentage and chunk indicator symbols used within the optimize world menu are hardcoded, and as a result, are untranslatable. This is evident through the following pieces of code:

      ... this.font, n9 + " / " + this.upgrader.getTotalChunks() ...
      ... this.font, Mth.floor(this.upgrader.getProgress() * 100.0f) + "%" ...

            slicedlime [Mojang] slicedlime
            Avoma [Mod] Avoma
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: