Ticket #3570: 3570.5.diff
File 3570.5.diff, 3.1 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/gui/common/network.js
46 46 /** 47 47 * Must be kept in sync with source/network/NetHost.h 48 48 */ 49 function getDisconnectReason(id )49 function getDisconnectReason(id, wasConnected) 50 50 { 51 51 switch (id) 52 52 { 53 case 0: return translateWithContext("network disconnect", "Unknown reason");53 case 0: return wasConnected ? translate("Unknown reason.") : translate("This is generally due to port 20595 not being forwarded on the host side. Also, check if you have any firewall or anti-virus blocking the connection."); 54 54 case 1: return translate("The host has ended the game"); 55 55 case 2: return translate("Incorrect network protocol version"); 56 56 case 3: return translate("Game is loading, please try later"); -
binaries/data/mods/public/gui/gamesetup/gamesetup.js
623 623 } 624 624 625 625 cancelSetup(); 626 reportDisconnect(message.reason );626 reportDisconnect(message.reason, true); 627 627 } 628 628 629 629 /** -
binaries/data/mods/public/gui/gamesetup/gamesetup_mp.js
92 92 { 93 93 case "disconnected": 94 94 cancelSetup(); 95 reportDisconnect(message.reason );95 reportDisconnect(message.reason, false); 96 96 return; 97 97 98 98 default: … … 165 165 166 166 case "disconnected": 167 167 cancelSetup(); 168 reportDisconnect(message.reason );168 reportDisconnect(message.reason, false); 169 169 return; 170 170 171 171 default: -
binaries/data/mods/public/gui/session/messages.js
59 59 var g_StatusMessageTypes = { 60 60 "authenticated": msg => translate("Connection to the server has been authenticated."), 61 61 "connected": msg => translate("Connected to the server."), 62 // Translation: States the reason why the client disconnected from the server. 62 63 "disconnected": msg => translate("Connection to the server has been lost.") + "\n" + 63 // Translation: States the reason why the client disconnected from the server. 64 sprintf(translate("Reason: %(reason)s."), { "reason": getDisconnectReason(msg.reason) }), 64 sprintf(translate("Reason: %(reason)s."), { "reason": getDisconnectReason(msg.reason, true) }), 65 65 "waiting_for_players": msg => translate("Waiting for other players to connect..."), 66 66 "join_syncing": msg => translate("Synchronising gameplay with other players..."), 67 67 "active": msg => ""