1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-01-19 01:04:08 +01:00

L10N: Localized Setup

This commit is contained in:
Amrsatrio 2023-11-12 11:49:59 +07:00
parent fc17455962
commit 163b45228a
8 changed files with 47 additions and 41 deletions

3
.gitmodules vendored
View File

@ -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

View File

@ -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);

View File

@ -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)
{

View File

@ -159,14 +159,16 @@
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ep_setup.rc">
<ResourceCompile Include="resources\ep_setup.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="ep_setup_debug.rc">
<ResourceCompile Include="resources\ep_setup_debug.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="resources\lang\ep_setup.*.rc" />
<ResourceCompile Include="..\ExplorerPatcher-L10N\resources\lang\ep_setup.*.rc" Condition="Exists('..\ExplorerPatcher-L10N\resources\lang')" />
</ItemGroup>
<ItemGroup>
<None Include="..\build\Debug\ep_dwm.exe">

View File

@ -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
//

View File

@ -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