Translate the warning shown by wxHyperlinkCtrl::SendEvent()

As anything shown to the user, this string must be translated, so use
_() around it instead of wxT().

Also reword the string a little; remove unnecessary call to .c_str() and
use a const reference instead of making a copy of the URL unnecessarily.
This commit is contained in:
Vadim Zeitlin 2018-11-05 19:38:18 +01:00
parent 3e246c767f
commit 190601c47f

View File

@ -127,13 +127,13 @@ wxHyperlinkCtrlBase::CheckParams(const wxString& label,
void wxHyperlinkCtrlBase::SendEvent() void wxHyperlinkCtrlBase::SendEvent()
{ {
wxString url = GetURL(); const wxString& url = GetURL();
wxHyperlinkEvent linkEvent(this, GetId(), url); wxHyperlinkEvent linkEvent(this, GetId(), url);
if (!GetEventHandler()->ProcessEvent(linkEvent)) // was the event skipped ? if (!GetEventHandler()->ProcessEvent(linkEvent)) // was the event skipped ?
{ {
if (!wxLaunchDefaultBrowser(url)) if (!wxLaunchDefaultBrowser(url))
{ {
wxLogWarning(wxT("Could not launch the default browser with url '%s' !"), url.c_str()); wxLogWarning(_("Failed to open URL \"%s\" in the default browser"), url);
} }
} }
} }