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

JSON text component / chat component error messages are not translatable

XMLWordPrintable

    • Confirmed
    • Internationalisation
    • Important
    • Platform

      The bug

      When inputting a command with mistakes in the JSON text argument, the error in chat appears in English, no matter the language. Translators on Crowdin can't fix that, as the strings are not present in the Minecraft Translation project on the website.

      Steps to reproduce

      • Start Minecraft 1.19.4 Pre-release 2.
      • Go to Settings - Language, and select a language other than English.
      • Create a new single-player world with the cheats option turned on.
      • Open up chat or place a command block and type in a /tellraw or a /title command using a JSON text component with errors as the text argument, for example:
        • /title @a title {"wrong":"JSON"}
        • /tellraw @a {"translate":"chat.type.advancement.task","with":"Wrong JSON"}
      • Press Enter in chat or activate the command block.
      • See the error message in chat or in the command block.
      • Go to https://crowdin.com/translate/minecraft/all/ and search for part of the text found in the error message

      Observed behaviour

      The error message starts with a translation of "Invalid Chat component", but continues in English. The untranslated part is absent from the Minecraft Translation project on Crowdin.

      Expected behaviour

      The error messages should be present in the Minecraft Translation project on Crowdin, and for the languages where that translation is provided, the errors message should be output in that language.

      List of untranslatable error messages

      • A score component needs at least a name and an objective
      • Couldn't get field 'lineStart' for JsonReader
      • Couldn't get field 'pos' for JsonReader
      • Couldn't read position of JsonReader
      • Don't know how to serialize %s as a Component
      • Don't know how to turn %s into a Component
        • /title @a title {"wrong":"JSON"}
      • Expected with to be a JsonArray, was %s
        • /tellraw @a {"translate":"chat.type.advancement.task","with":"Wrong JSON"}
      • Item cannot be both damageable and stackable
        • /give @s apple[max_damage=999999999,max_stack_size=10]
      • Not a JSON object: %s; Not a json array: %s; Not a string: %s
        • /give @s apple[minecraft:custom_name="1"]
      • Unexpected empty array of components

      Notes

      There are probably other types of errors with JSON text components that I'm not aware of. There is a high chance of them not being translatable either. If you find other error messages that are not translatable, please show them in the comments

      UPD: @bodakugga has found 7 error messages that seem to be not translatable

      UPD2: @Cybereggs1337 has found 2 more error messages that can be seen in component-error-messages.png

      Links

      Search filter for Don't know as in Don't know how to turn {"wrong":"JSON"} into a Component, with 0 results, demonstrating that the error message is not translatable
      Case-sensitive search filter for Expected as in Expected with to be a JsonArray, was "Wro...ON", with 21 result neither of which corresponds to the error message, demonstrating that the error message is not translatable

            Unassigned Unassigned
            _Almazik_ Artiom Boyko
            Votes:
            12 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: