GunChleoc has proposed merging lp:~widelands-dev/widelands/cleanup-networking-messages into lp:widelands.
Commit message: Deleted unused networking messages and unified the "Something went wrong" message. Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/cleanup-networking-messages/+merge/316974 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/cleanup-networking-messages into lp:widelands.
=== modified file 'src/network/internet_gaming.cc' --- src/network/internet_gaming.cc 2017-01-25 18:55:59 +0000 +++ src/network/internet_gaming.cc 2017-02-10 15:40:11 +0000 @@ -294,9 +294,7 @@ } } } catch (const std::exception& e) { - std::string reason = _("Something went wrong: "); - reason += e.what(); - logout(reason); + logout((boost::format(_("Something went wrong: %s")) % e.what()).str()); set_error(); } === modified file 'src/network/internet_gaming_messages.cc' --- src/network/internet_gaming_messages.cc 2017-01-25 18:55:59 +0000 +++ src/network/internet_gaming_messages.cc 2017-02-10 15:40:11 +0000 @@ -40,26 +40,10 @@ void InternetGamingMessages::fill_map() { // messages from metaserver to client igmessages["NO_SUCH_USER"] = _("There is no user with the name %s logged in!"); - igmessages["WRONG_PASSWORD"] = _("The sent password was incorrect!"); - igmessages["UNSUPPORTED_PROTOCOL"] = _("The protocol version you are using is not supported!"); - igmessages["ALREADY_LOGGED_IN"] = _("You are already logged in!"); - igmessages["DEFICIENT_PERMISSION"] = - _("You got disconnected, as you sent a superuser command without superuser permission. " - "This incident will be logged and reported to the administrator."); - igmessages["RESTARTING"] = _("You got disconnected, as the metaserver is currently restarting."); // messages from client to metaserver igmessages["CONNECTION_CLOSED"] = _("Connection was closed by the client normally."); igmessages["CONNECTION_LOST"] = _("The connection to the metaserver was lost."); igmessages["NO_ANSWER"] = _("Metaserver did not answer"); - igmessages["GAME_NOT_CONNECTABLE"] = _("Your game can’t be connected to from the internet"); igmessages["CLIENT_TIMEOUT"] = _("You got disconnected from the metaserver, as you did not answer a PING request in time."); - igmessages["GAME_TIMEOUT"] = - _("The metaserver was unable to connect to your game. Most likely it can’t be connected to " - "from the " - "internet! Please take a look at http://wl.widelands.org/wiki/InternetGaming to learn how " - "to set up " - "your internet connection for hosting a game online."); - igmessages["NOT_LOGGED_IN"] = _( - "You tried to log back in, but the server has no knowledge of your previous state anymore."); } === modified file 'src/network/internet_gaming_protocol.h' --- src/network/internet_gaming_protocol.h 2017-01-25 18:55:59 +0000 +++ src/network/internet_gaming_protocol.h 2017-02-10 15:40:11 +0000 @@ -184,7 +184,7 @@ * * \note all this is handled in InternetGaming::handle_packet. valid explanation codes can be found * there. - * \note example for not connectable game: "ERROR" "GAME_OPEN" "GAME_NOT_CONNECTABLE" + * \note example for not connectable game: "ERROR" "GAME_OPEN" */ static const std::string IGPCMD_ERROR = "ERROR"; @@ -310,8 +310,7 @@ * list the new game, but set it as not connectable and recheck the connectability for * INTERNET_GAMING_TIMEOUT ms. * If the game gets connectable in time, the metaserver lists the game as connectable, else it - * removes the - * game from the list of games and sends a \ref IGPCMD_GAME_NOT_CONNECTABLE to the hosting client. + * removes the game from the list of games. */ static const std::string IGPCMD_GAME_OPEN = "GAME_OPEN"; === modified file 'src/network/nethost.cc' --- src/network/nethost.cc 2017-01-30 14:40:12 +0000 +++ src/network/nethost.cc 2017-02-10 15:40:11 +0000 @@ -1718,7 +1718,7 @@ Client& client = d->clients.at(number); if (time - client.time < 0) - throw DisconnectException("BACKWARTS_RUNNING_TIME"); + throw DisconnectException("BACKWARDS_RUNNING_TIME"); if (d->committed_networktime - time < 0) throw DisconnectException("SIMULATING_BEYOND_TIME"); if (d->syncreport_pending && !client.syncreport_arrived) { === modified file 'src/network/network_gaming_messages.cc' --- src/network/network_gaming_messages.cc 2017-01-25 18:55:59 +0000 +++ src/network/network_gaming_messages.cc 2017-02-10 15:40:11 +0000 @@ -123,8 +123,6 @@ ngmessages["GAME_STARTED_AT_CONNECT"] = _("The game has started just after you tried to connect."); ngmessages["SERVER_CRASHED"] = _("Server has crashed and performed an emergency save."); - ngmessages["CLIENT_TIMEOUTED"] = - _("Connection to client timed out: no response for 10 minutes!"); ngmessages["CLIENT_DESYNCED"] = _("Client and host have become desynchronized."); ngmessages["KICKED"] = _("Kicked by the host: %s"); ngmessages["MALFORMED_COMMANDS"] = _("Client sent malformed commands: %s"); @@ -142,7 +140,7 @@ ngmessages["DIFFERENT_PROTOCOL_VERS"] = _("Server uses a different protocol version"); ngmessages["PROTOCOL_EXCEPTION"] = _("Received command number %s," " which is not allowed in this state."); - ngmessages["BACKWARTS_RUNNING_TIME"] = + ngmessages["BACKWARDS_RUNNING_TIME"] = _("Client reports time to host that is running backwards."); ngmessages["SIMULATING_BEYOND_TIME"] = _("Client simulates beyond the game time allowed by the host."); @@ -150,8 +148,6 @@ ngmessages["GAME_ALREADY_STARTED"] = _("The game has already started."); ngmessages["NO_ACCESS_TO_PLAYER"] = _("Client has no access to other player’s settings."); ngmessages["NO_ACCESS_TO_SERVER"] = _("Client has no access to server settings."); - ngmessages["START_SENT_NOT_READY"] = - _("Client sent start command, although server is not yet ready."); ngmessages["TIME_SENT_NOT_READY"] = _("Client sent TIME command even though game is not running."); ngmessages["PLAYERCMD_FOR_OTHER"] = _("Client sent a PLAYERCOMMAND for another player."); @@ -163,12 +159,9 @@ ngmessages["DIFFERENT_WL_VERSION"] = _("WARNING: %1$s uses version: %2$s, while Host uses version: %3$s"); ngmessages["CLIENT_HAS_JOINED_GAME"] = _("%s has joined the game"); - ngmessages["GAME_SAVED_AS"] = _("Game was saved as %s."); ngmessages["STARTED_SENDING_FILE"] = _("Started to send file %1$s to %2$s!"); ngmessages["COMPLETED_FILE_TRANSFER"] = _("Completed transfer of file %1$s to %2$s"); ngmessages["SENDING_FILE_PART"] = _("Sending part %1$s of file %2$s to %3$s"); ngmessages["PLAYER_DEFEATED"] = _("The player ‘%s’ was defeated and became a spectator."); ngmessages["CLIENT_HUNG"] = _("Client %1$s did not answer for more than %2$s."); - ngmessages["CLIENT_HUNG_AUTOKICK"] = - _("Client %1$s will automatically be kicked, if no answer is received within %2$s."); }
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp