From 95c6d1ea1ec72a83d24e37a53d93d03f2f328864 Mon Sep 17 00:00:00 2001
From: Scott Sumner <30118311+sasumner@users.noreply.github.com>
Date: Sun, 14 Jun 2020 15:21:38 -0400
Subject: [PATCH] Make regex zero-length-match calltip transatable
Close #8393, close #8414
---
PowerEditor/installer/nativeLang/english.xml | 1 +
PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index 874e01746..3f55a1ed4 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -1274,6 +1274,7 @@ Find in all files except exe, obj && log:
+
diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
index 2bc38fd39..cce6a6ab1 100644
--- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
+++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp
@@ -1769,7 +1769,10 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, const FindOption *op
// Show a calltip for a zero length match
if (start == end)
{
- (*_ppEditView)->execute(SCI_CALLTIPSHOW, start, reinterpret_cast("^ zero length match"));
+ NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
+ generic_string msg = pNativeSpeaker->getLocalizedStrFromID("find-regex-zero-length-match", TEXT("zero length match"));
+ msg = TEXT("^ ") + msg;
+ (*_ppEditView)->showCallTip(start, msg.c_str());
}
if (::SendMessage(_hParent, WM_GETCURRENTMACROSTATUS,0,0) == MACRO_RECORDING_IN_PROGRESS)
(*_ppEditView)->execute(SCI_STARTRECORD);