From 11358d7dccbf32167f2c69afc14bce0d7e93438c Mon Sep 17 00:00:00 2001 From: Blake Madden Date: Sun, 19 Mar 2023 08:11:49 -0400 Subject: [PATCH] Don't expose internal strings to translation in samples Remove _() around string which it doesn't make sense to translate in the sockets sample. This doesn't actually change anything as this sample doesn't use translations in any case, but still show a good example. Closes #23362. --- samples/sockets/client.cpp | 2 +- samples/sockets/server.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 1556a4afda..9007e3eddd 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -325,7 +325,7 @@ void MyFrame::OpenConnection(wxSockAddress::Family family) wxString hostname = wxGetTextFromUser( _("Enter the address of the wxSocket demo server:"), _("Connect ..."), - _("localhost")); + "localhost"); if ( hostname.empty() ) return; diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 1fb8d9b93e..68069d13da 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -381,12 +381,12 @@ void MyFrame::Test3(wxSocketBase *sock) void MyFrame::OnServerEvent(wxSocketEvent& event) { - wxString s = _("OnServerEvent: "); + wxString s = "OnServerEvent: "; wxSocketBase *sock; switch(event.GetSocketEvent()) { - case wxSOCKET_CONNECTION : s.Append(_("wxSOCKET_CONNECTION\n")); break; + case wxSOCKET_CONNECTION : s.Append("wxSOCKET_CONNECTION\n"); break; default : s.Append(_("Unexpected event !\n")); break; } @@ -428,14 +428,14 @@ void MyFrame::OnServerEvent(wxSocketEvent& event) void MyFrame::OnSocketEvent(wxSocketEvent& event) { - wxString s = _("OnSocketEvent: "); + wxString s = "OnSocketEvent: "; wxSocketBase *sock = event.GetSocket(); // First, print a message switch(event.GetSocketEvent()) { - case wxSOCKET_INPUT : s.Append(_("wxSOCKET_INPUT\n")); break; - case wxSOCKET_LOST : s.Append(_("wxSOCKET_LOST\n")); break; + case wxSOCKET_INPUT : s.Append("wxSOCKET_INPUT\n"); break; + case wxSOCKET_LOST : s.Append("wxSOCKET_LOST\n"); break; default : s.Append(_("Unexpected event !\n")); break; }