Browse Source

L10N: Localized remaining user-facing texts in GUI and Updates

pull/2488/head
Amrsatrio 2 years ago
parent
commit
fc17455962
  1. 19
      ExplorerPatcher/updates.c
  2. 29
      ep_gui/GUI.c
  3. 7
      ep_gui/resources/EPSettingsResources.h
  4. 1
      ep_gui/resources/EPSharedResources.h
  5. 6
      ep_gui/resources/lang/ep_gui.en-US.rc
  6. 2
      ep_gui/resources/settings.reg
  7. 2
      ep_gui/resources/settings10.reg

19
ExplorerPatcher/updates.c

@ -520,7 +520,7 @@ BOOL IsUpdateAvailableHelper(
} }
CloseHandle(hMyToken); CloseHandle(hMyToken);
} }
int lnSID = (wszSID ? wcslen(wszSID) : 0); size_t lnSID = (wszSID ? wcslen(wszSID) : 0);
DWORD bIsBuiltInAdministratorInApprovalMode = FALSE; DWORD bIsBuiltInAdministratorInApprovalMode = FALSE;
BOOL bIsBuiltInAdministratorAccount = BOOL bIsBuiltInAdministratorAccount =
IsUserAnAdmin() && IsUserAnAdmin() &&
@ -545,7 +545,16 @@ BOOL IsUpdateAvailableHelper(
); );
WCHAR wszMsg[500]; WCHAR wszMsg[500];
swprintf_s(wszMsg, 500, L"Would you like to install an update for " _T(PRODUCT_NAME) L"?\n\nDownloaded from:\n%s", wszURL2); wszMsg[0] = 0;
WCHAR wszMsgFormat[500];
HMODULE hEPGui = LoadGuiModule();
if (LoadStringW(hEPGui, IDS_UPDATES_PROMPT, wszMsgFormat, ARRAYSIZE(wszMsgFormat)))
{
swprintf_s(wszMsg, ARRAYSIZE(wszMsg), wszMsgFormat, wszURL2);
}
FreeLibrary(hEPGui);
if (MessageBoxW( if (MessageBoxW(
FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL), FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL),
wszMsg, wszMsg,
@ -576,7 +585,7 @@ BOOL IsUpdateAvailableHelper(
{ {
bIsUpdateAvailable = TRUE; bIsUpdateAvailable = TRUE;
#ifdef UPDATES_VERBOSE_OUTPUT #ifdef UPDATES_VERBOSE_OUTPUT
printf("[Updates] Update successful, File Explorer will probably restart momentarly.\n"); printf("[Updates] Update successful, File Explorer will probably restart momentarily.\n");
#endif #endif
} }
else else
@ -1073,8 +1082,8 @@ BOOL InstallUpdatesIfAvailable(
swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body); swprintf_s(buf, TOAST_BUFSIZ, text, _T(UPDATES_RELEASE_INFO_URL), L"short", title, body);
String2IXMLDocument( String2IXMLDocument(
text, buf,
wcslen(text), wcslen(buf),
&inputXml, &inputXml,
NULL NULL
); );

29
ep_gui/GUI.c

@ -1913,7 +1913,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
GUI_Build(0, hwnd, pt); GUI_Build(0, hwnd, pt);
fclose(AuditFile); fclose(AuditFile);
AuditFile = NULL; AuditFile = NULL;
MessageBoxW(hwnd, L"Settings have been exported successfully.", GUI_title, MB_ICONINFORMATION); wchar_t mbText[128];
mbText[0] = 0;
LoadStringW(hModule, IDS_ABOUT_EXPORT_SUCCESS, mbText, ARRAYSIZE(mbText));
MessageBoxW(hwnd, mbText, GUI_title, MB_ICONINFORMATION);
} }
} }
} }
@ -2114,14 +2117,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
} }
else if (!strncmp(line + 1, "clear_data_weather", 18)) else if (!strncmp(line + 1, "clear_data_weather", 18))
{ {
if (MessageBoxW( wchar_t mbText[512];
hwnd, mbText[0] = 0;
L"Are you sure you want to permanently clear the weather widget's local data?\n\n" LoadStringW(hModule, IDS_WEATHER_CLEAR_PROMPT, mbText, ARRAYSIZE(mbText));
L"This will reset the internal components to their default state, but will preserve " if (MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONQUESTION | MB_YESNO) == IDYES)
L"your preferences. This may fix the widget not loading the data properly, or "
L"having layout issues etc.",
_T(PRODUCT_NAME),
MB_ICONQUESTION | MB_YESNO) == IDYES)
{ {
DWORD dwData = 0, dwVal = 0, dwSize = sizeof(DWORD); DWORD dwData = 0, dwVal = 0, dwSize = sizeof(DWORD);
GUI_Internal_RegQueryValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_PeopleBand", NULL, NULL, &dwData, &dwSize); GUI_Internal_RegQueryValueExW(NULL, L"Virtualized_" _T(EP_CLSID) L"_PeopleBand", NULL, NULL, &dwData, &dwSize);
@ -2133,7 +2132,9 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
PleaseWaitCallbackData = &res; PleaseWaitCallbackData = &res;
PleaseWaitCallbackFunc = GUI_Internal_DeleteWeatherFolder; PleaseWaitCallbackFunc = GUI_Internal_DeleteWeatherFolder;
PleaseWaitHook = SetWindowsHookExW(WH_CALLWNDPROC, PleaseWait_HookProc, NULL, GetCurrentThreadId()); PleaseWaitHook = SetWindowsHookExW(WH_CALLWNDPROC, PleaseWait_HookProc, NULL, GetCurrentThreadId());
MessageBoxW(hwnd, L"Please wait...", _T(PRODUCT_NAME), 0); mbText[0] = 0;
LoadStringW(hModule, IDS_WEATHER_CLEAR_WAIT, mbText, ARRAYSIZE(mbText));
MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), 0);
} }
else else
{ {
@ -2141,13 +2142,17 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
} }
if (res == IDOK) if (res == IDOK)
{ {
MessageBoxW(hwnd, L"Weather widget data cleared successfully.", _T(PRODUCT_NAME), MB_ICONINFORMATION); mbText[0] = 0;
LoadStringW(hModule, IDS_WEATHER_CLEAR_SUCCESS, mbText, ARRAYSIZE(mbText));
MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONINFORMATION);
} }
else else
{ {
if (res == IDABORT) if (res == IDABORT)
{ {
MessageBoxW(hwnd, L"An error has occured while clearing the data.", _T(PRODUCT_NAME), MB_ICONERROR); mbText[0] = 0;
LoadStringW(hModule, IDS_WEATHER_CLEAR_FAILED, mbText, ARRAYSIZE(mbText));
MessageBoxW(hwnd, mbText, _T(PRODUCT_NAME), MB_ICONERROR);
} }
} }
if (dwData) if (dwData)

