diff --git a/.gitmodules b/.gitmodules
index 09c73f9..d5db00a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,3 +13,6 @@
[submodule "ep_dwm"]
path = ep_dwm
url = https://github.com/valinet/ep_dwm
+[submodule "ExplorerPatcher-L10N"]
+ path = ExplorerPatcher-L10N
+ url = https://github.com/valinet/ExplorerPatcher-L10N
diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c
index 8d5df65..47cf8b6 100644
--- a/ep_gui/GUI.c
+++ b/ep_gui/GUI.c
@@ -1913,7 +1913,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
GUI_Build(0, hwnd, pt);
fclose(AuditFile);
AuditFile = NULL;
- wchar_t mbText[128];
+ wchar_t mbText[256];
mbText[0] = 0;
LoadStringW(hModule, IDS_ABOUT_EXPORT_SUCCESS, mbText, ARRAYSIZE(mbText));
MessageBoxW(hwnd, mbText, GUI_title, MB_ICONINFORMATION);
diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c
index 947e80b..65bdfee 100644
--- a/ep_setup/ep_setup.c
+++ b/ep_setup/ep_setup.c
@@ -546,12 +546,10 @@ int WINAPI wWinMain(
bIsUpdate = (argc >= 1 && !_wcsicmp(wargv[0], L"/update_silent"));
if (!bInstall && (!_wcsicmp(wargv[0], L"/uninstall") || bForcePromptForUninstall))
{
- if (MessageBoxW(
- NULL,
- L"Are you sure you want to remove " _T(PRODUCT_NAME) L" from your computer?",
- _T(PRODUCT_NAME),
- MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION
- ) == IDNO)
+ wchar_t mbText[256];
+ mbText[0] = 0;
+ LoadStringW(hInstance, IDS_SETUP_UNINSTALL_PROMPT, mbText, ARRAYSIZE(mbText));
+ if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION) == IDNO)
{
exit(0);
}
@@ -581,13 +579,10 @@ int WINAPI wWinMain(
RegGetValueW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell\\Update\\Packages", L"UndockingDisabled", RRF_RT_DWORD, NULL, &bIsUndockingDisabled, &dwSize);
if (bIsUndockingDisabled)
{
- if (MessageBoxW(
- NULL,
- bInstall ? L"In order to install, you will be automatically signed out of Windows. The software will be ready for use when you sign back in.\n\nDo you want to continue?"
- : L"To complete the uninstallation, you will be automatically signed out of Windows.\n\nDo you want to continue?",
- _T(PRODUCT_NAME),
- MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION
- ) == IDYES)
+ wchar_t mbText[256];
+ mbText[0] = 0;
+ LoadStringW(hInstance, bInstall ? IDS_SETUP_INSTALL_LOGOFF : IDS_SETUP_UNINSTALL_LOGOFF, mbText, ARRAYSIZE(mbText));
+ if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) == IDYES)
{
RegDeleteKeyValueW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell\\Update\\Packages", L"UndockingDisabled");
}
@@ -1179,26 +1174,20 @@ int WINAPI wWinMain(
{
if (!bInstall)
{
+ wchar_t mbText[256];
+ mbText[0] = 0;
if (bWasShellExt)
{
- if (MessageBoxW(
- NULL,
- L"Please reboot the computer to complete the uninstall.\n\nDo you want to reboot now?",
- _T(PRODUCT_NAME),
- MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION
- ) == IDYES)
+ LoadStringW(hInstance, IDS_SETUP_UNINSTALL_RESTART, mbText, ARRAYSIZE(mbText));
+ if (MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) == IDYES)
{
SystemShutdown(TRUE);
}
}
else
{
- MessageBoxW(
- NULL,
- L"Uninstall completed. Thank you for using " _T(PRODUCT_NAME) L".",
- _T(PRODUCT_NAME),
- MB_ICONASTERISK | MB_OK | MB_DEFBUTTON1
- );
+ LoadStringW(hInstance, IDS_SETUP_UNINSTALL_FINISH, mbText, ARRAYSIZE(mbText));
+ MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_ICONASTERISK | MB_OK | MB_DEFBUTTON1);
}
}
else
@@ -1242,19 +1231,10 @@ int WINAPI wWinMain(
}
if (!bOk) // && !(argc >= 1 && !_wcsicmp(wargv[0], L"/update_silent"))
{
- MessageBoxW(
- NULL,
- L"An error has occurred while servicing this product.\n"
- L"This is most likely caused by one or more of the backup files from a previous update still being in use. "
- L"Unlocking the files should fix this issue.\n\n"
- L"Troubleshooting steps:\n"
- L"* Close and reopen the \"Properties\" dialog if it is currently open.\n"
- L"* Kill and restart all \"explorer.exe\" processes.\n"
- L"* If you have registered this application as a shell extension, then restarting the computer will probably fix this.\n"
- L"* Lastly, reboot the computer and try again.",
- _T(PRODUCT_NAME),
- MB_ICONERROR | MB_OK | MB_DEFBUTTON1
- );
+ wchar_t mbText[1024];
+ mbText[0] = 0;
+ LoadStringW(hInstance, IDS_SETUP_FAILED, mbText, ARRAYSIZE(mbText));
+ MessageBoxW(NULL, mbText, _T(PRODUCT_NAME), MB_ICONERROR | MB_OK | MB_DEFBUTTON1);
}
if (bOk && bIsUndockingDisabled)
{
diff --git a/ep_setup/ep_setup.vcxproj b/ep_setup/ep_setup.vcxproj
index 24fcaac..85237a6 100644
--- a/ep_setup/ep_setup.vcxproj
+++ b/ep_setup/ep_setup.vcxproj
@@ -159,14 +159,16 @@
-
+
true
true
-
+
true
true
+
+
diff --git a/ep_setup/resource.h b/ep_setup/resource.h
index 75fe28b..ab86dba 100644
--- a/ep_setup/resource.h
+++ b/ep_setup/resource.h
@@ -11,6 +11,13 @@
#define IDR_EP_STARTMENU 108
#define IDR_EP_GUI 109
+#define IDS_SETUP_UNINSTALL_PROMPT 301
+#define IDS_SETUP_INSTALL_LOGOFF 302
+#define IDS_SETUP_UNINSTALL_LOGOFF 303
+#define IDS_SETUP_UNINSTALL_RESTART 304
+#define IDS_SETUP_UNINSTALL_FINISH 305
+#define IDS_SETUP_FAILED 306
+
// Next default values for new objects
//
diff --git a/ep_setup/resources/ep_setup.en-US.rc b/ep_setup/resources/ep_setup.en-US.rc
new file mode 100644
index 0000000..8a585f1
--- /dev/null
+++ b/ep_setup/resources/ep_setup.en-US.rc
@@ -0,0 +1,14 @@
+#include "resource.h"
+#include "winres.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+STRINGTABLE
+BEGIN
+ IDS_SETUP_UNINSTALL_PROMPT "Are you sure you want to remove ExplorerPatcher from your PC?"
+ IDS_SETUP_INSTALL_LOGOFF "In order to install, you will be automatically signed out of Windows. ExplorerPatcher will be ready for use when you sign back in.\n\nDo you want to continue?"
+ IDS_SETUP_UNINSTALL_LOGOFF "To complete the uninstallation, you will be automatically signed out of Windows.\n\nDo you want to continue?"
+ IDS_SETUP_UNINSTALL_RESTART "Please reboot the PC to complete the uninstall.\n\nDo you want to reboot now?"
+ IDS_SETUP_UNINSTALL_FINISH "Uninstall completed. Thank you for using ExplorerPatcher."
+ IDS_SETUP_FAILED "An error has occurred while servicing ExplorerPatcher.\nThis is most likely caused by one or more of the backup files from a previous update still being in use. Unlocking the files should fix this issue.\n\nTroubleshooting steps:\n• Close and reopen the ""Properties"" dialog if it is currently open.\n• Kill and restart all ""explorer.exe"" processes.\n• If you have registered ExplorerPatcher as a shell extension, then restarting the PC will probably fix this.\n• Lastly, reboot the PC and try again.",
+END
diff --git a/ep_setup/ep_setup.rc b/ep_setup/resources/ep_setup.rc
similarity index 100%
rename from ep_setup/ep_setup.rc
rename to ep_setup/resources/ep_setup.rc
diff --git a/ep_setup/ep_setup_debug.rc b/ep_setup/resources/ep_setup_debug.rc
similarity index 100%
rename from ep_setup/ep_setup_debug.rc
rename to ep_setup/resources/ep_setup_debug.rc