Browse Source

[UPDATE] Update native language files (in progress).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1141 f5eea248-9336-0410-98b8-ebc06183d4e3
remotes/trunk
Don Ho 11 years ago
parent
commit
c824157bcc
  1. 3
      PowerEditor/installer/nativeLang/chinese.xml
  2. 3
      PowerEditor/installer/nativeLang/english.xml
  3. 3
      PowerEditor/installer/nativeLang/french.xml
  4. 12
      PowerEditor/src/Notepad_plus.cpp
  5. 9
      PowerEditor/src/ScitillaComponent/ScintillaEditView.h
  6. 2
      PowerEditor/src/WinControls/DocumentMap/documentMap.h
  7. 8
      PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp
  8. 185
      PowerEditor/src/localization.cpp
  9. 3
      PowerEditor/src/localization.h
  10. 4
      PowerEditor/src/menuCmdID.h

3
PowerEditor/installer/nativeLang/chinese.xml

@ -818,6 +818,9 @@
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
</MessageBox>
<DocumentMap>
<PanelTitle name="¤å¥óÁY¹Ï"/>
</DocumentMap>
<FunctionList>
<PanelTitle name="函數功能明細單"/>
<SortTip name="排序" />

3
PowerEditor/installer/nativeLang/english.xml

@ -816,6 +816,9 @@
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
<NbFileToOpenImportantWarning title="Amount of files to open is too large" message="$INT_REPLACE$ files are about to be opened.\rAre you sure to open them?"/>
</MessageBox>
<DocumentMap>
<PanelTitle name="Document Map"/>
</DocumentMap>
<FunctionList>
<PanelTitle name="Function List"/>
<SortTip name="Sort" />

3
PowerEditor/installer/nativeLang/french.xml

@ -840,6 +840,9 @@
<NppHelpAbsentWarning title="Le fichier n'existe pas" message=" n'existe pas. S'il vous plaît, le télécharger sur le site de Notepad++."/>
<SaveCurrentModifWarning title="Sauvegarder la modification en cours" message="Vous devez enregistrer la modification en cours. Toutes les modifications enregistrées ne peuvent pas être annulées. Continuer?"/>
</MessageBox>
<DocumentMap>
<PanelTitle name="Map de Document"/>
</DocumentMap>
<FunctionList>
<PanelTitle name="Liste des Fonctions"/>
<SortTip name="Trier" />

12
PowerEditor/src/Notepad_plus.cpp

@ -5125,7 +5125,7 @@ void Notepad_plus::launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel, int
data.dlgID = cmdID;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string title_temp = pNativeSpeaker->getProjectPanelLangStr("PanelTitle", PM_PROJECTPANELTITLE);
generic_string title_temp = pNativeSpeaker->getAttrNameStr(PM_PROJECTPANELTITLE, "ProjectManager", "PanelTitle");
static TCHAR title[32];
if (title_temp.length() < 32)
@ -5165,6 +5165,14 @@ void Notepad_plus::launchDocMap()
// In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog
data.dlgID = IDM_VIEW_DOC_MAP;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string title_temp = pNativeSpeaker->getAttrNameStr(DM_PANELTITLE, "DocumentMap", "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);
}
@ -5197,7 +5205,7 @@ void Notepad_plus::launchFunctionList()
data.dlgID = IDM_VIEW_FUNC_LIST;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string title_temp = pNativeSpeaker->getFunctionListPanelLangStr("PanelTitle", FL_PANELTITLE);
generic_string title_temp = pNativeSpeaker->getAttrNameStr(FL_PANELTITLE, "FunctionList", "PanelTitle");
static TCHAR title[32];
if (title_temp.length() < 32)

9
PowerEditor/src/ScitillaComponent/ScintillaEditView.h

