mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-20 04:14:40 +02:00
Make more dialog strings translatable
This commit is contained in:
parent
1f7f00b607
commit
1a86603a0c
@ -905,7 +905,7 @@
|
||||
<Item id="2" name="Cancel"/>
|
||||
</ColumnEditor>
|
||||
</Dialog>
|
||||
<MessageBox>
|
||||
<MessageBox> <!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
||||
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
||||
<NppHelpAbsentWarning title="File does not exist" message="
|
||||
@ -923,8 +923,7 @@ Continue?"/>
|
||||
<FileLockedWarning title="Save failed" message="Please check whether if this file is opened in another program"/>
|
||||
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
||||
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
||||
|
||||
<!-- $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.
|
||||
Are you sure to open them?"/>
|
||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
||||
@ -932,14 +931,44 @@ or on a folder needed privilege right for writing access.
|
||||
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
||||
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
||||
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
||||
|
||||
<DroppingFolderAsProjetModeWarning title="Invalid action" message="You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.
|
||||
you have to enable "Open all files of folder instead of launching Folder as Workspace on folder dropping" in "Default Directory" section of Preferences dialog to make this operation work."/>
|
||||
|
||||
<SortingError title="Sorting Error" message="Unable to perform numeric sort due to line $STR_REPLACE$."/>
|
||||
<ColumnModeTip title="Column Mode Tip" message="Please use "ALT+Mouse Selection" or "Alt+Shift+Arrow key" to switch to column mode."/>
|
||||
<BufferInvalidWarning title="Save failed" message="Cannot save: Buffer is invalid."/>
|
||||
|
||||
<DoSaveOrNot title="Save" message="Save file "$STR_REPLACE$" ?"/>
|
||||
<DoCloseOrNot title="Keep non existing file" message="The file "$STR_REPLACE$" doesn't exist anymore.
|
||||
Keep this file in editor?"/>
|
||||
<DoDeleteOrNot title="Delete file" message="The file "$STR_REPLACE$"
|
||||
will be moved to your Recycle Bin and this document will be closed.
|
||||
Continue?"/>
|
||||
<NoBackupDoSaveFile title="Save" message="Your backup file cannot be found (deleted from outside).
|
||||
Save it otherwise your data will be lost
|
||||
Do you want to save file "$STR_REPLACE$" ?"/>
|
||||
<DoReloadOrNot title="Reload" message=""$STR_REPLACE$"
|
||||
|
||||
This file has been modified by another program.
|
||||
Do you want to reload it?"/>
|
||||
<DoReloadOrNotAndLooseChange title="Reload" message=""$STR_REPLACE$"
|
||||
|
||||
This file has been modified by another program.
|
||||
Do you want to reload it and lose the changes made in Notepad++?"/>
|
||||
<PrehistoricSystemDetected title="Prehistoric system detected" message="It seems you still use a prehistoric system, This feature works only on a modern system, sorry."/>
|
||||
<XpUpdaterProblem title="Notepad++ Updater" message="Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.
|
||||
Do you want to go to Notepad++ page to download the latest version?"/>
|
||||
<DocTooDirtyToMonitor title="Monitoring problem" message="The document is dirty. Please save the modification before monitoring it."/>
|
||||
<DocNoExistToMonitor title="Monitoring problem" message="The file should exist to be monitored."/>
|
||||
<FileTooBigToOpene title="File size problem" message="File is too big to be opened by Notepad++"/>
|
||||
<CreateNewFileOrNot title="Create new file" message=""$INT_REPLACE$" doesn't exist. Create it?."/>
|
||||
<CreateNewFileError title="Create new file" message="Cannot create the file "$INT_REPLACE$"."/>
|
||||
<OpenFileError title="ERROR" message="Can not open file "$INT_REPLACE$"."/>
|
||||
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at "$INT_REPLACE$".
|
||||
|
||||
Do you want to save the current file anyways?"/>
|
||||
<LoadStylersFailed title="Load stylers.xml failed" message="Load "$INT_REPLACE$" failed!"/>
|
||||
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
|
||||
Do you want to recover your langs.xml?"/>
|
||||
<LoadLangsFailedFinal title="Configurator" message="Load langs.xml failed!"/>
|
||||
</MessageBox>
|
||||
<ClipboardHistory>
|
||||
<PanelTitle name="Clipboard History"/>
|
||||
@ -1020,7 +1049,7 @@ you have to enable "Open all files of folder instead of launching Folder as
|
||||
<cloud-invalid-warning value="Invalid path."/>
|
||||
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
||||
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
||||
<1-to-2-buttons-tip value="2 find buttons mode"/>
|
||||
<two-find-buttons-tip value="2 find buttons mode"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -63,7 +63,7 @@
|
||||
<Item subMenuId="encoding-westernEuropean" name="Western European"/>
|
||||
<Item subMenuId="encoding-vietnamese" name="Vietnamese"/>
|
||||
<Item subMenuId="settings-import" name="Import"/>
|
||||
<Item subMenuId="tools-md5" name="MD5"/>
|
||||
<Item subMenuId="tools-md5" name="MD5"/>
|
||||
</SubEntries>
|
||||
|
||||
<!-- all menu item -->
|
||||
@ -123,10 +123,10 @@
|
||||
<Item id="42070" name="Sentence case (blend)"/>
|
||||
<Item id="42071" name="iNVERT cASE"/>
|
||||
<Item id="42072" name="ranDOm CasE"/>
|
||||
<Item id="42073" name="Open File"/>
|
||||
<Item id="42074" name="Open Containing Folder in Explorer"/>
|
||||
<Item id="42075" name="Search on Internet"/>
|
||||
<Item id="42076" name="Change Search Engine..."/>
|
||||
<Item id="42073" name="Open File"/>
|
||||
<Item id="42074" name="Open Containing Folder in Explorer"/>
|
||||
<Item id="42075" name="Search on Internet"/>
|
||||
<Item id="42076" name="Change Search Engine..."/>
|
||||
<Item id="42018" name="&Start Recording"/>
|
||||
<Item id="42019" name="&Stop Recording"/>
|
||||
<Item id="42021" name="&Playback"/>
|
||||
@ -215,7 +215,7 @@
|
||||
<Item id="43047" name="Previous Search Result"/>
|
||||
<Item id="43048" name="Select and Find Next"/>
|
||||
<Item id="43049" name="Select and Find Previous"/>
|
||||
<Item id="43054" name="Mark..."/>
|
||||
<Item id="43054" name="Mark..."/>
|
||||
<Item id="44009" name="Post-It"/>
|
||||
<Item id="44010" name="Fold All"/>
|
||||
<Item id="44019" name="Show All Characters"/>
|
||||
@ -283,7 +283,7 @@
|
||||
<Item id="47001" name="Notepad++ Home"/>
|
||||
<Item id="47002" name="Notepad++ Project Page"/>
|
||||
<Item id="47003" name="Online Documentation"/>
|
||||
<Item id="47004" name="Notepad++ Community (Forum)"/>
|
||||
<Item id="47004" name="Notepad++ Community (Forum)"/>
|
||||
<Item id="47011" name="Live Support"/>
|
||||
<Item id="47012" name="Debug Info..."/>
|
||||
<Item id="47005" name="Get More Plugins"/>
|
||||
@ -334,7 +334,7 @@
|
||||
<Item CMID="18" name="Close All to the Right"/>
|
||||
<Item CMID="19" name="Open Containing Folder in Explorer"/>
|
||||
<Item CMID="20" name="Open Containing Folder in cmd"/>
|
||||
<Item CMID="21" name="Open in Default Viewer"/>
|
||||
<Item CMID="21" name="Open in Default Viewer"/>
|
||||
</TabBar>
|
||||
</Menu>
|
||||
|
||||
@ -492,7 +492,7 @@
|
||||
<Item id="25026" name="Operator 1"/>
|
||||
<Item id="25027" name="Operator 2"/>
|
||||
<Item id="25028" name="Numbers"/>
|
||||
<Item id="1" name="OK"/>
|
||||
<Item id="1" name="OK"/>
|
||||
<Item id="2" name="Cancel"/>
|
||||
</StylerDialog>
|
||||
<Folder title="Folder && Default">
|
||||
@ -680,7 +680,7 @@
|
||||
<Item id="6212" name="Line mode"/>
|
||||
<Item id="6213" name="Background mode"/>
|
||||
<Item id="6214" name="Enable current line highlighting"/>
|
||||
<Item id="6215" name="Enable smooth font"/>
|
||||
<Item id="6215" name="Enable smooth font"/>
|
||||
<Item id="6231" name="Border Width"/>
|
||||
<Item id="6235" name="No edge"/>
|
||||
<Item id="6236" name="Enable scrolling beyond last line"/>
|
||||
@ -719,7 +719,7 @@
|
||||
<Item id="6506" name="Disabled items"/>
|
||||
<Item id="6507" name="Make language menu compact"/>
|
||||
<Item id="6508" name="Language Menu"/>
|
||||
<Item id="6301" name="Tab Settings"/>
|
||||
<Item id="6301" name="Tab Settings"/>
|
||||
<Item id="6302" name="Replace by space"/>
|
||||
<Item id="6303" name="Tab size: "/>
|
||||
<Item id="6510" name="Use default value"/>
|
||||
@ -728,9 +728,9 @@
|
||||
<Highlighting title="Highlighting">
|
||||
<Item id="6333" name="Smart Highlighting"/>
|
||||
<Item id="6326" name="Enable smart highlighting"/>
|
||||
<Item id="6332" name="Match case"/>
|
||||
<Item id="6338" name="Match whole word only"/>
|
||||
<Item id="6339" name="Use Find dialog settings"/>
|
||||
<Item id="6332" name="Match case"/>
|
||||
<Item id="6338" name="Match whole word only"/>
|
||||
<Item id="6339" name="Use Find dialog settings"/>
|
||||
<Item id="6340" name="Highlight another view"/>
|
||||
<Item id="6329" name="Highlight Matching Tags"/>
|
||||
<Item id="6327" name="Enable"/>
|
||||
@ -827,7 +827,7 @@
|
||||
<Item id="6252" name="Open"/>
|
||||
<Item id="6255" name="Close"/>
|
||||
<Item id="6256" name="Allow on several lines"/>
|
||||
<Item id="6161" name="Word character list"/>
|
||||
<Item id="6161" name="Word character list"/>
|
||||
<Item id="6162" name="Use default Word character list as it is"/>
|
||||
<Item id="6163" name="Add your character as part of word
|
||||
(don't choose it unless you know what you're doing)"/>
|
||||
@ -838,7 +838,7 @@
|
||||
<Item id="6263" name="No Cloud"/>
|
||||
<Item id="6267" name="Set your cloud location path here:"/>
|
||||
</Cloud>
|
||||
|
||||
|
||||
<SearchEngine title="Search Engine">
|
||||
<Item id="6271" name="Search Engine (for command "Search on Internet")"/>
|
||||
<Item id="6272" name="DuckDuckGo"/>
|
||||
@ -905,7 +905,7 @@
|
||||
<Item id="2" name="Cancel"/>
|
||||
</ColumnEditor>
|
||||
</Dialog>
|
||||
<MessageBox>
|
||||
<MessageBox> <!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<ContextMenuXmlEditWarning title="Editing contextMenu" message="Editing contextMenu.xml allows you to modify your Notepad++ popup context menu.
|
||||
You have to restart your Notepad++ to take effect after modifying contextMenu.xml."/>
|
||||
<NppHelpAbsentWarning title="File does not exist" message="
|
||||
@ -923,15 +923,52 @@ Continue?"/>
|
||||
<FileLockedWarning title="Save failed" message="Please check whether if this file is opened in another program"/>
|
||||
<FileAlreadyOpenedInNpp title="" message="The file is already opened in the Notepad++."/>
|
||||
<DeleteFileFailed title="Delete File" message="Delete File failed"/>
|
||||
|
||||
<!-- $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.
|
||||
Are you sure to open them?"/>
|
||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
||||
<SettingsOnCloudError title="Settings on Cloud" message="It seems the path of settings on cloud is set on a read only drive,
|
||||
or on a folder needed privilege right for writing access.
|
||||
Your settings on cloud will be canceled. Please reset a coherent value via Preference dialog."/>
|
||||
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
||||
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
||||
<FilePathNotFoundWarning title="File Open" message="The file you're trying to open doesn't exist."/>
|
||||
<SessionFileInvalidError title="Could not Load Session" message="Session file is either corrupted or not valid."/>
|
||||
<DroppingFolderAsProjetModeWarning title="Invalid action" message="You can drop only files or folders but not both, because you're in dropping Folder as Projet mode.
|
||||
you have to enable "Open all files of folder instead of launching Folder as Workspace on folder dropping" in "Default Directory" section of Preferences dialog to make this operation work."/>
|
||||
<SortingError title="Sorting Error" message="Unable to perform numeric sort due to line $STR_REPLACE$."/>
|
||||
<ColumnModeTip title="Column Mode Tip" message="Please use "ALT+Mouse Selection" or "Alt+Shift+Arrow key" to switch to column mode."/>
|
||||
<BufferInvalidWarning title="Save failed" message="Cannot save: Buffer is invalid."/>
|
||||
<DoSaveOrNot title="Save" message="Save file "$STR_REPLACE$" ?"/>
|
||||
<DoCloseOrNot title="Keep non existing file" message="The file "$STR_REPLACE$" doesn't exist anymore.
|
||||
Keep this file in editor?"/>
|
||||
<DoDeleteOrNot title="Delete file" message="The file "$STR_REPLACE$"
|
||||
will be moved to your Recycle Bin and this document will be closed.
|
||||
Continue?"/>
|
||||
<NoBackupDoSaveFile title="Save" message="Your backup file cannot be found (deleted from outside).
|
||||
Save it otherwise your data will be lost
|
||||
Do you want to save file "$STR_REPLACE$" ?"/>
|
||||
<DoReloadOrNot title="Reload" message=""$STR_REPLACE$"
|
||||
|
||||
This file has been modified by another program.
|
||||
Do you want to reload it?"/>
|
||||
<DoReloadOrNotAndLooseChange title="Reload" message=""$STR_REPLACE$"
|
||||
|
||||
This file has been modified by another program.
|
||||
Do you want to reload it and lose the changes made in Notepad++?"/>
|
||||
<PrehistoricSystemDetected title="Prehistoric system detected" message="It seems you still use a prehistoric system, This feature works only on a modern system, sorry."/>
|
||||
<XpUpdaterProblem title="Notepad++ Updater" message="Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.
|
||||
Do you want to go to Notepad++ page to download the latest version?"/>
|
||||
<DocTooDirtyToMonitor title="Monitoring problem" message="The document is dirty. Please save the modification before monitoring it."/>
|
||||
<DocNoExistToMonitor title="Monitoring problem" message="The file should exist to be monitored."/>
|
||||
<FileTooBigToOpene title="File size problem" message="File is too big to be opened by Notepad++"/>
|
||||
<CreateNewFileOrNot title="Create new file" message=""$INT_REPLACE$" doesn't exist. Create it?."/>
|
||||
<CreateNewFileError title="Create new file" message="Cannot create the file "$INT_REPLACE$"."/>
|
||||
<OpenFileError title="ERROR" message="Can not open file "$INT_REPLACE$"."/>
|
||||
<FileBackupFailed title="File Backup Failed" message="The previous version of the file could not be saved into the backup directory at "$INT_REPLACE$".
|
||||
|
||||
Do you want to save the current file anyways?"/>
|
||||
<LoadStylersFailed title="Load stylers.xml failed" message="Load "$INT_REPLACE$" failed!"/>
|
||||
<LoadLangsFailed title="Configurator" message="Load langs.xml failed!
|
||||
Do you want to recover your langs.xml?"/>
|
||||
<LoadLangsFailedFinal title="Configurator" message="Load langs.xml failed!"/>
|
||||
</MessageBox>
|
||||
<ClipboardHistory>
|
||||
<PanelTitle name="Clipboard History"/>
|
||||
@ -1002,17 +1039,17 @@ Your settings on cloud will be canceled. Please reset a coherent value via Prefe
|
||||
</Menus>
|
||||
</ProjectManager>
|
||||
<MiscStrings>
|
||||
<word-chars-list-tip value="This allows you to include additional character into current word characters while double clicking for selection or searching with "Match whole word only" option checked."/>
|
||||
<word-chars-list-tip value="This allows you to include additional character into current word characters while double clicking for selection or searching with "Match whole word only" option checked."/>
|
||||
<word-chars-list-warning-begin value="Be aware: "/>
|
||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<word-chars-list-space-warning value="$INT_REPLACE$ space(s)"/>
|
||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<!-- $INT_REPLACE$ is a place holder, don't translate it -->
|
||||
<word-chars-list-tab-warning value="$INT_REPLACE$ TAB(s)"/>
|
||||
<word-chars-list-warning-end value=" in your character list."/>
|
||||
<cloud-invalid-warning value="Invalid path."/>
|
||||
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
||||
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
||||
<1-to-2-buttons-tip value="2 find buttons mode"/>
|
||||
<word-chars-list-warning-end value=" in your character list."/>
|
||||
<cloud-invalid-warning value="Invalid path."/>
|
||||
<cloud-restart-warning value="Please restart Notepad++ to take effect."/>
|
||||
<shift-change-direction-tip value="Use Shift + Enter to search in the opposite direction"/>
|
||||
<two-find-buttons-tip value="2 find buttons mode"/>
|
||||
</MiscStrings>
|
||||
</Native-Langue>
|
||||
</NotepadPlus>
|
||||
|
@ -1824,41 +1824,55 @@ void Notepad_plus::filePrint(bool showDialog)
|
||||
|
||||
int Notepad_plus::doSaveOrNot(const TCHAR *fn)
|
||||
{
|
||||
TCHAR pattern[64] = TEXT("Save file \"%s\" ?");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, fn);
|
||||
return doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
||||
return _nativeLangSpeaker.messageBox("DoSaveOrNot",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Save file \"$STR_REPLACE$\" ?"),
|
||||
TEXT("Save"),
|
||||
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||
0, // not used
|
||||
fn);
|
||||
}
|
||||
|
||||
int Notepad_plus::doReloadOrNot(const TCHAR *fn, bool dirty)
|
||||
{
|
||||
TCHAR* pattern = TEXT("%s\r\rThis file has been modified by another program.\rDo you want to reload it%s?");
|
||||
TCHAR* lose_info_str = dirty ? TEXT(" and lose the changes made in Notepad++") : TEXT("");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, fn, lose_info_str);
|
||||
int icon = dirty ? MB_ICONEXCLAMATION : MB_ICONQUESTION;
|
||||
return doActionOrNot(TEXT("Reload"), phrase, MB_YESNO | MB_APPLMODAL | icon);
|
||||
if (dirty)
|
||||
return _nativeLangSpeaker.messageBox("DoReloadOrNotAndLooseChange",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("\"$STR_REPLACE$\"\r\rThis file has been modified by another program.\rDo you want to reload it and lose the changes made in Notepad++?"),
|
||||
TEXT("Reload"),
|
||||
MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION,
|
||||
0, // not used
|
||||
fn);
|
||||
else
|
||||
return _nativeLangSpeaker.messageBox("DoReloadOrNot",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("\"$STR_REPLACE$\"\r\rThis file has been modified by another program.\rDo you want to reload it?"),
|
||||
TEXT("Reload"),
|
||||
MB_YESNO | MB_APPLMODAL | MB_ICONQUESTION,
|
||||
0, // not used
|
||||
fn);
|
||||
}
|
||||
|
||||
int Notepad_plus::doCloseOrNot(const TCHAR *fn)
|
||||
{
|
||||
TCHAR pattern[128] = TEXT("The file \"%s\" doesn't exist anymore.\rKeep this file in editor?");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, fn);
|
||||
return doActionOrNot(TEXT("Keep non existing file"), phrase, MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL);
|
||||
return _nativeLangSpeaker.messageBox("DoCloseOrNot",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("The file \"$STR_REPLACE$\" doesn't exist anymore.\rKeep this file in editor?"),
|
||||
TEXT("Keep non existing file"),
|
||||
MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL,
|
||||
0, // not used
|
||||
fn);
|
||||
}
|
||||
|
||||
int Notepad_plus::doDeleteOrNot(const TCHAR *fn)
|
||||
{
|
||||
TCHAR pattern[128] = TEXT("The file \"%s\"\rwill be moved to your Recycle Bin and this document will be closed.\rContinue?");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, fn);
|
||||
return doActionOrNot(TEXT("Delete file"), phrase, MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL);
|
||||
}
|
||||
|
||||
int Notepad_plus::doActionOrNot(const TCHAR *title, const TCHAR *displayText, int type)
|
||||
{
|
||||
return ::MessageBox(_pPublicInterface->getHSelf(), displayText, title, type);
|
||||
return _nativeLangSpeaker.messageBox("DoDeleteOrNot",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("The file \"$STR_REPLACE$\"\rwill be moved to your Recycle Bin and this document will be closed.\rContinue?"),
|
||||
TEXT("Delete file"),
|
||||
MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL,
|
||||
0, // not used
|
||||
fn);
|
||||
}
|
||||
|
||||
void Notepad_plus::enableMenu(int cmdID, bool doEnable) const
|
||||
@ -5873,7 +5887,12 @@ void Notepad_plus::launchDocMap()
|
||||
{
|
||||
if (!(NppParameters::getInstance())->isTransparentAvailable())
|
||||
{
|
||||
::MessageBox(NULL, TEXT("It seems you still use a prehistoric system, This feature works only on a modern system, sorry."), TEXT(""), MB_OK);
|
||||
_nativeLangSpeaker.messageBox("PrehistoricSystemDetected",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("It seems you still use a prehistoric system, This feature works only on a modern system, sorry."),
|
||||
TEXT("Prehistoric system detected"),
|
||||
MB_OK);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5961,10 +5980,6 @@ void Notepad_plus::launchFunctionList()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct TextPlayerParams
|
||||
{
|
||||
HWND _nppHandle;
|
||||
@ -5988,8 +6003,6 @@ struct Quote
|
||||
const char *_quote;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const int nbQuote = 203;
|
||||
Quote quotes[nbQuote] =
|
||||
{
|
||||
|
@ -693,6 +693,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
{
|
||||
if (lstrlen(fileStr) >= int(wParam))
|
||||
{
|
||||
// Not message for users so no translation
|
||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM error"), MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
@ -714,6 +715,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
{
|
||||
if (lstrlen(str) >= int(wParam)) //buffer too small
|
||||
{
|
||||
// Not message for users so no translation
|
||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETCURRENTWORD error"), MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
@ -770,6 +772,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
|
||||
if (lstrlen(str) >= int(wParam)) //buffer too small
|
||||
{
|
||||
// Not message for users so no translation
|
||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETFILENAMEATCURSOR error"), MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
@ -797,6 +800,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
{
|
||||
if (lstrlen(str) >= int(wParam))
|
||||
{
|
||||
// Not message for users so no translation
|
||||
::MessageBox(hwnd, TEXT("Allocated buffer size is not enough to copy the string."), TEXT("NPPM_GETNPPDIRECTORY error"), MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1984,7 +1984,11 @@ void Notepad_plus::command(int id)
|
||||
{
|
||||
if (curBuf->isDirty())
|
||||
{
|
||||
::MessageBox(_pPublicInterface->getHSelf(), TEXT("The document is dirty. Please save the modification before monitoring it."), TEXT("Monitoring problem"), MB_OK);
|
||||
_nativeLangSpeaker.messageBox("DocTooDirtyToMonitor",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("The document is dirty. Please save the modification before monitoring it."),
|
||||
TEXT("Monitoring problem"),
|
||||
MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2000,7 +2004,11 @@ void Notepad_plus::command(int id)
|
||||
}
|
||||
else
|
||||
{
|
||||
::MessageBox(_pPublicInterface->getHSelf(), TEXT("The file should exist to be monitored."), TEXT("Monitoring problem"), MB_OK);
|
||||
_nativeLangSpeaker.messageBox("DocNoExistToMonitor",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("The file should exist to be monitored."),
|
||||
TEXT("Monitoring problem"),
|
||||
MB_OK);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2076,7 +2084,7 @@ void Notepad_plus::command(int id)
|
||||
if (buf->isDirty())
|
||||
{
|
||||
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
||||
NULL,
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||
TEXT("Save Current Modification"),
|
||||
MB_YESNO);
|
||||
@ -2094,7 +2102,7 @@ void Notepad_plus::command(int id)
|
||||
{
|
||||
generic_string msg, title;
|
||||
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
||||
NULL,
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||
TEXT("Lose Undo Ability Waning"),
|
||||
MB_YESNO);
|
||||
@ -2191,7 +2199,7 @@ void Notepad_plus::command(int id)
|
||||
{
|
||||
generic_string warning, title;
|
||||
int answer = _nativeLangSpeaker.messageBox("SaveCurrentModifWarning",
|
||||
NULL,
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||
TEXT("Save Current Modification"),
|
||||
MB_YESNO);
|
||||
@ -2209,7 +2217,7 @@ void Notepad_plus::command(int id)
|
||||
{
|
||||
generic_string msg, title;
|
||||
int answer = _nativeLangSpeaker.messageBox("LoseUndoAbilityWarning",
|
||||
NULL,
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("You should save the current modification.\rAll the saved modifications can not be undone.\r\rContinue?"),
|
||||
TEXT("Lose Undo Ability Waning"),
|
||||
MB_YESNO);
|
||||
@ -2665,6 +2673,7 @@ void Notepad_plus::command(int id)
|
||||
|
||||
case IDM_CMDLINEARGUMENTS:
|
||||
{
|
||||
// No translattable
|
||||
::MessageBox(NULL, COMMAND_ARG_HELP, TEXT("Notepad++ Command Argument Help"), MB_OK);
|
||||
break;
|
||||
}
|
||||
@ -2694,7 +2703,12 @@ void Notepad_plus::command(int id)
|
||||
winVer ver = NppParameters::getInstance()->getWinVersion();
|
||||
if (ver <= WV_XP)
|
||||
{
|
||||
long res = ::MessageBox(NULL, TEXT("Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.\rDo you want to go to Notepad++ page to download the latest version?"), TEXT("Notepad++ Updater"), MB_YESNO);
|
||||
long res = _nativeLangSpeaker.messageBox("XpUpdaterProblem",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Notepad++ updater is not compatible with XP due to the obsolete security layer under XP.\rDo you want to go to Notepad++ page to download the latest version?"),
|
||||
TEXT("Notepad++ Updater"),
|
||||
MB_YESNO);
|
||||
|
||||
if (res == IDYES)
|
||||
{
|
||||
::ShellExecute(NULL, TEXT("open"), TEXT("https://notepad-plus-plus.org/download/"), NULL, NULL, SW_SHOWNORMAL);
|
||||
|
@ -50,13 +50,9 @@ DWORD WINAPI Notepad_plus::monitorFileOnChange(void * params)
|
||||
|
||||
//The folder to watch :
|
||||
WCHAR folderToMonitor[MAX_PATH];
|
||||
//::MessageBoxW(NULL, mfp->_fullFilePath, TEXT("PATH AFTER thread"), MB_OK);
|
||||
lstrcpy(folderToMonitor, fullFileName);
|
||||
//MessageBox(NULL, fullFileName, TEXT("fullFileName"), MB_OK);
|
||||
|
||||
::PathRemoveFileSpecW(folderToMonitor);
|
||||
|
||||
//MessageBox(NULL, folderToMonitor, TEXT("folderToMonitor"), MB_OK);
|
||||
|
||||
const DWORD dwNotificationFlags = FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_FILE_NAME;
|
||||
|
||||
@ -121,7 +117,6 @@ DWORD WINAPI Notepad_plus::monitorFileOnChange(void * params)
|
||||
// Just for sample purposes. The destructor will
|
||||
// call Terminate() automatically.
|
||||
changes.Terminate();
|
||||
//MessageBox(NULL, TEXT("FREEDOM !!!"), TEXT("out"), MB_OK);
|
||||
delete monitorInfo;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@ -181,8 +176,6 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
BufferID test = MainFileManager->getBufferFromName(fileName2Find.c_str());
|
||||
if (test != BUFFER_INVALID && !isSnapshotMode)
|
||||
{
|
||||
//switchToFile(test);
|
||||
//Dont switch, not responsibility of doOpen, but of caller
|
||||
if (_pTrayIco)
|
||||
{
|
||||
if (_pTrayIco->isInTray())
|
||||
@ -229,8 +222,15 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
bool isCreateFileSuccessful = false;
|
||||
if (PathFileExists(longFileDir.c_str()))
|
||||
{
|
||||
wsprintf(str2display, TEXT("%s doesn't exist. Create it?"), longFileName);
|
||||
if (::MessageBox(_pPublicInterface->getHSelf(), str2display, TEXT("Create new file"), MB_YESNO) == IDYES)
|
||||
int res = _nativeLangSpeaker.messageBox("CreateNewFileOrNot",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("\"$INT_REPLACE$\" doesn't exist. Create it?."),
|
||||
TEXT("Create new file"),
|
||||
MB_YESNO,
|
||||
0,
|
||||
longFileName);
|
||||
|
||||
if (res == IDYES)
|
||||
{
|
||||
bool res = MainFileManager->createEmptyFile(longFileName);
|
||||
if (res)
|
||||
@ -239,8 +239,13 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintf(str2display, TEXT("Cannot create the file \"%s\""), longFileName);
|
||||
::MessageBox(_pPublicInterface->getHSelf(), str2display, TEXT("Create new file"), MB_OK);
|
||||
_nativeLangSpeaker.messageBox("CreateNewFileError",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Cannot create the file \"$INT_REPLACE$\"."),
|
||||
TEXT("Create new file"),
|
||||
MB_OK,
|
||||
0,
|
||||
longFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -389,10 +394,14 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
}
|
||||
else
|
||||
{
|
||||
generic_string msg = TEXT("Can not open file \"");
|
||||
msg += longFileName;
|
||||
msg += TEXT("\".");
|
||||
::MessageBox(_pPublicInterface->getHSelf(), msg.c_str(), TEXT("ERROR"), MB_OK);
|
||||
_nativeLangSpeaker.messageBox("OpenFileError",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Can not open file \"$INT_REPLACE$\"."),
|
||||
TEXT("ERROR"),
|
||||
MB_OK,
|
||||
0,
|
||||
longFileName);
|
||||
|
||||
_isFileOpening = false;
|
||||
|
||||
scnN.nmhdr.code = NPPN_FILELOADFAILED;
|
||||
@ -900,10 +909,14 @@ bool Notepad_plus::fileCloseAll(bool doDeleteBackup, bool isSnapshotMode)
|
||||
if(!activateBuffer(id, SUB_VIEW))
|
||||
switchEditViewTo(MAIN_VIEW);
|
||||
|
||||
TCHAR pattern[140] = TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"%s\" ?");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, buf->getFullPathName());
|
||||
int res = doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
||||
int res = _nativeLangSpeaker.messageBox("NoBackupDoSaveFile",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"$STR_REPLACE$\" ?"),
|
||||
TEXT("Save"),
|
||||
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||
0, // not used
|
||||
buf->getFullPathName());
|
||||
|
||||
//int res = doSaveOrNot(buf->getFullPathName());
|
||||
if (res == IDYES)
|
||||
{
|
||||
@ -953,11 +966,14 @@ bool Notepad_plus::fileCloseAll(bool doDeleteBackup, bool isSnapshotMode)
|
||||
activateBuffer(id, SUB_VIEW);
|
||||
switchEditViewTo(SUB_VIEW);
|
||||
|
||||
TCHAR pattern[140] = TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"%s\" ?");
|
||||
TCHAR phrase[512];
|
||||
wsprintf(phrase, pattern, buf->getFullPathName());
|
||||
int res = doActionOrNot(TEXT("Save"), phrase, MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL);
|
||||
//int res = doSaveOrNot(buf->getFullPathName());
|
||||
int res = _nativeLangSpeaker.messageBox("NoBackupDoSaveFile",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("Your backup file cannot be found (deleted from outside).\rSave it otherwise your data will be lost\rDo you want to save file \"$STR_REPLACE$\" ?"),
|
||||
TEXT("Save"),
|
||||
MB_YESNOCANCEL | MB_ICONQUESTION | MB_APPLMODAL,
|
||||
0, // not used
|
||||
buf->getFullPathName());
|
||||
|
||||
if (res == IDYES)
|
||||
{
|
||||
if (!fileSave(id))
|
||||
@ -1250,11 +1266,15 @@ bool Notepad_plus::fileSave(BufferID id)
|
||||
|
||||
if (not ::CopyFile(fn, fn_bak.c_str(), FALSE))
|
||||
{
|
||||
generic_string msg = TEXT("The previous version of the file could not be saved into the backup directory at ");
|
||||
msg += TEXT("\"");
|
||||
msg += fn_bak;
|
||||
msg += TEXT("\".\r\rDo you want to save the current file anyways?");
|
||||
if (::MessageBox(_pPublicInterface->getHSelf(), msg.c_str(), TEXT("File Backup Failed"), MB_YESNO | MB_ICONERROR) == IDNO)
|
||||
int res = _nativeLangSpeaker.messageBox("FileBackupFailed",
|
||||
_pPublicInterface->getHSelf(),
|
||||
TEXT("The previous version of the file could not be saved into the backup directory at \"$INT_REPLACE$\".\r\rDo you want to save the current file anyways?"),
|
||||
TEXT("File Backup Failed"),
|
||||
MB_YESNO | MB_ICONERROR,
|
||||
0,
|
||||
fn_bak.c_str());
|
||||
|
||||
if (res == IDNO)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -509,146 +509,134 @@ static const ScintillaKeyDefinition scintKeyDefs[] =
|
||||
|
||||
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
|
||||
|
||||
int strVal(const TCHAR *str, int base)
|
||||
{
|
||||
if (!str) return -1;
|
||||
if (!str[0]) return 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int strVal(const TCHAR *str, int base)
|
||||
{
|
||||
if (!str) return -1;
|
||||
if (!str[0]) return 0;
|
||||
|
||||
TCHAR *finStr;
|
||||
int result = generic_strtol(str, &finStr, base);
|
||||
if (*finStr != '\0')
|
||||
return -1;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int decStrVal(const TCHAR *str)
|
||||
{
|
||||
return strVal(str, 10);
|
||||
}
|
||||
|
||||
int hexStrVal(const TCHAR *str)
|
||||
{
|
||||
return strVal(str, 16);
|
||||
}
|
||||
|
||||
int getKwClassFromName(const TCHAR *str)
|
||||
{
|
||||
if (!lstrcmp(TEXT("instre1"), str)) return LANG_INDEX_INSTR;
|
||||
if (!lstrcmp(TEXT("instre2"), str)) return LANG_INDEX_INSTR2;
|
||||
if (!lstrcmp(TEXT("type1"), str)) return LANG_INDEX_TYPE;
|
||||
if (!lstrcmp(TEXT("type2"), str)) return LANG_INDEX_TYPE2;
|
||||
if (!lstrcmp(TEXT("type3"), str)) return LANG_INDEX_TYPE3;
|
||||
if (!lstrcmp(TEXT("type4"), str)) return LANG_INDEX_TYPE4;
|
||||
if (!lstrcmp(TEXT("type5"), str)) return LANG_INDEX_TYPE5;
|
||||
|
||||
if ((str[1] == '\0') && (str[0] >= '0') && (str[0] <= '8')) // up to KEYWORDSET_MAX
|
||||
return str[0] - '0';
|
||||
|
||||
TCHAR *finStr;
|
||||
int result = generic_strtol(str, &finStr, base);
|
||||
if (*finStr != '\0')
|
||||
return -1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int decStrVal(const TCHAR *str)
|
||||
{
|
||||
return strVal(str, 10);
|
||||
}
|
||||
|
||||
int hexStrVal(const TCHAR *str)
|
||||
{
|
||||
return strVal(str, 16);
|
||||
}
|
||||
|
||||
int getKwClassFromName(const TCHAR *str)
|
||||
{
|
||||
if (!lstrcmp(TEXT("instre1"), str)) return LANG_INDEX_INSTR;
|
||||
if (!lstrcmp(TEXT("instre2"), str)) return LANG_INDEX_INSTR2;
|
||||
if (!lstrcmp(TEXT("type1"), str)) return LANG_INDEX_TYPE;
|
||||
if (!lstrcmp(TEXT("type2"), str)) return LANG_INDEX_TYPE2;
|
||||
if (!lstrcmp(TEXT("type3"), str)) return LANG_INDEX_TYPE3;
|
||||
if (!lstrcmp(TEXT("type4"), str)) return LANG_INDEX_TYPE4;
|
||||
if (!lstrcmp(TEXT("type5"), str)) return LANG_INDEX_TYPE5;
|
||||
|
||||
if ((str[1] == '\0') && (str[0] >= '0') && (str[0] <= '8')) // up to KEYWORDSET_MAX
|
||||
return str[0] - '0';
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
size_t getAsciiLenFromBase64Len(size_t base64StrLen)
|
||||
size_t getAsciiLenFromBase64Len(size_t base64StrLen)
|
||||
{
|
||||
return (base64StrLen % 4) ? 0 : (base64StrLen - base64StrLen / 4);
|
||||
}
|
||||
|
||||
|
||||
int base64ToAscii(char *dest, const char *base64Str)
|
||||
{
|
||||
static const int base64IndexArray[123] =
|
||||
{
|
||||
return (base64StrLen % 4) ? 0 : (base64StrLen - base64StrLen / 4);
|
||||
}
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55 ,56, 57, 58, 59,
|
||||
60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6,
|
||||
7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22,
|
||||
23, 24, 25, -1, -1, -1, -1 ,-1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32,
|
||||
33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48,
|
||||
49, 50, 51
|
||||
};
|
||||
|
||||
size_t b64StrLen = strlen(base64Str);
|
||||
size_t nbLoop = b64StrLen / 4;
|
||||
|
||||
int base64ToAscii(char *dest, const char *base64Str)
|
||||
size_t i = 0;
|
||||
int k = 0;
|
||||
|
||||
enum {b64_just, b64_1padded, b64_2padded} padd = b64_just;
|
||||
for ( ; i < nbLoop ; i++)
|
||||
{
|
||||
static const int base64IndexArray[123] =
|
||||
size_t j = i * 4;
|
||||
UCHAR uc0, uc1, uc2, uc3, p0, p1;
|
||||
|
||||
uc0 = (UCHAR)base64IndexArray[base64Str[j]];
|
||||
uc1 = (UCHAR)base64IndexArray[base64Str[j+1]];
|
||||
uc2 = (UCHAR)base64IndexArray[base64Str[j+2]];
|
||||
uc3 = (UCHAR)base64IndexArray[base64Str[j+3]];
|
||||
|
||||
if ((uc0 == -1) || (uc1 == -1) || (uc2 == -1) || (uc3 == -1))
|
||||
return -1;
|
||||
|
||||
if (base64Str[j+2] == '=') // && (uc3 == '=')
|
||||
{
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55 ,56, 57, 58, 59,
|
||||
60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6,
|
||||
7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22,
|
||||
23, 24, 25, -1, -1, -1, -1 ,-1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32,
|
||||
33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48,
|
||||
49, 50, 51
|
||||
};
|
||||
|
||||
size_t b64StrLen = strlen(base64Str);
|
||||
size_t nbLoop = b64StrLen / 4;
|
||||
|
||||
size_t i = 0;
|
||||
int k = 0;
|
||||
|
||||
enum {b64_just, b64_1padded, b64_2padded} padd = b64_just;
|
||||
for ( ; i < nbLoop ; i++)
|
||||
uc2 = uc3 = 0;
|
||||
padd = b64_2padded;
|
||||
}
|
||||
else if (base64Str[j+3] == '=')
|
||||
{
|
||||
size_t j = i * 4;
|
||||
UCHAR uc0, uc1, uc2, uc3, p0, p1;
|
||||
|
||||
uc0 = (UCHAR)base64IndexArray[base64Str[j]];
|
||||
uc1 = (UCHAR)base64IndexArray[base64Str[j+1]];
|
||||
uc2 = (UCHAR)base64IndexArray[base64Str[j+2]];
|
||||
uc3 = (UCHAR)base64IndexArray[base64Str[j+3]];
|
||||
|
||||
if ((uc0 == -1) || (uc1 == -1) || (uc2 == -1) || (uc3 == -1))
|
||||
return -1;
|
||||
|
||||
if (base64Str[j+2] == '=') // && (uc3 == '=')
|
||||
{
|
||||
uc2 = uc3 = 0;
|
||||
padd = b64_2padded;
|
||||
}
|
||||
else if (base64Str[j+3] == '=')
|
||||
{
|
||||
uc3 = 0;
|
||||
padd = b64_1padded;
|
||||
}
|
||||
|
||||
p0 = uc0 << 2;
|
||||
p1 = uc1 << 2;
|
||||
p1 >>= 6;
|
||||
dest[k++] = p0 | p1;
|
||||
|
||||
p0 = uc1 << 4;
|
||||
p1 = uc2 << 2;
|
||||
p1 >>= 4;
|
||||
dest[k++] = p0 | p1;
|
||||
|
||||
p0 = uc2 << 6;
|
||||
p1 = uc3;
|
||||
dest[k++] = p0 | p1;
|
||||
uc3 = 0;
|
||||
padd = b64_1padded;
|
||||
}
|
||||
|
||||
//dest[k] = '\0';
|
||||
if (padd == b64_1padded)
|
||||
// dest[k-1] = '\0';
|
||||
return k-1;
|
||||
else if (padd == b64_2padded)
|
||||
// dest[k-2] = '\0';
|
||||
return k-2;
|
||||
p0 = uc0 << 2;
|
||||
p1 = uc1 << 2;
|
||||
p1 >>= 6;
|
||||
dest[k++] = p0 | p1;
|
||||
|
||||
return k;
|
||||
p0 = uc1 << 4;
|
||||
p1 = uc2 << 2;
|
||||
p1 >>= 4;
|
||||
dest[k++] = p0 | p1;
|
||||
|
||||
p0 = uc2 << 6;
|
||||
p1 = uc3;
|
||||
dest[k++] = p0 | p1;
|
||||
}
|
||||
|
||||
//dest[k] = '\0';
|
||||
if (padd == b64_1padded)
|
||||
// dest[k-1] = '\0';
|
||||
return k-1;
|
||||
else if (padd == b64_2padded)
|
||||
// dest[k-2] = '\0';
|
||||
return k-2;
|
||||
|
||||
return k;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cutString(const TCHAR* str2cut, vector<generic_string>& patternVect)
|
||||
{
|
||||
if (str2cut == nullptr) return;
|
||||
@ -891,16 +879,25 @@ NppParameters::~NppParameters()
|
||||
}
|
||||
|
||||
|
||||
bool NppParameters::reloadStylers(TCHAR *stylePath)
|
||||
bool NppParameters::reloadStylers(TCHAR* stylePath)
|
||||
{
|
||||
if (_pXmlUserStylerDoc)
|
||||
delete _pXmlUserStylerDoc;
|
||||
|
||||
_pXmlUserStylerDoc = new TiXmlDocument(stylePath?stylePath:_stylerPath);
|
||||
const TCHAR* stylePathToLoad = stylePath != nullptr ? stylePath : _stylerPath.c_str();
|
||||
_pXmlUserStylerDoc = new TiXmlDocument(stylePathToLoad);
|
||||
|
||||
bool loadOkay = _pXmlUserStylerDoc->LoadFile();
|
||||
if (!loadOkay)
|
||||
{
|
||||
::MessageBox(NULL, TEXT("Load stylers.xml failed!"), stylePath, MB_OK);
|
||||
_pNativeLangSpeaker->messageBox("LoadStylersFailed",
|
||||
NULL,
|
||||
TEXT("Load \"$INT_REPLACE$\" failed!"),
|
||||
TEXT("Load stylers.xml failed"),
|
||||
MB_OK,
|
||||
0,
|
||||
stylePathToLoad);
|
||||
|
||||
delete _pXmlUserStylerDoc;
|
||||
_pXmlUserStylerDoc = NULL;
|
||||
return false;
|
||||
@ -1083,7 +1080,11 @@ bool NppParameters::load()
|
||||
|
||||
if (generic_stat(langs_xml_path.c_str(), &buf)==0)
|
||||
if (buf.st_size == 0)
|
||||
doRecover = ::MessageBox(NULL, TEXT("Load langs.xml failed!\rDo you want to recover your langs.xml?"), TEXT("Configurator"),MB_YESNO);
|
||||
doRecover = _pNativeLangSpeaker->messageBox("LoadLangsFailed",
|
||||
NULL,
|
||||
TEXT("Load langs.xml failed!\rDo you want to recover your langs.xml?"),
|
||||
TEXT("Configurator"),
|
||||
MB_YESNO);
|
||||
}
|
||||
else
|
||||
doRecover = true;
|
||||
@ -1101,7 +1102,12 @@ bool NppParameters::load()
|
||||
bool loadOkay = _pXmlDoc->LoadFile();
|
||||
if (!loadOkay)
|
||||
{
|
||||
::MessageBox(NULL, TEXT("Load langs.xml failed!"), TEXT("Configurator"),MB_OK);
|
||||
_pNativeLangSpeaker->messageBox("LoadLangsFailedFinal",
|
||||
NULL,
|
||||
TEXT("Load langs.xml failed!"),
|
||||
TEXT("Configurator"),
|
||||
MB_OK);
|
||||
|
||||
delete _pXmlDoc;
|
||||
_pXmlDoc = nullptr;
|
||||
isAllLaoded = false;
|
||||
@ -1157,7 +1163,14 @@ bool NppParameters::load()
|
||||
loadOkay = _pXmlUserStylerDoc->LoadFile();
|
||||
if (!loadOkay)
|
||||
{
|
||||
::MessageBox(NULL, TEXT("Load stylers.xml failed!"), _stylerPath.c_str(), MB_OK);
|
||||
_pNativeLangSpeaker->messageBox("LoadStylersFailed",
|
||||
NULL,
|
||||
TEXT("Load \"$INT_REPLACE$\" failed!"),
|
||||
TEXT("Load stylers.xml failed"),
|
||||
MB_OK,
|
||||
0,
|
||||
_stylerPath.c_str());
|
||||
|
||||
delete _pXmlUserStylerDoc;
|
||||
_pXmlUserStylerDoc = NULL;
|
||||
isAllLaoded = false;
|
||||
|
@ -1337,14 +1337,13 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, char* data,
|
||||
// As a 32bit application, we cannot allocate 2 buffer of more than INT_MAX size (it takes the whole address space)
|
||||
if (bufferSizeRequested > INT_MAX)
|
||||
{
|
||||
::MessageBox(NULL, TEXT("File is too big to be opened by Notepad++"), TEXT("File size problem"), MB_OK|MB_APPLMODAL);
|
||||
/*
|
||||
_nativeLangSpeaker.messageBox("NbFileToOpenImportantWarning",
|
||||
_pPublicInterface->getHSelf(),
|
||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
|
||||
pNativeSpeaker->messageBox("FileTooBigToOpene",
|
||||
NULL,
|
||||
TEXT("File is too big to be opened by Notepad++"),
|
||||
TEXT("File open problem"),
|
||||
TEXT("File size problem"),
|
||||
MB_OK|MB_APPLMODAL);
|
||||
*/
|
||||
|
||||
fclose(fp);
|
||||
return false;
|
||||
}
|
||||
@ -1459,7 +1458,12 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, char* data,
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER) //TODO: should filter correctly for other exceptions; the old filter(GetExceptionCode(), GetExceptionInformation()) was only catching access violations
|
||||
{
|
||||
::MessageBox(NULL, TEXT("File is too big to be opened by Notepad++"), TEXT("File open problem"), MB_OK|MB_APPLMODAL);
|
||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker();
|
||||
pNativeSpeaker->messageBox("FileTooBigToOpene",
|
||||
NULL,
|
||||
TEXT("File is too big to be opened by Notepad++"),
|
||||
TEXT("File size problem"),
|
||||
MB_OK | MB_APPLMODAL);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
@ -815,7 +815,7 @@ INT_PTR CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
SendMessage(_shiftTrickUpTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((15000), (0)));
|
||||
}
|
||||
|
||||
generic_string checkboxTip = pNativeSpeaker->getLocalizedStrFromID("1-to-2-buttons-tip");
|
||||
generic_string checkboxTip = pNativeSpeaker->getLocalizedStrFromID("two-find-buttons-tip");
|
||||
if (checkboxTip.empty())
|
||||
checkboxTip = TEXT("2 find buttons mode");
|
||||
|
||||
|
@ -149,8 +149,6 @@ size_t Printer::doPrint(bool justDoIt)
|
||||
const TCHAR *fontFace = (nppGUI._printSettings._headerFontName != TEXT(""))?nppGUI._printSettings._headerFontName.c_str():TEXT("Arial");
|
||||
|
||||
int headerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
||||
//TCHAR toto[10];
|
||||
//::MessageBox(NULL, itoa(nppGUI._printSettings._headerFontStyle, toto, 10), TEXT("header"), MB_OK);
|
||||
|
||||
HFONT fontHeader = ::CreateFont(headerLineHeight,
|
||||
0, 0, 0,
|
||||
@ -169,7 +167,6 @@ size_t Printer::doPrint(bool justDoIt)
|
||||
fontWeight = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_BOLD?FW_BOLD:FW_NORMAL);
|
||||
isFontItalic = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_ITALIC?TRUE:FALSE);
|
||||
fontFace = (nppGUI._printSettings._footerFontName != TEXT(""))?nppGUI._printSettings._footerFontName.c_str():TEXT("Arial");
|
||||
//::MessageBox(NULL, itoa(nppGUI._printSettings._footerFontStyle, , 10), TEXT("footer"), MB_OK);
|
||||
|
||||
int footerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
|
||||
HFONT fontFooter = ::CreateFont(footerLineHeight,
|
||||
|
@ -859,7 +859,6 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct)
|
||||
if (nTab < 0)
|
||||
{
|
||||
::MessageBox(NULL, TEXT("nTab < 0"), TEXT(""), MB_OK);
|
||||
//return ::CallWindowProc(_tabBarDefaultProc, hwnd, Message, wParam, lParam);
|
||||
}
|
||||
bool isSelected = (nTab == ::SendMessage(_hSelf, TCM_GETCURSEL, 0, 0));
|
||||
|
||||
|
@ -1100,44 +1100,6 @@ generic_string NativeLangSpeaker::getProjectPanelLangMenuStr(const char * nodeNa
|
||||
}
|
||||
return defaultStr;
|
||||
}
|
||||
/*
|
||||
generic_string NativeLangSpeaker::getFileBrowserLangMenuStr(const char * nodeName, int cmdID, const TCHAR *defaultStr) const
|
||||
{
|
||||
if (!_nativeLangA) return defaultStr;
|
||||
|
||||
TiXmlNodeA *targetNode = _nativeLangA->FirstChild("FileBrowser");
|
||||
if (!targetNode) return defaultStr;
|
||||
|
||||
targetNode = targetNode->FirstChild("Menus");
|
||||
if (!targetNode) return defaultStr;
|
||||
|
||||
targetNode = targetNode->FirstChild(nodeName);
|
||||
if (!targetNode) return defaultStr;
|
||||
|
||||
const char *name = NULL;
|
||||
for (TiXmlNodeA *childNode = targetNode->FirstChildElement("Item");
|
||||
childNode;
|
||||
childNode = childNode->NextSibling("Item"))
|
||||
{
|
||||
TiXmlElementA *element = childNode->ToElement();
|
||||
int id;
|
||||
const char *idStr = element->Attribute("id", &id);
|
||||
|
||||
if (idStr && id == cmdID)
|
||||
{
|
||||
name = element->Attribute("name");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user