-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre6, 1.15.2, 1.20.4, 1.20.5 Release Candidate 2
-
Confirmed
-
(Unassigned)
The bug
The syntax names of command arguments are no longer translatable to the user's chosen language.
Cause
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.)
History
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
- Enter a world in 1.12.2 that allows commands.
- Type an incomplete command so the syntax usage will appear.
Ex: /me - Notice the syntax message.
Ex: Usage: /me <action ...> - Change language to something else (in this case es_es).
- Repeat the command. Note the new usage message.
Ex: Uso: /me <acción ...> - Enter a world in 1.13 that allows commands.
- Type an incomplete command, close the suggestion menu, and notice the argument prompt.
Ex. /me provides prompt <action> - Change language to something else (again es_es).
- Re-enter the command and notice the argument prompt.
Ex. /me provides prompt <action> - 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" }
Complications
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.