diff --git a/PowerEditor/installer/nativeLang/chinese.xml b/PowerEditor/installer/nativeLang/chinese.xml index f1d6f22d..c481b0cf 100644 --- a/PowerEditor/installer/nativeLang/chinese.xml +++ b/PowerEditor/installer/nativeLang/chinese.xml @@ -818,6 +818,19 @@ + + + + + + + + + + + + + diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml index b2bce848..31bfdad8 100644 --- a/PowerEditor/installer/nativeLang/english.xml +++ b/PowerEditor/installer/nativeLang/english.xml @@ -816,6 +816,19 @@ + + + + + + + + + + + + + diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml index 72052afe..4fddf952 100644 --- a/PowerEditor/installer/nativeLang/french.xml +++ b/PowerEditor/installer/nativeLang/french.xml @@ -840,8 +840,21 @@ + + + + + + + + + + + + + - + diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 429acf73..6f57b9d8 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5041,6 +5041,14 @@ void Notepad_plus::launchClipboardHistoryPanel() // in this case is DOCKABLE_DEMO_INDEX // In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog data.dlgID = IDM_EDIT_CLIPBOARDHISTORY_PANEL; + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + generic_string title_temp = pNativeSpeaker->getAttrNameStr(CH_PROJECTPANELTITLE, "ClipboardHistory", "PanelTitle"); + static TCHAR title[32]; + if (title_temp.length() < 32) + { + lstrcpy(title, title_temp.c_str()); + data.pszName = title; + } ::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data); } _pClipboardHistoryPanel->display(); @@ -5067,6 +5075,15 @@ void Notepad_plus::launchFileSwitcherPanel() // in this case is DOCKABLE_DEMO_INDEX // In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog data.dlgID = IDM_VIEW_FILESWITCHER_PANEL; + + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + generic_string title_temp = pNativeSpeaker->getAttrNameStr(FS_PROJECTPANELTITLE, "DocSwitcher", "PanelTitle"); + static TCHAR title[32]; + if (title_temp.length() < 32) + { + lstrcpy(title, title_temp.c_str()); + data.pszName = title; + } ::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data); } _pFileSwitcherPanel->display(); @@ -5093,6 +5110,15 @@ void Notepad_plus::launchAnsiCharPanel() // in this case is DOCKABLE_DEMO_INDEX // In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog data.dlgID = IDM_EDIT_CHAR_PANEL; + + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + generic_string title_temp = pNativeSpeaker->getAttrNameStr(AI_PROJECTPANELTITLE, "AsciiInsertion", "PanelTitle"); + static TCHAR title[32]; + if (title_temp.length() < 32) + { + lstrcpy(title, title_temp.c_str()); + data.pszName = title; + } ::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data); } _pAnsiCharPanel->display(); diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp index e4cfcdc6..b6fcb5ae 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp @@ -28,7 +28,8 @@ #include "precompiledHeaders.h" #include "ListView.h" - +#include "Parameters.h" +#include "localization.h" void ListView::init(HINSTANCE hInst, HWND parent) { @@ -71,12 +72,16 @@ void ListView::init(HINSTANCE hInst, HWND parent) LVCOLUMN lvColumn; lvColumn.mask = LVCF_TEXT|LVCF_WIDTH; + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + generic_string valStr = pNativeSpeaker->getAttrNameStr(TEXT("Value"), "AsciiInsertion", "ColumnVal"); + generic_string charStr = pNativeSpeaker->getAttrNameStr(TEXT("Character"), "AsciiInsertion", "ColumnChar"); + lvColumn.cx = 45; - lvColumn.pszText = TEXT("Value"); + lvColumn.pszText = (TCHAR *)valStr.c_str(); ListView_InsertColumn(_hSelf, 0, &lvColumn); lvColumn.cx = 70; - lvColumn.pszText = TEXT("Character"); + lvColumn.pszText = (TCHAR *)charStr.c_str(); ListView_InsertColumn(_hSelf, 1, &lvColumn); } diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h index 5739ef38..5c80ae7a 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.h @@ -37,6 +37,8 @@ #include "ansiCharPanel_rc.h" #include "ListView.h" +#define AI_PROJECTPANELTITLE TEXT("ASCII Insertion Panel") + class ScintillaEditView; class AnsiCharPanel : public DockingDlgInterface { diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h index 70b33933..60afe974 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.h @@ -37,6 +37,8 @@ #include "clipboardHistoryPanel_rc.h" #include +#define CH_PROJECTPANELTITLE TEXT("Clipboard History") + typedef std::vector ClipboardData; class ScintillaEditView; diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp index 60c8b814..e54dfd5d 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -29,6 +29,8 @@ #include "precompiledHeaders.h" #include "VerticalFileSwitcher.h" #include "menuCmdID.h" +#include "Parameters.h" +#include "localization.h" int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) { @@ -59,8 +61,12 @@ BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPA case WM_INITDIALOG : { _fileListView.init(_hInst, _hSelf, _hImaLst); - _fileListView.insertColumn(TEXT("Name"), 150, 0); - _fileListView.insertColumn(TEXT("Ext."), 50, 1); + NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); + generic_string nameStr = pNativeSpeaker->getAttrNameStr(TEXT("Name"), FS_ROOTNODE, FS_CLMNNAME); + generic_string extStr = pNativeSpeaker->getAttrNameStr(TEXT("Ext."), FS_ROOTNODE, FS_CLMNEXT); + + _fileListView.insertColumn(nameStr.c_str(), 150, 0); + _fileListView.insertColumn(extStr.c_str(), 50, 1); _fileListView.initList(); _fileListView.display(); diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h index d1058221..779cd508 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h @@ -37,6 +37,10 @@ #include "VerticalFileSwitcher_rc.h" #include "VerticalFileSwitcherListView.h" +#define FS_PROJECTPANELTITLE TEXT("Doc Switcher") +#define FS_ROOTNODE "DocSwitcher" +#define FS_CLMNNAME "ColumnName" +#define FS_CLMNEXT "ColumnExt" class VerticalFileSwitcher : public DockingDlgInterface { public: diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp index eb4ab489..d13ba13d 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp @@ -273,13 +273,13 @@ int VerticalFileSwitcherListView::find(int bufferID, int iView) const return (found?i:-1); } -void VerticalFileSwitcherListView::insertColumn(TCHAR *name, int width, int index) +void VerticalFileSwitcherListView::insertColumn(const TCHAR *name, int width, int index) { LVCOLUMN lvColumn; lvColumn.mask = LVCF_TEXT | LVCF_WIDTH; lvColumn.cx = width; - lvColumn.pszText = name; + lvColumn.pszText = (TCHAR *)name; ListView_InsertColumn(_hSelf, index, &lvColumn); } diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h index 1aebbe93..a228e300 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h @@ -60,7 +60,7 @@ public: void setItemIconStatus(int bufferID); generic_string getFullFilePath(size_t i) const; - void insertColumn(TCHAR *name, int width, int index); + void insertColumn(const TCHAR *name, int width, int index); int nbSelectedFiles() const { return SendMessage(_hSelf, LVM_GETSELECTEDCOUNT, 0, 0); };