[2/3] netstat: Don't translate strings only translated in german
André Hentschel
nerv at dawncrow.de
Mon Jan 7 16:27:55 CST 2013
i give up on this, it seems it really confuses translators and is only translated into german on native
i doubt an app depends on it being translated on german machines
---
programs/netstat/netstat.c | 18 +++++++++++++++++-
programs/netstat/netstat.h | 23 +++++------------------
programs/netstat/netstat.rc | 13 -------------
3 files changed, 22 insertions(+), 32 deletions(-)
diff --git a/programs/netstat/netstat.c b/programs/netstat/netstat.c
index 268cec1..206e58c 100644
--- a/programs/netstat/netstat.c
+++ b/programs/netstat/netstat.c
@@ -42,6 +42,22 @@ static const WCHAR fmtcolon[] = {'%', 's', ':', '%', 's', 0};
static const WCHAR fmttcpout[] = {' ', ' ', '%', '-', '6', 's', ' ', '%', '-', '2', '2', 's', ' ', '%', '-', '2', '2', 's', ' ', '%', 's', '\n', 0};
static const WCHAR fmtudpout[] = {' ', ' ', '%', '-', '6', 's', ' ', '%', '-', '2', '2', 's', ' ', '*', ':', '*', '\n', 0};
+static const WCHAR tcpstatesW[][16] = {
+ {'?', '?', '?', 0},
+ {'C', 'L', 'O', 'S', 'E', 'D', 0},
+ {'L', 'I', 'S', 'T', 'E', 'N', 'I', 'N', 'G', 0},
+ {'S', 'Y', 'N', '_', 'S', 'E', 'N', 'T', 0},
+ {'S', 'Y', 'N', '_', 'R', 'C', 'V', 'D', 0},
+ {'E', 'S', 'T', 'A', 'B', 'L', 'I', 'S', 'H', 'E', 'D', 0},
+ {'F', 'I', 'N', '_', 'W', 'A', 'I', 'T', '1', 0},
+ {'F', 'I', 'N', '_', 'W', 'A', 'I', 'T', '2', 0},
+ {'C', 'L', 'O', 'S', 'E', '_', 'W', 'A', 'I', 'T', 0},
+ {'C', 'L', 'O', 'S', 'I', 'N', 'G', 0},
+ {'L', 'A', 'S', 'T', '_', 'A', 'C', 'K', 0},
+ {'T', 'I', 'M', 'E', '_', 'W', 'A', 'I', 'T', 0},
+ {'D', 'E', 'L', 'E', 'T', 'E', '_', 'T', 'C', 'B', 0},
+};
+
/* =========================================================================
* Output a unicode string. Ideally this will go to the console
* and hence required WriteConsoleW to output it, however if file i/o is
@@ -188,7 +204,7 @@ static void NETSTAT_tcp_table(void)
sprintfW(Host, fmtcolon, HostIp, HostPort);
sprintfW(Remote, fmtcolon, RemoteIp, RemotePort);
- NETSTAT_wprintf(fmttcpout, tcpW, Host, Remote, NETSTAT_load_message(table->table[i].u.dwState));
+ NETSTAT_wprintf(fmttcpout, tcpW, Host, Remote, tcpstatesW[table->table[i].u.dwState]);
}
}
HeapFree(GetProcessHeap(), 0, table);
diff --git a/programs/netstat/netstat.h b/programs/netstat/netstat.h
index dc4fb1e..0f7c545 100644
--- a/programs/netstat/netstat.h
+++ b/programs/netstat/netstat.h
@@ -30,21 +30,8 @@ typedef enum _NETSTATPROTOCOLS {
PROT_UDPV6,
} NETSTATPROTOCOLS;
-#define IDS_TCP_CLOSED 1
-#define IDS_TCP_LISTENING 2
-#define IDS_TCP_SYN_SENT 3
-#define IDS_TCP_SYN_RCVD 4
-#define IDS_TCP_ESTABLISHED 5
-#define IDS_TCP_FIN_WAIT1 6
-#define IDS_TCP_FIN_WAIT2 7
-#define IDS_TCP_CLOSE_WAIT 8
-#define IDS_TCP_CLOSING 9
-#define IDS_TCP_LAST_ACK 10
-#define IDS_TCP_TIME_WAIT 11
-#define IDS_TCP_DELETE_TCB 12
-
-#define IDS_TCP_ACTIVE_CONN 13
-#define IDS_TCP_PROTO 14
-#define IDS_TCP_LOCAL_ADDR 15
-#define IDS_TCP_REMOTE_ADDR 16
-#define IDS_TCP_STATE 17
+#define IDS_TCP_ACTIVE_CONN 1
+#define IDS_TCP_PROTO 2
+#define IDS_TCP_LOCAL_ADDR 3
+#define IDS_TCP_REMOTE_ADDR 4
+#define IDS_TCP_STATE 5
diff --git a/programs/netstat/netstat.rc b/programs/netstat/netstat.rc
index 3a5b60b..0ad36b7 100644
--- a/programs/netstat/netstat.rc
+++ b/programs/netstat/netstat.rc
@@ -24,19 +24,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
{
- IDS_TCP_CLOSED, "CLOSED"
- IDS_TCP_LISTENING, "LISTENING"
- IDS_TCP_SYN_SENT, "SYN_SENT"
- IDS_TCP_SYN_RCVD, "SYN_RCVD"
- IDS_TCP_ESTABLISHED, "ESTABLISHED"
- IDS_TCP_FIN_WAIT1, "FIN_WAIT1"
- IDS_TCP_FIN_WAIT2, "FIN_WAIT2"
- IDS_TCP_CLOSE_WAIT, "CLOSE_WAIT"
- IDS_TCP_CLOSING, "CLOSING"
- IDS_TCP_LAST_ACK, "LAST_ACK"
- IDS_TCP_TIME_WAIT, "TIME_WAIT"
- IDS_TCP_DELETE_TCB, "DELETE_TCB"
-
IDS_TCP_ACTIVE_CONN, "Active Connections"
IDS_TCP_PROTO, "Proto"
IDS_TCP_LOCAL_ADDR, "Local Address"
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list