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

The character indicator symbol within the "Report Chat" menu is untranslatable

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 22w24a
    • 1.19.1 Pre-release 1
    • None
    • Community Consensus
    • Internationalisation
    • Low

    Description

      The Bug:

      The "/" symbol that exists between the value of the current and total characters within the "Report Chat" menu is untranslatable and is missing a translation key.

      This is a problem because every other string throughout the game that contains the "/" symbol is translatable, therefore introducing an inconsistency. Below, I've constructed a table to visually demonstrate how and why this is a valid internationalization issue and to show the inconsistency.

      Translation Key String Context Is the "/" symbol translatable?
      item.minecraft.bundle.fullness %s/%s This string is used within bundle tooltips to show the fullness of a bundle. Yes
      filled_map.level (Level %s/%s) This string is used within filled map tooltips to show the level of a filled map. Yes
      item.durability Durability: %s / %s This string is used within item tooltips to show the durability of an item. Yes
      sleep.players_sleeping %s/%s players sleeping This string is displayed within the action bar to show how many players are currently sleeping. Yes
      N/A %s/%s This string is used within the "Report Chat" menu to show how many characters are currently present and the maximum number of them that are allowed. No

      Steps to Reproduce:

      • Attempt to search for the existence of this string by using this search filter on the official Minecraft crowdin project.
      • Take note as to whether or not the page indicator symbol within the recipe book GUI is untranslatable.

      Observed Behavior:

      The character indicator symbol within the "Report Chat" menu is untranslatable.

      Expected Behavior:

      The character indicator symbol within the "Report Chat" 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.components.MultiLineEditBox.java
      public class MultiLineEditBox extends AbstractScrollWidget {
         ...
         protected void renderDecorations(PoseStack poseStack) {
            super.renderDecorations(poseStack);
            if (this.textField.hasCharacterLimit()) {
               int n = this.textField.characterLimit();
               String string = this.textField.value().length() + "/" + n;
               MultiLineEditBox.drawString(poseStack, this.font, string, this.x + this.width - this.font.width(string), this.y + this.height + 4, 10526880);
            }
         }
         ...

      If we look at the above class, we can see that the character indicator symbol within the "Report Chat" menu is hardcoded, and as a result, is untranslatable. This is evident through the following line of code:

      String string = this.textField.value().length() + "/" + n;

      Attachments

        Activity

          People

            xilefian [Mojang] Felix Jones
            Avoma Avoma
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: