diff options
| author | scarab <scarab@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-08-18 21:50:13 +0000 |
|---|---|---|
| committer | scarab <scarab@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-08-18 21:50:13 +0000 |
| commit | 9c71274e5c4cde5dd99a0eb927243f6c481df1f2 (patch) | |
| tree | 17d77f14943b7f463145a5550330b56f0ea9548b /src/client/client.c | |
| parent | 9acea18a3a920b781414ba44e1e1651ea760867b (diff) | |
- hromada preklapeni na gettext
- zbyva odstranit language funkci
- pak uz zbyva pouze rozchodit uplne gettext a vyrobit preklady
git-svn-id: http://opensvn.csie.org/tuxanci_ng@222 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/client/client.c')
| -rw-r--r-- | src/client/client.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/client/client.c b/src/client/client.c index 08fe9e6..edffc54 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -102,9 +102,9 @@ static int initUdpClient(char *ip, int port, int proto) { return -1; } - - printf("connect UDP %s %d\n", ip, port); - +#ifdef DEBUG + printf(_("Connected to: %s on port: %d via UDP\n"), ip, port); +#endif return 0; } @@ -120,8 +120,9 @@ static int initTcpClient(char *ip, int port, int proto) disableNagle(sock_server_tcp); setTcpSockNonBlock(sock_server_tcp); - printf("connect TCP %s %d\n", ip, port); - +#ifdef DEBUG + printf(_("Connected to: %s on port: %d via TCP\n"), ip, port); +#endif return 0; } @@ -181,8 +182,8 @@ int initClient(char *ip, int port, int proto) static void errorWithServer() { - fprintf(stderr, "Server does not respond!\n"); - setMsgToAnalyze(getMyText("ERROR_SERVER_DONT_ALIVE")); + fprintf(stderr, _("Server did not respond!\n")); + setMsgToAnalyze(_("Server is not running or being blocked. I was unable to connect.")); setWorldEnd(); } @@ -221,7 +222,7 @@ void sendServer(char *msg) #ifndef PUBLIC_SERVER if( isParamFlag("--send") ) { - printf("send -> %s", msg); + printf(_("Sending: \"%s\""), msg); } #endif @@ -310,7 +311,7 @@ static void eventClientWorkRecvList() #ifndef PUBLIC_SERVER if( isParamFlag("--recv") ) { - printf("recv -> %s", line); + printf(_("Recieved: \"%s\""), line); } #endif if( protoCmd != NULL ) @@ -412,11 +413,11 @@ static void eventTraffic() if( currentTime - lastTraffic > 5000 ) { lastTraffic = currentTime; - - printf("down: %d\n" - "up : %d\n", +#ifdef DEBUG + printf(_("down: %d\n") + _("up : %d\n"), traffic_down, traffic_up); - +#endif traffic_down = 0; traffic_up = 0; } @@ -440,16 +441,18 @@ static void quitUdpClient() { assert( sock_server_udp != NULL ); closeUdpSocket(sock_server_udp); - - printf("quit UDP conenct\n"); +#ifdef DEBUG + printf(_("Closing UDP connection.\n")); +#endif } static void quitTcpClient() { assert( sock_server_tcp != NULL ); closeTcpSocket(sock_server_tcp); - - printf("quit TCP conenct\n"); +#ifdef DEBUG + printf(_("Closing TCP connection.\n")); +#endif } void quitClient() |