diff --git a/PowerEditor/installer/nativeLang/chinese.xml b/PowerEditor/installer/nativeLang/chinese.xml index 853a0890..b90072d9 100644 --- a/PowerEditor/installer/nativeLang/chinese.xml +++ b/PowerEditor/installer/nativeLang/chinese.xml @@ -12,7 +12,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -110,16 +110,16 @@ - + - - - - + + + + @@ -165,7 +165,7 @@ - + @@ -215,7 +215,7 @@ - + @@ -245,8 +245,8 @@ - - + + @@ -289,9 +289,9 @@ - - - + + + @@ -378,14 +378,14 @@ - - - + + + - - + + - + @@ -404,7 +404,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -673,7 +673,7 @@ - + @@ -710,10 +710,10 @@ - + - - + + @@ -735,8 +735,8 @@ - - + + @@ -748,7 +748,7 @@ - + @@ -758,8 +758,8 @@ - - + + @@ -808,10 +808,10 @@ - + - - + + @@ -828,7 +828,7 @@ - + @@ -854,12 +854,12 @@ - + - + @@ -889,10 +889,10 @@ - - - - + + + + @@ -928,6 +928,19 @@ + + + + + + + + + + + + + - + @@ -1015,13 +1028,13 @@ - + - + @@ -1029,13 +1042,13 @@ - - - - + + + + - - + + @@ -1101,19 +1114,19 @@ - - - - + + + + - + - - - + + + - - + + @@ -1139,6 +1152,14 @@ + + + + + + + + diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml index 1eede1fd..a789cd2e 100644 --- a/PowerEditor/installer/nativeLang/english.xml +++ b/PowerEditor/installer/nativeLang/english.xml @@ -931,6 +931,19 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml index fc80137c..2251fc4a 100644 --- a/PowerEditor/installer/nativeLang/french.xml +++ b/PowerEditor/installer/nativeLang/french.xml @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -113,16 +113,16 @@ - + - - - - + + + + @@ -146,14 +146,14 @@ - - - - - - - - + + + + + + + + @@ -221,7 +221,7 @@ - + @@ -260,8 +260,8 @@ - - + + @@ -288,9 +288,9 @@ - - - + + + @@ -332,13 +332,13 @@ - + - + @@ -400,7 +400,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -677,13 +677,13 @@ - - + @@ -697,8 +697,8 @@ - - + + @@ -720,8 +720,8 @@ - - + + @@ -733,7 +733,7 @@ - + @@ -742,8 +742,8 @@ - - + + @@ -792,12 +792,12 @@ - - - - - - + + + + + + @@ -810,7 +810,7 @@ - + @@ -838,13 +838,13 @@ - + - + @@ -879,9 +879,9 @@ - - - + + + @@ -916,6 +916,19 @@ + + + + + + + + + + + + + @@ -990,13 +1003,13 @@ please give another one."/> - - + + - - - + + + @@ -1004,13 +1017,13 @@ please give another one."/> - - - - + + + + - - + + @@ -1079,17 +1092,17 @@ please give another one."/> - + - + - + - - - - - + + + + + @@ -1114,6 +1127,14 @@ please give another one."/> + + + + + + + + diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 8f12d63c..57140059 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2960,7 +2960,7 @@ void Notepad_plus::command(int id) if (dlgNode) dlgNode = _nativeLangSpeaker.searchDlgNode(dlgNode, "Window"); } - _windowsDlg.doDialog(dlgNode); + _windowsDlg.doDialog(); } break; diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 8a018f6f..94619461 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -672,8 +672,12 @@ INT_PTR CALLBACK FindInFinderDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA switch (message) { case WM_INITDIALOG: + { + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + pNativeSpeaker->changeDlgLang(_hSelf, "FindInFinder"); initFromOptions(); - return TRUE; + } + return TRUE; case WM_COMMAND: { @@ -3257,18 +3261,30 @@ INT_PTR CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) ::GetCursorPos(&p); ContextMenu scintillaContextmenu; vector tmp; - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_FINDINFINDERDLG, TEXT("Find in this finder..."))); + + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + + generic_string findInFinder = pNativeSpeaker->getLocalizedStrFromID("finder-find-in-finder", TEXT("Find in these found results...")); + generic_string closeThis = pNativeSpeaker->getLocalizedStrFromID("finder-close-this", TEXT("Close this finder")); + generic_string collapseAll = pNativeSpeaker->getLocalizedStrFromID("finder-collapse-all", TEXT("Collapse all")); + generic_string uncollapseAll = pNativeSpeaker->getLocalizedStrFromID("finder-uncollapse-all", TEXT("Uncollapse all")); + generic_string copy = pNativeSpeaker->getLocalizedStrFromID("finder-copy", TEXT("Copy")); + generic_string selectAll = pNativeSpeaker->getLocalizedStrFromID("finder-select-all", TEXT("Select all")); + generic_string clearAll = pNativeSpeaker->getLocalizedStrFromID("finder-clear-all", TEXT("Clear all")); + generic_string openAll = pNativeSpeaker->getLocalizedStrFromID("finder-open-all", TEXT("Open all")); + + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_FINDINFINDERDLG, findInFinder)); if (_canBeVolatiled) - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_REMOVEFINDER, TEXT("Close this finder"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_REMOVEFINDER, closeThis)); tmp.push_back(MenuItemUnit(0, TEXT("Separator"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCOLLAPSE, TEXT("Collapse all"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERUNCOLLAPSE, TEXT("Uncollapse all"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCOLLAPSE, collapseAll)); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERUNCOLLAPSE, uncollapseAll)); tmp.push_back(MenuItemUnit(0, TEXT("Separator"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCOPY, TEXT("Copy"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERSELECTALL, TEXT("Select all"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCLEARALL, TEXT("Clear all"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCOPY, copy)); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERSELECTALL, selectAll)); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCLEARALL, clearAll)); tmp.push_back(MenuItemUnit(0, TEXT("Separator"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFEROPENALL, TEXT("Open all"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFEROPENALL, openAll)); scintillaContextmenu.create(_hSelf, tmp); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc index 3c95b6dc..06309bc8 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.rc @@ -116,7 +116,7 @@ END IDD_FINDINFINDER_DLG DIALOGEX 36, 44, 367, 200 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW -CAPTION "Find in finder" +CAPTION "Find in found results" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN RTEXT "&Find what :",IDFINDWHAT_STATIC_FIFOLDER,6,22,75,8 @@ -130,7 +130,7 @@ BEGIN CONTROL "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED_FIFOLDER, "Button",BS_AUTORADIOBUTTON,12,155,145,10 CONTROL "Re&gular expression",IDREGEXP_FIFOLDER,"Button",BS_AUTORADIOBUTTON,12,167,78,10 CONTROL "&. matches newline",IDREDOTMATCHNL_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,167,68,9 - PUSHBUTTON "Find all",IDOK,268,20,90,14,WS_GROUP + PUSHBUTTON "Find All",IDOK,268,20,90,14,WS_GROUP PUSHBUTTON "Close",IDCANCEL,268,38,90,14 END diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp index 8b3b2c8c..ea4a5a74 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp @@ -238,7 +238,8 @@ INT_PTR CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPa { case WM_INITDIALOG : { - changeDlgLang(); + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + pNativeSpeaker->changeDlgLang(_hSelf, "Window"); return MyBaseClass::run_dlgProc(message, wParam, lParam); } @@ -461,56 +462,11 @@ void WindowsDlg::updateButtonState() EnableWindow(GetDlgItem(_hSelf, IDC_WINDOWS_SORT), TRUE); } -int WindowsDlg::doDialog(TiXmlNodeA *dlgNode) +int WindowsDlg::doDialog() { - _dlgNode = dlgNode; return static_cast(DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_WINDOWS), _hParent, dlgProc, reinterpret_cast(this))); }; -bool WindowsDlg::changeDlgLang() -{ - if (!_dlgNode) return false; - - WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); - int nativeLangEncoding = CP_ACP; - TiXmlDeclarationA *declaration = _dlgNode->GetDocument()->FirstChild()->ToDeclaration(); - if (declaration) - { - const char * encodingStr = declaration->Encoding(); - EncodingMapper *em = EncodingMapper::getInstance(); - nativeLangEncoding = em->getEncodingFromString(encodingStr); - } - - // Set Title - const char *titre = (_dlgNode->ToElement())->Attribute("title"); - if (titre && titre[0]) - { - const wchar_t *nameW = wmc->char2wchar(titre, nativeLangEncoding); - ::SetWindowText(_hSelf, nameW); - } - - // Set the text of child control - for (TiXmlNodeA *childNode = _dlgNode->FirstChildElement("Item"); - childNode ; - childNode = childNode->NextSibling("Item") ) - { - TiXmlElementA *element = childNode->ToElement(); - int id; - const char *sentinel = element->Attribute("id", &id); - const char *name = element->Attribute("name"); - if (sentinel && (name && name[0])) - { - HWND hItem = ::GetDlgItem(_hSelf, id); - if (hItem) - { - const wchar_t *nameW = wmc->char2wchar(name, nativeLangEncoding); - ::SetWindowText(hItem, nameW); - } - } - } - return true; -} - BOOL WindowsDlg::onInitDialog() { _winMgr.InitToFitSizeFromCurrent(_hSelf); diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h index f2602696..0c457a3a 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h @@ -32,7 +32,6 @@ #include "Common.h" class DocTabView; -class TiXmlNodeA; typedef enum { WDT_ACTIVATE = 1, @@ -69,11 +68,10 @@ class WindowsDlg : public SizeableDlg public : WindowsDlg(); - int doDialog(TiXmlNodeA *dlgNode); + int doDialog(); virtual void init(HINSTANCE hInst, HWND parent, DocTabView *pTab); void doRefresh(bool invalidate = false); - bool changeDlgLang(); protected : virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); @@ -101,7 +99,6 @@ protected : int _currentColumn = -1; int _lastSort = -1; bool _reverseSort = false; - TiXmlNodeA *_dlgNode = nullptr; private: virtual void init(HINSTANCE hInst, HWND parent);