mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-21 21:04:54 +02:00
Make theme warning message translatable (switching unsaved theme to another)
Fix report from comment: #8972 (comment). Close #13112
This commit is contained in:
parent
f7fcab4c21
commit
0c704fd66b
@ -1418,6 +1418,8 @@ Continue?"/>
|
|||||||
<ChangeHistoryEnabledWarning title="Notepad++ need to be relaunched" message="You have to restart Notepad++ to enable Change History."/> <!-- HowToReproduce: uncheck "Display Change History" via Preferences dialog "Marges/Border/Edge. -->
|
<ChangeHistoryEnabledWarning title="Notepad++ need to be relaunched" message="You have to restart Notepad++ to enable Change History."/> <!-- HowToReproduce: uncheck "Display Change History" via Preferences dialog "Marges/Border/Edge. -->
|
||||||
<WindowsSessionExit title="Notepad++ - Windows session exit" message="Windows session is about to be terminated but you have some data unsaved. Do you want to exit Notepad++ now?"/>
|
<WindowsSessionExit title="Notepad++ - Windows session exit" message="Windows session is about to be terminated but you have some data unsaved. Do you want to exit Notepad++ now?"/>
|
||||||
<LanguageMenuCompactWarning title="Compact Language Menu" message="This option will be changed on the next launch."/> <!-- HowToReproduce: toggle "Make language menu compact" via Preferences dialog "Language/Language Menu. -->
|
<LanguageMenuCompactWarning title="Compact Language Menu" message="This option will be changed on the next launch."/> <!-- HowToReproduce: toggle "Make language menu compact" via Preferences dialog "Language/Language Menu. -->
|
||||||
|
<SwitchUnsavedThemeWarning title="$STR_REPLACE$" message="Unsaved changes are about to be discarded!
|
||||||
|
Do you want to save your changes before switching themes?"/> <!-- HowToReproduce: In the Style Configurator dialog change some theme and switch to other theme without saving. -->
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
<ClipboardHistory>
|
<ClipboardHistory>
|
||||||
<PanelTitle name="Clipboard History"/>
|
<PanelTitle name="Clipboard History"/>
|
||||||
|
@ -1247,6 +1247,8 @@ Continue?"/>
|
|||||||
<ChangeHistoryEnabledWarning title="Notepad++ need to be relaunched" message="You have to restart Notepad++ to enable Change History."/> <!-- HowToReproduce: uncheck "Display Change History" via Preferences dialog "Marges/Border/Edge. -->
|
<ChangeHistoryEnabledWarning title="Notepad++ need to be relaunched" message="You have to restart Notepad++ to enable Change History."/> <!-- HowToReproduce: uncheck "Display Change History" via Preferences dialog "Marges/Border/Edge. -->
|
||||||
<WindowsSessionExit title="Notepad++ - Windows session exit" message="Windows session is about to be terminated but you have some data unsaved. Do you want to exit Notepad++ now?"/>
|
<WindowsSessionExit title="Notepad++ - Windows session exit" message="Windows session is about to be terminated but you have some data unsaved. Do you want to exit Notepad++ now?"/>
|
||||||
<LanguageMenuCompactWarning title="Compact Language Menu" message="This option will be changed on the next launch."/> <!-- HowToReproduce: toggle "Make language menu compact" via Preferences dialog "Language/Language Menu. -->
|
<LanguageMenuCompactWarning title="Compact Language Menu" message="This option will be changed on the next launch."/> <!-- HowToReproduce: toggle "Make language menu compact" via Preferences dialog "Language/Language Menu. -->
|
||||||
|
<SwitchUnsavedThemeWarning title="$STR_REPLACE$" message="Unsaved changes are about to be discarded!
|
||||||
|
Do you want to save your changes before switching themes?"/> <!-- HowToReproduce: In the Style Configurator dialog change some theme and switch to other theme without saving. -->
|
||||||
</MessageBox>
|
</MessageBox>
|
||||||
<ClipboardHistory>
|
<ClipboardHistory>
|
||||||
<PanelTitle name="Clipboard History"/>
|
<PanelTitle name="Clipboard History"/>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "documentMap.h"
|
#include "documentMap.h"
|
||||||
#include "AutoCompletion.h"
|
#include "AutoCompletion.h"
|
||||||
#include "preference_rc.h"
|
#include "preference_rc.h"
|
||||||
|
#include "localization.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -798,12 +799,14 @@ void WordStyleDlg::switchToTheme()
|
|||||||
wcscpy_s(themeFileName, prevThemeName.c_str());
|
wcscpy_s(themeFileName, prevThemeName.c_str());
|
||||||
PathStripPath(themeFileName);
|
PathStripPath(themeFileName);
|
||||||
PathRemoveExtension(themeFileName);
|
PathRemoveExtension(themeFileName);
|
||||||
int mb_response =
|
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
|
||||||
::MessageBox( _hSelf,
|
int mb_response = pNativeSpeaker->messageBox("SwitchUnsavedThemeWarning",
|
||||||
TEXT(" Unsaved changes are about to be discarded!\n")
|
_hSelf,
|
||||||
TEXT(" Do you want to save your changes before switching themes?"),
|
TEXT("Unsaved changes are about to be discarded!\nDo you want to save your changes before switching themes?"),
|
||||||
themeFileName,
|
TEXT("$STR_REPLACE$"),
|
||||||
MB_ICONWARNING | MB_YESNO | MB_APPLMODAL | MB_SETFOREGROUND );
|
MB_ICONWARNING | MB_YESNO | MB_APPLMODAL | MB_SETFOREGROUND,
|
||||||
|
0,
|
||||||
|
themeFileName);
|
||||||
if ( mb_response == IDYES )
|
if ( mb_response == IDYES )
|
||||||
(NppParameters::getInstance()).writeStyles(_lsArray, _globalStyles);
|
(NppParameters::getInstance()).writeStyles(_lsArray, _globalStyles);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user