From 190601c47fb97e58dcd155818d8d22820931219b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 5 Nov 2018 19:38:18 +0100 Subject: [PATCH] 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. --- src/common/hyperlnkcmn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/hyperlnkcmn.cpp b/src/common/hyperlnkcmn.cpp index aacbec2149..ff83c4bdc4 100644 --- a/src/common/hyperlnkcmn.cpp +++ b/src/common/hyperlnkcmn.cpp @@ -127,13 +127,13 @@ wxHyperlinkCtrlBase::CheckParams(const wxString& label, void wxHyperlinkCtrlBase::SendEvent() { - wxString url = GetURL(); + const wxString& url = GetURL(); wxHyperlinkEvent linkEvent(this, GetId(), url); if (!GetEventHandler()->ProcessEvent(linkEvent)) // was the event skipped ? { 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); } } }