7
ep_gui/resources/EPSettingsResources.h

@ -270,6 +270,10 @@
#define IDS_WEATHER_LASTUPDATE 1553 #define IDS_WEATHER_LASTUPDATE 1553
#define IDS_WEATHER_UPDATE 1554 #define IDS_WEATHER_UPDATE 1554
#define IDS_WEATHER_CLEAR 1555 #define IDS_WEATHER_CLEAR 1555
#define IDS_WEATHER_CLEAR_PROMPT 1556
#define IDS_WEATHER_CLEAR_WAIT 1557
#define IDS_WEATHER_CLEAR_SUCCESS 1558
#define IDS_WEATHER_CLEAR_FAILED 1559
#define IDS_SP 1601 #define IDS_SP 1601
#define IDS_SP_HIDEICON 1602 #define IDS_SP_HIDEICON 1602
@ -379,6 +383,7 @@
#define IDS_ABOUT_SETTINGS 2011 #define IDS_ABOUT_SETTINGS 2011
#define IDS_ABOUT_IMPORT 2012 #define IDS_ABOUT_IMPORT 2012
#define IDS_ABOUT_EXPORT 2013 #define IDS_ABOUT_EXPORT 2013
#define IDS_ABOUT_RESET 2014 #define IDS_ABOUT_EXPORT_SUCCESS 2014
#define IDS_ABOUT_RESET 2015
#define IDS_FOOTER_RESTART 2101 #define IDS_FOOTER_RESTART 2101

