Full error localization
This commit is contained in:
@@ -266,6 +266,7 @@ text.error.unreachable = Server unreachable.
|
||||
text.error.invalidaddress = Invalid address.
|
||||
text.error.timedout = Timed out!\nMake sure the host has port forwarding set up, and that the address is correct!
|
||||
text.error.mismatch = Packet error:\npossible client/server version mismatch.\nMake sure you and the host have the latest version of Mindustry!
|
||||
text.error.alreadyconnected = Already connected.
|
||||
text.error.any = Unkown network error.
|
||||
|
||||
text.settings.language = Language
|
||||
|
||||
@@ -69,6 +69,8 @@ public class Net{
|
||||
error = Bundles.get("text.error.unreachable");
|
||||
}else if(type.contains("timeout")){
|
||||
error = Bundles.get("text.error.timeout");
|
||||
}else if(error.equals("alreadyconnected")){
|
||||
error = Bundles.get("text.error.alreadyconnected");
|
||||
}else if(!error.isEmpty()){
|
||||
error = Bundles.get("text.error.any");
|
||||
}
|
||||
@@ -112,7 +114,7 @@ public class Net{
|
||||
active = true;
|
||||
server = false;
|
||||
}else{
|
||||
throw new IOException("Already connected!");
|
||||
throw new IOException("alreadyconnected");
|
||||
}
|
||||
}catch(IOException e){
|
||||
showError(e);
|
||||
|
||||
Reference in New Issue
Block a user