From 4b114b4de0fe3a50cdfee913cac0959afdf9f194 Mon Sep 17 00:00:00 2001 From: amail80 <261782908+amail80@users.noreply.github.com> Date: Sun, 18 Oct 2026 14:03:14 +0500 Subject: [PATCH] Windows: fix untranslated Repair EFI Boot Loader menu item (#1929) The main menu is localized by looking up command IDs in the language dictionary from 40001 upwards, stopping at the first ID without an entry. An ID has an entry when its name in the embedded Resource.h matches a string key. 40069 was defined as IDM_MOUNIT_NO_CACHE, while its string key is IDM_MOUNT_NO_CACHE, so the loop stopped there. As a result, IDM_REPAIR_EFI_BOOT_LOADER (40070) was never localized and appeared in English in every language, although all translations include it. Rename the define to match its string key. The Mount button menu item that uses this ID already takes its text from GetString and is unchanged. --- src/Mount/Mount.c | 6 +++--- src/Mount/Resource.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 511415b5..445adf71 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -890,7 +890,7 @@ static HMENU CreateMountNoCacheDropdownMenu() HMENU hmenu = CreatePopupMenu(); // add menu items - AppendMenu(hmenu, MF_STRING, IDM_MOUNIT_NO_CACHE, GetString("IDM_MOUNT_NO_CACHE")); + AppendMenu(hmenu, MF_STRING, IDM_MOUNT_NO_CACHE, GetString("IDM_MOUNT_NO_CACHE")); return hmenu; } @@ -9348,9 +9348,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa return 1; } - if ((lw == IDOK || lw == IDM_MOUNT_VOLUME || lw == IDM_MOUNT_VOLUME_OPTIONS || lw == IDM_MOUNIT_NO_CACHE)) + if ((lw == IDOK || lw == IDM_MOUNT_VOLUME || lw == IDM_MOUNT_VOLUME_OPTIONS || lw == IDM_MOUNT_NO_CACHE)) { - MountSelectedVolume (hwndDlg, lw == IDM_MOUNT_VOLUME_OPTIONS, lw == IDM_MOUNIT_NO_CACHE); + MountSelectedVolume (hwndDlg, lw == IDM_MOUNT_VOLUME_OPTIONS, lw == IDM_MOUNT_NO_CACHE); return 1; } diff --git a/src/Mount/Resource.h b/src/Mount/Resource.h index 444fbc42..2b41ceb9 100644 --- a/src/Mount/Resource.h +++ b/src/Mount/Resource.h @@ -274,7 +274,7 @@ #define IDM_DEFAULT_MOUNT_PARAMETERS 40066 #define IDM_DECRYPT_NONSYS_VOL 40067 #define IDM_VERIFY_RESCUE_DISK_ISO 40068 -#define IDM_MOUNIT_NO_CACHE 40069 +#define IDM_MOUNT_NO_CACHE 40069 #define IDM_REPAIR_EFI_BOOT_LOADER 40070 // Next default values for new objects