pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.55k forks source link

Some messages do not send the usual translation results to the client #4379

Closed rasu3n closed 3 years ago

rasu3n commented 3 years ago

Issue description

Steps to reproduce the issue

  1. execute /undefined

OS and versions

Plugins

Plugins (0):

Crashdump, backtrace or other files

Minecraft 2021_08_17 午後 11_48_00

!
dktapps commented 3 years ago

This happens because the server doesn't translate strings sent to the client unless the translation key begins with pocketmine., because it allows vanilla translations to be used. However, this becomes a problem if the vanilla translations corresponding to those keys get removed, as appears to have happened in this case.

The appropriate solution would be to replace commands.generic.usage with a more specific pocketmine.commands.generic.usage, which would always be translated by the server. In addition, this would allow more flexibility than the current translation allows (e.g. showing the command name instead of just saying "unknown command").

inxomnyaa commented 3 years ago

I would suggest checking if vanilla has the specified translation string, but i am not sure how the vanilla resources may be shared, license wise. Optionally one could ask the user to apply a vanilla pack on the server, and load the translations from there. Might be a task for a plugin.

PM would get the string from the translation file, but players receive the translation key instead.