mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
New Features: - Native macOS app with Cocoa windowing, OpenGL view, improved input, clipboard and cursor handling. - Platform-aware keyboard and shortcut behavior with clearer primary/meta/control semantics and normalized key combos. Bug Fixes: - Expanded detection for "connection refused" network errors. Chores: - macOS build/bundle and packaging improvements; new dependency overlay added; CI now runs macOS build when relevant. Tests: - AddressSanitizer support added for test builds.
16 lines
718 B
Lua
16 lines
718 B
Lua
function translateNetworkError(errcode, connecting, errdesc)
|
|
local text
|
|
if errcode == 111 or errcode == 61 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
|