Messages in multiplayer are translated by host before they are sent to client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Steps to reproduce:
1. Start two instances of Widelands by running "./widelands --double". Let's call them A and B.
2. Go to options in A and change "Language", so that A and B now have different languages.
3. In A, go to multiplayer and host a local game.
4. In B, go to multiplayer and join the local game (specify 127.0.0.1 as the IP-addresse).
5. When B joins the game, the message "B has joined the game" is added to the chat.
Expected result:
Since A and B use different languages, the message should be displayed in the language the player has set Widelands to use.
Actual result:
The text is shown in the language chosen by A (host of the game).
I assume the way it works is that the message is translated/posted on the host side and then sent to the client(s). This is a minor annoyance though, but could be problematic depending on the different languages used, since it is in essence printing messages in a language the player may not know.
If the text is translated before it is sent, as seems to be the case, it doesn't seem to be an easy fix to this, if it is at all possible.
Other things such as map names, and other information is translated fine, this is only limited to messages sent over the chat system.
Related branches
tags: | added: internationalization multiplayer |
Changed in widelands: | |
assignee: | nobody → Nasenbaer (nasenbaer) |
this is known.
One way to fix this, would be to put the messages in numbered arrays and than only send the numbers -> read + translate the strings from the arrays.
however it's a bit more complex, as some strings are more complex, e.g. a string in a string, so we would need a bunch of new network commands.