mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 14:01:03 -08:00
Full error localization
This commit is contained in:
parent
108e5a2f5e
commit
5b01d923d3
2 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue