QTfrontend/net/newnetclient.cpp
changeset 8401 87410ae372f6
parent 8396 5123eac2f9d6
child 8416 e691acd778f5
--- a/QTfrontend/net/newnetclient.cpp	Fri Jan 18 11:47:23 2013 +0100
+++ b/QTfrontend/net/newnetclient.cpp	Sat Jan 19 00:51:28 2013 +0400
@@ -28,6 +28,8 @@
 #include "game.h"
 #include "roomslistmodel.h"
 #include "playerslistmodel.h"
+#include "servermessages.h"
+#include "HWApplication.h"
 
 char delimeter='\n';
 
@@ -251,7 +253,7 @@
     if (lst[0] == "ERROR")
     {
         if (lst.size() == 2)
-            emit Error(lst[1]);
+            emit Error(HWApplication::translate("server", lst[1].toAscii().constData()));
         else
             emit Error("Unknown error");
         return;
@@ -260,7 +262,7 @@
     if (lst[0] == "WARNING")
     {
         if (lst.size() == 2)
-            emit Warning(lst[1]);
+            emit Warning(HWApplication::translate("server", lst[1].toAscii().constData()));
         else
             emit Warning("Unknown warning");
         return;
@@ -579,14 +581,14 @@
         if (lst[1] == "Authentication failed")
         {
             emit AuthFailed();
-	    m_game_connected = false;
-	    Disconnect();
-	    //omitted 'emit disconnected()', we don't want the error message
-	    return;
+            m_game_connected = false;
+            Disconnect();
+            //omitted 'emit disconnected()', we don't want the error message
+            return;
         }
         m_game_connected = false;
         Disconnect();
-        emit disconnected(lst[1]);
+        emit disconnected(HWApplication::translate("server", lst[1].toAscii().constData()));
         return;
     }