@ -669,11 +669,18 @@ protected:
ScintillaEditView *pScint = (ScintillaEditView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA));
//
if (Message == WM_MOUSEWHEEL || Message == WM_MOUSEHWHEEL)
{
{
POINT pt;
POINTS pts = MAKEPOINTS(lParam);
POINTSTOPOINT(pt, pts);
HWND hwndOnMouse = WindowFromPoint(pt);
//Hack for Synaptics TouchPad Driver
char synapticsHack[26];
GetClassNameA(hwndOnMouse, (LPSTR)&synapticsHack, 26);
if (std::string(synapticsHack) == "SynTrackCursorWindowClass")
return (pScint->scintillaNew_Proc(hwnd, Message, wParam, lParam));
ScintillaEditView *pScintillaOnMouse = (ScintillaEditView *)(::GetWindowLongPtr(hwndOnMouse, GWL_USERDATA));
if (pScintillaOnMouse != pScint)
return ::SendMessage(hwndOnMouse, Message, wParam, lParam);

2
PowerEditor/src/WinControls/DocumentMap/documentMap.h

@ -35,6 +35,8 @@
#include "documentMap_rc.h"
#define DM_PANELTITLE TEXT("Document Map")
#define DOCUMENTMAP_SCROLL (WM_USER + 1)
#define DOCUMENTMAP_MOUSECLICKED (WM_USER + 2)
#define DOCUMENTMAP_MOUSEWHEEL (WM_USER + 3)

8
PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp

@ -348,7 +348,7 @@ bool ProjectPanel::openWorkSpace(const TCHAR *projectFileName)
_workSpaceFilePath = projectFileName;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string workspace = pNativeSpeaker->getProjectPanelLangStr("WorkspaceRootName", PM_WORKSPACEROOTNAME);
generic_string workspace = pNativeSpeaker->getAttrNameStr(PM_WORKSPACEROOTNAME, "ProjectManager", "WorkspaceRootName");
HTREEITEM rootItem = _treeView.addItem(workspace.c_str(), TVI_ROOT, INDEX_CLEAN_ROOT);
for ( ; childNode ; childNode = childNode->NextSibling(TEXT("Project")))
@ -366,7 +366,7 @@ bool ProjectPanel::openWorkSpace(const TCHAR *projectFileName)
void ProjectPanel::newWorkSpace()
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string workspace = pNativeSpeaker->getProjectPanelLangStr("WorkspaceRootName", PM_WORKSPACEROOTNAME);
generic_string workspace = pNativeSpeaker->getAttrNameStr(PM_WORKSPACEROOTNAME, "ProjectManager", "WorkspaceRootName");
_treeView.addItem(workspace.c_str(), TVI_ROOT, INDEX_CLEAN_ROOT);
setWorkSpaceDirty(false);
_workSpaceFilePath = TEXT("");
@ -828,7 +828,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
HTREEITEM root = _treeView.getRoot();
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string newProjectLabel = pNativeSpeaker->getProjectPanelLangStr("NewProjectName", PM_NEWPROJECTNAME);
generic_string newProjectLabel = pNativeSpeaker->getAttrNameStr(PM_NEWPROJECTNAME, "ProjectManager", "NewProjectName");
HTREEITEM addedItem = _treeView.addItem(newProjectLabel.c_str(), root, INDEX_PROJECT);
setWorkSpaceDirty(true);
_treeView.expand(hTreeItem);
@ -868,7 +868,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
case IDM_PROJECT_NEWFOLDER :
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
generic_string newFolderLabel = pNativeSpeaker->getProjectPanelLangStr("NewFolderName", PM_NEWFOLDERNAME);
generic_string newFolderLabel = pNativeSpeaker->getAttrNameStr(PM_NEWFOLDERNAME, "ProjectManager", "NewFolderName");
addFolder(hTreeItem, newFolderLabel.c_str());
setWorkSpaceDirty(true);
}

185
PowerEditor/src/localization.cpp

@ -84,9 +84,7 @@ generic_string NativeLangSpeaker::getSpecialMenuEntryName(const char *entryName)
if (!entriesRoot) return TEXT("");
const char *idName = NULL;
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
#endif
for (TiXmlNodeA *childNode = entriesRoot->FirstChildElement("Item");
childNode ;
@ -100,11 +98,7 @@ generic_string NativeLangSpeaker::getSpecialMenuEntryName(const char *entryName)
const char *name = element->Attribute("name");
if (!strcmp(idName, entryName))
{
#ifdef UNICODE
return wmc->char2wchar(name, _nativeLangEncoding);
#else
return name;
#endif
}
}
}
@ -125,9 +119,7 @@ generic_string NativeLangSpeaker::getNativeLangMenuString(int itemID)
node = node->FirstChild("Commands");
if (!node) return TEXT("");
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
#endif
for (TiXmlNodeA *childNode = node->FirstChildElement("Item");
childNode ;
@ -140,11 +132,7 @@ generic_string NativeLangSpeaker::getNativeLangMenuString(int itemID)
const char *name = element->Attribute("name");
if (name)
{
#ifdef UNICODE
return wmc->char2wchar(name, _nativeLangEncoding);
#else
return name;
#endif
}
}
}
@ -156,7 +144,6 @@ struct MenuPosition {
int _y;
int _z;
char _id[64];
//MenuPosition(): _x(-1), _y(-1), _z(-1){_id[0] = '\0';};
};
MenuPosition menuPos[] = {
@ -245,9 +232,7 @@ void NativeLangSpeaker::changeMenuLang(HMENU menuHandle, generic_string & plugin
if (!entriesRoot) return;
const char *idName = NULL;
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
#endif
for (TiXmlNodeA *childNode = entriesRoot->FirstChildElement("Item");
childNode ;
@ -261,13 +246,8 @@ void NativeLangSpeaker::changeMenuLang(HMENU menuHandle, generic_string & plugin
if (menuPos._x != -1)
{
const char *name = element->Attribute("name");
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::ModifyMenu(menuHandle, menuPos._x, MF_BYPOSITION, 0, nameW);
#else
::ModifyMenu(menuHandle, menuPos._x, MF_BYPOSITION, 0, name);
#endif
}
}
else
@ -278,21 +258,13 @@ void NativeLangSpeaker::changeMenuLang(HMENU menuHandle, generic_string & plugin
const char *name = element->Attribute("name");
if (!strcmp(idName, "Plugins"))
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
pluginsTrans = nameW;
#else
pluginsTrans = name;
#endif
}
else if (!strcmp(idName, "Window"))
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
windowTrans = nameW;
#else
windowTrans = name;
#endif
}
}
}
@ -308,12 +280,8 @@ void NativeLangSpeaker::changeMenuLang(HMENU menuHandle, generic_string & plugin
element->Attribute("id", &id);
const char *name = element->Attribute("name");
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::ModifyMenu(menuHandle, id, MF_BYCOMMAND, id, nameW);
#else
::ModifyMenu(menuHandle, id, MF_BYCOMMAND, id, name);
#endif
}
TiXmlNodeA *subEntriesRoot = mainMenu->FirstChild("SubEntries");
@ -356,13 +324,9 @@ void NativeLangSpeaker::changeMenuLang(HMENU menuHandle, generic_string & plugin
hMenu = hSubMenu2;
pos = z;
}
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::ModifyMenu(hMenu, pos, MF_BYPOSITION, 0, nameW);
#else
::ModifyMenu(hMenu, pos, MF_BYPOSITION, 0, name);
#endif
}
}
@ -453,8 +417,7 @@ void NativeLangSpeaker::changeLangTabDrapContextMenu(HMENU hCM)
cloneToViewA = element->Attribute("name");
}
}
//HMENU hCM = _tabPopupDropMenu.getMenuHandle();
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
if (goToViewA && goToViewA[0])
{
@ -468,18 +431,6 @@ void NativeLangSpeaker::changeLangTabDrapContextMenu(HMENU hCM)
int cmdID = ::GetMenuItemID(hCM, POS_CLONE2VIEW);
::ModifyMenu(hCM, POS_CLONE2VIEW, MF_BYPOSITION|MF_STRING, cmdID, cloneToViewG);
}
#else
if (goToViewA && goToViewA[0])
{
int cmdID = ::GetMenuItemID(hCM, POS_GO2VIEW);
::ModifyMenu(hCM, POS_GO2VIEW, MF_BYPOSITION, cmdID, goToViewA);
}
if (cloneToViewA && cloneToViewA[0])
{
int cmdID = ::GetMenuItemID(hCM, POS_CLONE2VIEW);
::ModifyMenu(hCM, POS_CLONE2VIEW, MF_BYPOSITION, cmdID, cloneToViewA);
}
#endif
}
}
@ -493,23 +444,15 @@ void NativeLangSpeaker::changeConfigLang(HWND hDlg)
styleConfDlgNode = styleConfDlgNode->FirstChild("StyleConfig");
if (!styleConfDlgNode) return;
//HWND hDlg = _configStyleDlg.getHSelf();
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
#endif
// Set Title
const char *titre = (styleConfDlgNode->ToElement())->Attribute("title");
if ((titre && titre[0]) && hDlg)
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(titre, _nativeLangEncoding);
::SetWindowText(hDlg, nameW);
#else
::SetWindowText(hDlg, titre);
#endif
}
for (TiXmlNodeA *childNode = styleConfDlgNode->FirstChildElement("Item");
childNode ;
@ -524,12 +467,8 @@ void NativeLangSpeaker::changeConfigLang(HWND hDlg)
HWND hItem = ::GetDlgItem(hDlg, id);
if (hItem)
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::SetWindowText(hItem, nameW);
#else
::SetWindowText(hItem, name);
#endif
}
}
}
@ -548,12 +487,8 @@ void NativeLangSpeaker::changeConfigLang(HWND hDlg)
HWND hItem = ::GetDlgItem(hDlg, id);
if (hItem)
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::SetWindowText(hItem, nameW);
#else
::SetWindowText(hItem, name);
#endif
}
}
}
@ -573,14 +508,9 @@ void NativeLangSpeaker::changeStyleCtrlsLang(HWND hDlg, int *idArray, const char
hItem = ::GetDlgItem(hDlg, idArray[i]);
if (hItem)
{
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
const wchar_t *nameW = wmc->char2wchar(translatedText[i], _nativeLangEncoding);
::SetWindowText(hItem, nameW);
#else
::SetWindowText(hItem, translatedText[i]);
#endif
}
}
}
@ -639,20 +569,15 @@ void NativeLangSpeaker::changeUserDefineLang(UserDefineDialog *userDefineDlg)
if (!userDefineDlgNode) return;
HWND hDlg = userDefineDlg->getHSelf();
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
#endif
// Set Title
const char *titre = (userDefineDlgNode->ToElement())->Attribute("title");
if (titre && titre[0])
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(titre, _nativeLangEncoding);
::SetWindowText(hDlg, nameW);
#else
::SetWindowText(hDlg, titre);
#endif
}
// for each control
const int nbControl = 9;
@ -676,12 +601,8 @@ void NativeLangSpeaker::changeUserDefineLang(UserDefineDialog *userDefineDlg)
HWND hItem = ::GetDlgItem(hDlg, id);
if (hItem)
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::SetWindowText(hItem, nameW);
#else
::SetWindowText(hItem, name);
#endif
}
}
else
@ -706,18 +627,6 @@ void NativeLangSpeaker::changeUserDefineLang(UserDefineDialog *userDefineDlg)
for (int i = 0 ; i < nbDlg ; ++i)
{
/*
for (int j = 0 ; j < nbGpArray[i] ; j++)
{
switch (i)
{
case 0 : changeStyleCtrlsLang(hDlgArrary[i], folderID[j], translatedText); break;
case 1 : changeStyleCtrlsLang(hDlgArrary[i], keywordsID[j], translatedText); break;
case 2 : changeStyleCtrlsLang(hDlgArrary[i], commentID[j], translatedText); break;
case 3 : changeStyleCtrlsLang(hDlgArrary[i], operatorID[j], translatedText); break;
}
}
*/
TiXmlNodeA *node = userDefineDlgNode->FirstChild(nodeNameArray[i]);
if (node)
@ -726,12 +635,8 @@ void NativeLangSpeaker::changeUserDefineLang(UserDefineDialog *userDefineDlg)
titre = (node->ToElement())->Attribute("title");
if (titre &&titre[0])
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(titre, _nativeLangEncoding);
userDefineDlg->setTabName(i, nameW);
#else
userDefineDlg->setTabName(i, titre);
#endif
}
for (TiXmlNodeA *childNode = node->FirstChildElement("Item");
childNode ;
@ -746,12 +651,8 @@ void NativeLangSpeaker::changeUserDefineLang(UserDefineDialog *userDefineDlg)
HWND hItem = ::GetDlgItem(hDlgArrary[i], id);
if (hItem)
{
#ifdef UNICODE
const wchar_t *nameW = wmc->char2wchar(name, _nativeLangEncoding);
::SetWindowText(hItem, nameW);
#else
::SetWindowText(hItem, name);
#endif
}
}
}
@ -774,7 +675,7 @@ void NativeLangSpeaker::changeFindReplaceDlgLang(FindReplaceDlg & findReplaceDlg
const char *titre2 = (dlgNode->ToElement())->Attribute("titleReplace");
const char *titre3 = (dlgNode->ToElement())->Attribute("titleFindInFiles");
const char *titre4 = (dlgNode->ToElement())->Attribute("titleMark");
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
if (titre1 && titre1[0])
@ -801,28 +702,6 @@ void NativeLangSpeaker::changeFindReplaceDlgLang(FindReplaceDlg & findReplaceDlg
pNppParam->getFindDlgTabTitiles()._mark = nameW;
findReplaceDlg.changeTabName(MARK_DLG, pNppParam->getFindDlgTabTitiles()._mark.c_str());
}
#else
if (titre1 && titre1[0])
{
pNppParam->getFindDlgTabTitiles()._find = titre1;
findReplaceDlg.changeTabName(FIND_DLG, pNppParam->getFindDlgTabTitiles()._find.c_str());
}
if (titre2 && titre2[0])
{
pNppParam->getFindDlgTabTitiles()._replace = titre2;
findReplaceDlg.changeTabName(REPLACE_DLG, pNppParam->getFindDlgTabTitiles()._replace.c_str());
}
if (titre3 && titre3[0])
{
pNppParam->getFindDlgTabTitiles()._findInFiles = titre3;
findReplaceDlg.changeTabName(FINDINFILES_DLG, pNppParam->getFindDlgTabTitiles()._findInFiles.c_str());
}
if (titre4 && titre4[0])
{
pNppParam->getFindDlgTabTitiles()._mark = titre4;
findReplaceDlg.changeTabName(MARK_DLG, pNppParam->getFindDlgTabTitiles()._mark.c_str());
}
#endif
}
}
}
@ -966,13 +845,9 @@ void NativeLangSpeaker::changeShortcutLang()
CommandShortcut & csc = mainshortcuts[index];
if (csc.getID() == (unsigned long)id)
{
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
const wchar_t * nameW = wmc->char2wchar(name, _nativeLangEncoding);
csc.setName(nameW);
#else
csc.setName(name);
#endif
}
}
}
@ -999,13 +874,10 @@ void NativeLangSpeaker::changeShortcutLang()
if (index > -1 && index < scinSize) { //valid index only
const char *name = element->Attribute("name");
ScintillaKeyMap & skm = scinshortcuts[index];
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
const wchar_t * nameW = wmc->char2wchar(name, _nativeLangEncoding);
skm.setName(nameW);
#else
skm.setName(name);
#endif
}
}
}
@ -1034,13 +906,9 @@ void NativeLangSpeaker::changeShortcutmapperLang(ShortcutMapper * sm)
{
const char *name = element->Attribute("name");
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
const wchar_t * nameW = wmc->char2wchar(name, _nativeLangEncoding);
sm->translateTab(index, nameW);
#else
sm->translateTab(index, name);
#endif
}
}
}
@ -1173,24 +1041,6 @@ generic_string NativeLangSpeaker::getProjectPanelLangMenuStr(const char * nodeNa
return defaultStr;
}
generic_string NativeLangSpeaker::getProjectPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const
{
if (!_nativeLangA) return defaultStr;
TiXmlNodeA *targetNode = _nativeLangA->FirstChild("ProjectManager");
if (!targetNode) return defaultStr;
targetNode = targetNode->FirstChild(nodeName);
if (!targetNode) return defaultStr;
const char *name = (targetNode->ToElement())->Attribute("name");
if (name && name[0])
{
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
return wmc->char2wchar(name, _nativeLangEncoding);
}
return defaultStr;
}
generic_string NativeLangSpeaker::getAttrNameStr(const TCHAR *defaultStr, const char *nodeL1Name, const char *nodeL2Name) const
{
if (!_nativeLangA) return defaultStr;
@ -1211,25 +1061,6 @@ generic_string NativeLangSpeaker::getAttrNameStr(const TCHAR *defaultStr, const
return defaultStr;
}
generic_string NativeLangSpeaker::getFunctionListPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const
{
if (!_nativeLangA) return defaultStr;
TiXmlNodeA *targetNode = _nativeLangA->FirstChild("FunctionList");
if (!targetNode) return defaultStr;
targetNode = targetNode->FirstChild(nodeName);
if (!targetNode) return defaultStr;
// Set Title
const char *name = (targetNode->ToElement())->Attribute("name");
if (name && name[0])
{
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
return wmc->char2wchar(name, _nativeLangEncoding);
}
return defaultStr;
}
int NativeLangSpeaker::messageBox(const char *msgBoxTagName, HWND hWnd, TCHAR *defaultMessage, TCHAR *defaultTitle, int msgBoxType, int intInfo, TCHAR *strInfo)
{
generic_string msg, title;
@ -1267,12 +1098,4 @@ int NativeLangSpeaker::messageBox(const char *msgBoxTagName, HWND hWnd, TCHAR *d
msg.replace(index, strPlaceHolderLen, strInfo);
}
return ::MessageBox(hWnd, msg.c_str(), title.c_str(), msgBoxType);
/*
defaultTitle.replace(index, len, int2Write);
defaultTitle.replace(index, len, str2Write);
defaultMessage.replace(index, len, int2Write);
defaultMessage.replace(index, len, str2Write);
return ::MessageBox(hWnd, defaultMessage, defaultTitle, msgBoxType);
*/
}

3
PowerEditor/src/localization.h

@ -74,8 +74,7 @@ public:
};
bool getMsgBoxLang(const char *msgBoxTagName, generic_string & title, generic_string & message);
generic_string getProjectPanelLangMenuStr(const char * nodeName, int cmdID, const TCHAR *defaultStr) const;
generic_string getProjectPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const;
generic_string getFunctionListPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const;
//generic_string getFunctionListPanelLangStr(const char *nodeName, const TCHAR *defaultStr) const;
generic_string getAttrNameStr(const TCHAR *defaultStr, const char *nodeL1Name, const char *nodeL2Name = NULL) const;
int messageBox(const char *msgBoxTagName, HWND hWnd, TCHAR *message, TCHAR *title, int msgBoxType, int intInfo = 0, TCHAR *strInfo = NULL);
private:

