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

Command argument names are no longer translatable


    • Confirmed
    • (Unassigned)

      The bug

      The syntax names of command arguments are no longer translatable to the user's chosen language.


      This is a side effect of the command graph structure, which can be read about at wiki.vg/Command_Data. The node name is sent for arguments and literals, and that is the name displayed by the command parser. While this is good, because the names of arguments from custom server commands can be displayed, it prevents them from being translated. (In theory, the server could get the user's language, then change the argument name that is sent on a per-player basis, but that makes the translations server-side not client-side.)


      In 1.12.2 and previously, commands were simple and provided a usage string along the lines of commands.me.usage=/me <action ...> when entered incorrectly.  This provided easy translation of command usage arguments to the user's language.

      In 1.13 and above, the overhaul of the command system changed usage strings so they are (presumably) automatically generated by Brigadier.  Although simpler, this prevents argument translations, and they instead retain their internal English names in all translations.

      Steps to Recreate

      1. Enter a world in 1.12.2 that allows commands.
      2. Type an incomplete command so the syntax usage will appear.
        Ex: /me
      3. Notice the syntax message.
        Ex: Usage: /me <action ...>
      4. Change language to something else (in this case es_es).
      5. Repeat the command.  Note the new usage message.
        Ex: Uso: /me <acción ...>
      6. Enter a world in 1.13 that allows commands.
      7. Type an incomplete command, close the suggestion menu, and notice the argument prompt.
        Ex. /me provides prompt <action>
      8. Change language to something else (again es_es).
      9. Re-enter the command and notice the argument prompt.
        Ex. /me provides prompt <action>
      10. The prompt is no longer translated to the new language.

      Suggested Fix

      Perhaps each unique command could define a usage translation string that lists command argument names. And fall back to the sent name?

      Example: (for /me and /effect give|clear)

         "commands.me.usage": "action",
         "commands.effect.give.usage": "targets effect seconds"
         "commands.effect.clear.usage": "targets effect"


      This fix would not be very elegant for commands that provide multiple argument groups, like /teleport, nor for commands that have lists of sub-commands, like /effect. There would need to be multiple translation strings for the separate argument groups.  Likely it would be easier to provide names for the arguments that are just enumerations, such as /team option <team> (long|list|of|options...) would rather be team option value in the list. It wouldn't really matter if the option was ignored and the prompt not displayed; just to take up a position in the list.

        1. arg_lang.png
          6 kB
        2. arg_brig.png
          24 kB
        3. screenshot-1.png
          6 kB

            Unassigned Unassigned
            Tedstar Tedstar (Curtis Anderson)
            7 Vote for this issue
            6 Start watching this issue