mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-16 15:24:55 +02:00
Resolve "Merge the best from 7.40 branch"
This commit is contained in:
16
SabrehavenOTClient/modules/corelib/net.lua
Normal file
16
SabrehavenOTClient/modules/corelib/net.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
function translateNetworkError(errcode, connecting, errdesc)
|
||||
local text
|
||||
if errcode == 111 then
|
||||
text = tr('Connection refused, the server might be offline or restarting.\nPlease try again later.')
|
||||
elseif errcode == 110 then
|
||||
text = tr('Connection timed out. Either your network is failing or the server is offline.')
|
||||
elseif errcode == 1 then
|
||||
text = tr('Connection failed, the server address does not exist.')
|
||||
elseif connecting then
|
||||
text = tr('Connection failed.')
|
||||
else
|
||||
text = tr('Your connection has been lost.\nEither your network or the server went down.')
|
||||
end
|
||||
text = text .. ' ' .. tr('(ERROR %d)', errcode)
|
||||
return text
|
||||
end
|
Reference in New Issue
Block a user