4
PowerEditor/src/menuCmdID.h

@ -40,7 +40,7 @@
#define IDM_FILE_SAVE (IDM_FILE + 6)
#define IDM_FILE_SAVEALL (IDM_FILE + 7)
#define IDM_FILE_SAVEAS (IDM_FILE + 8)
#define IDM_FILE_CLOSEALL_TOLEFT (IDM_FILE + 9)
#define IDM_FILE_CLOSEALL_TOLEFT (IDM_FILE + 9)
#define IDM_FILE_PRINT (IDM_FILE + 10)
#define IDM_FILE_PRINTNOW 1001
#define IDM_FILE_EXIT (IDM_FILE + 11)
@ -50,7 +50,7 @@
#define IDM_FILE_SAVECOPYAS (IDM_FILE + 15)
#define IDM_FILE_DELETE (IDM_FILE + 16)
#define IDM_FILE_RENAME (IDM_FILE + 17)
#define IDM_FILE_CLOSEALL_TORIGHT (IDM_FILE + 18)
#define IDM_FILE_CLOSEALL_TORIGHT (IDM_FILE + 18)
// To be updated if new menu item(s) is (are) added in menu "File"
#define IDM_FILEMENU_LASTONE IDM_FILE_CLOSEALL_TORIGHT

Loading…
Cancel
Save