1
ep_gui/resources/EPSharedResources.h

@ -15,6 +15,7 @@
#define IDS_UPDATES_DLFAILED_T 311 #define IDS_UPDATES_DLFAILED_T 311
#define IDS_UPDATES_DLFAILED_B 312 #define IDS_UPDATES_DLFAILED_B 312
#define IDS_UPDATES_INSTALLEDVER 313 #define IDS_UPDATES_INSTALLEDVER 313
#define IDS_UPDATES_PROMPT 314
// 351-400 // 351-400

6
ep_gui/resources/lang/ep_gui.en-US.rc

@ -18,6 +18,7 @@ BEGIN
IDS_UPDATES_DLFAILED_T "Update failed" IDS_UPDATES_DLFAILED_T "Update failed"
IDS_UPDATES_DLFAILED_B "The request was declined or an error has occured when attempting to install this update." IDS_UPDATES_DLFAILED_B "The request was declined or an error has occured when attempting to install this update."
IDS_UPDATES_INSTALLEDVER "Installed version: %d.%d.%d.%d" IDS_UPDATES_INSTALLEDVER "Installed version: %d.%d.%d.%d"
IDS_UPDATES_PROMPT "Would you like to install an update for ExplorerPatcher?\n\nDownloaded from:\n%s"
IDS_SYM_DL_T "Downloading symbols for OS build %s, please wait…" IDS_SYM_DL_T "Downloading symbols for OS build %s, please wait…"
IDS_SYM_DL_B "This may take several minutes. For now, ExplorerPatcher may have limited and/or broken functionality. Click here to learn more about symbols." IDS_SYM_DL_B "This may take several minutes. For now, ExplorerPatcher may have limited and/or broken functionality. Click here to learn more about symbols."
@ -308,6 +309,10 @@ BEGIN
IDS_WEATHER_LASTUPDATE "Last updated on: %s, %s." IDS_WEATHER_LASTUPDATE "Last updated on: %s, %s."
IDS_WEATHER_UPDATE "Update weather now" IDS_WEATHER_UPDATE "Update weather now"
IDS_WEATHER_CLEAR "Clear weather widget local data" IDS_WEATHER_CLEAR "Clear weather widget local data"
IDS_WEATHER_CLEAR_PROMPT "Are you sure you want to permanently clear the weather widget's local data?\n\nThis will reset the internal components to their default state, but will preserve your preferences. This may fix the widget not loading the data properly, or having layout issues etc."
IDS_WEATHER_CLEAR_WAIT "Please wait…"
IDS_WEATHER_CLEAR_SUCCESS "Weather widget data cleared successfully."
IDS_WEATHER_CLEAR_FAILED "An error has occured while clearing the data."
IDS_SP "Spotlight" IDS_SP "Spotlight"
@ -422,6 +427,7 @@ BEGIN
IDS_ABOUT_SETTINGS "Learn more managing these settings" IDS_ABOUT_SETTINGS "Learn more managing these settings"
IDS_ABOUT_IMPORT "Import settings" IDS_ABOUT_IMPORT "Import settings"
IDS_ABOUT_EXPORT "Export current settings" IDS_ABOUT_EXPORT "Export current settings"
IDS_ABOUT_EXPORT_SUCCESS "Settings have been exported successfully."
IDS_ABOUT_RESET "Restore default settings" IDS_ABOUT_RESET "Restore default settings"
IDS_FOOTER_RESTART "Restart File Explorer" IDS_FOOTER_RESTART "Restart File Explorer"

2
ep_gui/resources/settings.reg

@ -772,7 +772,7 @@
;import ;import
;u %R:2013% ;u %R:2013%
;export ;export
;u %R:2014% ;u %R:2015%
;reset ;reset

2
ep_gui/resources/settings10.reg

@ -593,7 +593,7 @@
;import ;import
;u %R:2013% ;u %R:2013%
;export ;export
;u %R:2014% ;u %R:2015%
;reset ;reset

Loading…
Cancel
Save