henkelmax / simple-voice-chat

A working voice chat in Minecraft!
https://modrepo.de/minecraft/voicechat/wiki
457 stars 120 forks source link

Improved the ping response time message #743

Closed Greg-21 closed 4 weeks ago

Greg-21 commented 1 month ago

This is a small follow-up to the absolutely massive PR #736 that was recently accepted and merged. It was agreed upon to separate out this small but, unfortunately, breaking change into its own pull request.

The current message that is still in use looks like this: "Got a response after 3 attempts in 150 ms".

Depending on the language and how it is translated, this may suggest that it was the 3 attempts that took 150 ms, and only the fourth attempt was successful without mentioning how long the packet took. If I were to visualize it, it would look something like this: "Got a response (after 3 attempts in 150 ms)". But the intended meaning has always been more like this: "Got a response (after 3 attempts) in 150 ms", meaning that the response took 150 ms, with 3 unsuccessful attempts beforehand.

Therefore, I propose to swap the order of the time in milliseconds it took for the ping to travel back and forth with the number of previous attempts that failed. The new message would look like this: "Got a response in 150 ms after 3 attempts" and would better convey the intended meaning. The only downside is that most of the existing translations now need to be redone.

Greg-21 commented 1 month ago

I apologize for the mess, but I haven't done this in a while and needed to refresh my memory on how to do it properly.

henkelmax commented 1 month ago

No worries, I could also have merged it in 1.21.1 and then port it to all other versions.