Make two items in progress dialog translatable

Fix part of #8004, close  #13096
This commit is contained in:
ArkadiuszMichalski 2023-02-11 13:50:35 +01:00 committed by Don Ho
parent 43182e1d04
commit 3f13957f69
3 changed files with 11 additions and 2 deletions

View File

@ -1610,6 +1610,8 @@ Find in all files but exclude all folders log or logs recursively:
<summary-nbsel1 value=" selected characters ("/>
<summary-nbsel2 value=" bytes) in "/>
<summary-nbrange value=" ranges"/>
<progress-cancel-button value="Cancel"/>
<progress-cancel-info value="Cancelling operation, please wait..."/>
<find-in-files-progress-title value="Find In Files progress..."/>
<replace-in-files-confirm-title value="Are you sure?"/>
<replace-in-files-confirm-directory value="Are you sure you want to replace all occurrences in :"/>

View File

@ -1421,6 +1421,8 @@ Find in all files except exe, obj &amp;&amp; log:
<summary-nbsel1 value=" selected characters ("/>
<summary-nbsel2 value=" bytes) in "/>
<summary-nbrange value=" ranges"/>
<progress-cancel-button value="Cancel"/>
<progress-cancel-info value="Cancelling operation, please wait..."/>
<find-in-files-progress-title value="Find In Files progress..."/>
<replace-in-files-confirm-title value="Are you sure?"/>
<replace-in-files-confirm-directory value="Are you sure you want to replace all occurrences in :"/>

View File

@ -5536,7 +5536,10 @@ int Progress::createProgressWindow()
::SendMessage(_hPBar, PBM_SETBARCOLOR, 0, static_cast<LPARAM>(NppDarkMode::getDarkerTextColor()));
}
_hBtn = ::CreateWindowEx(0, TEXT("BUTTON"), TEXT("Cancel"),
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
generic_string cancel = pNativeSpeaker->getLocalizedStrFromID("progress-cancel-button", TEXT("Cancel"));
_hBtn = ::CreateWindowEx(0, TEXT("BUTTON"), cancel.c_str(),
WS_CHILD | WS_VISIBLE | BS_DEFPUSHBUTTON | BS_TEXT,
(width - cBTNwidth) / 2, yTextPos + textHeight + cPBheight + progressBarPadding,
cBTNwidth, cBTNheight,
@ -5613,7 +5616,9 @@ LRESULT APIENTRY Progress::wndProc(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM l
Progress* pw = reinterpret_cast<Progress*>(static_cast<LONG_PTR>(::GetWindowLongPtr(hwnd, GWLP_USERDATA)));
::ResetEvent(pw->_hActiveState);
::EnableWindow(pw->_hBtn, FALSE);
pw->setInfo(TEXT("Cancelling operation, please wait..."));
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
generic_string info = pNativeSpeaker->getLocalizedStrFromID("progress-cancel-info", TEXT("Cancelling operation, please wait..."));
pw->setInfo(info.c_str());
return 0;
}
break;