network: clients should send localisation to host - for localised messages

Bug #807907 reported by Nasenbaer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Confirmed
Medium
Unassigned

Bug Description

Currently messages by the host are translated on host side using the hosts localisation.
First i thought we should create a table with id's an messages so the host would only send the id and the clients would read the matching message from the list and translate it. Anyway this has two disadvantages:
1. The code gets less readable and you would have to search through the list every time you want to check what kind of message the host sends at a specific place
2. If host and client use a different version (might be even if only slightly), the list may be incomplete and therefor some messages would not be translateable - e.g. if a new "sorry you use a different version, you can not play on this server" message would be added ... ;)

Therefor it's perhaps a good idea to save the localisation of all clients on host side, translate the messages (if possible) on host side and send the translated messages to the clients. if the clients use different localisation and a message is system wide, the host should keep the message in english.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Regarding 1, using enumeration might help. You would still have a table of messages, but the source code would look something like send_message(player_joined) instead of send_message(3). It doesn't solve problem 2, though.

Have we discussed this issue before in another bug report or something? (It seems familiar for some reason)

tags: added: internationalization
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Jepp you are of course right about the enumeration stuff.

I am not sure whether there is already another bug report, but as far as I know we only discussed this on irc and during online game sessions. However, if there is a bug report somewhere, we best merge my suggestion from above to the other bug report :)

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I found bug 702011, so I guess I reported it shortly after we played multiplayer that time. I'll mark this as a duplicate and post a comment on the other bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.