pbatard / rufus

The Reliable USB Formatting Utility
https://rufus.ie
GNU General Public License v3.0
29.2k stars 2.59k forks source link

Untranslated messages being displayed when using an external loc file #2193

Closed Jly4 closed 1 year ago

Jly4 commented 1 year ago

after pressing start i get this error image

pbatard commented 1 year ago

Can't help you without the log.

I'd really like to know how you got this, because Rufus should fallback to English messages if it can't find a translation for your language, and this seems to hint that your environment is the problem if that hasn't happen (such as, it may be missing some resources or something).

Basically, this is what you should see:

Image1

Also, the fact that you get user instead of your account name further seems to hint that your Windows installation has been tweaked in some way.

Finally, My_19045.2673_Full_x64_by_Flibustier.iso is very unlikely to be an official Microsoft published Windows ISO, and I can only support official Windows ISOs. Please make sure that you use an official image.

But really, unless you provide your FULL log, as was requested of you, I will have to close this issue.

Jly4 commented 1 year ago

This is a custom assembly that I made in vmware, a user has already been created in it. I tried to set the English language, but the error text did not change. I think that the screenshot that you threw off is enough for me to understand what to choose there.

Rufus x86 v3.21.1949 (Portable)
Windows version: Windows 10 Enterprise, 64-bit (Build 19043.1200)
Syslinux versions: 4.07/2013-07-25, 6.04/pre1
Grub versions: 0.4.6a, 2.06
System locale ID: 0x0419 (ru-RU)
NOTE: No Windows Language Pack is installed for English (English) on this system.
This means that some controls may still be displayed using the system locale.
Localization set to 'en-US'
Found USB 2.0 device 'Kingston DataTraveler 2.0 USB Device' (0951:1665)
Found UAS (USB 3.0) device 'JMicron Generic SCSI Disk Device' (152D:0583)
Device eliminated because it was detected as a Hard Drive (score 13 > 0)
If this device is not a Hard Drive, please e-mail the author of this application
NOTE: You can enable the listing of Hard Drives under 'advanced drive properties'
Found non-USB removable device 'PLEXTOR PX-256M5Pro' => Eliminated
Found non-USB removable device 'ST1000DX001-1CM162' => Eliminated
Found non-USB removable device 'WDC WD20PURZ-85AKKY0' => Eliminated
1 device found
Disk type: Removable, Disk size: 7.7GB, Sector size: 512 bytes
Cylinders: 941, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 1
Disk ID: 0x00CD118F
Drive has a Rufus Master Boot Record
Partition 1:
  Type: NTFS (0x07)
  Detected File System: NTFS
  Size: 7.2 GB (7746349056 bytes)
  Start Sector: 2048, Boot: Yes
Scanning image...
ISO analysis:
  Image is a UDF image
Disk image analysis:
  Image does not have a Boot Marker
ISO label: 'DVD_ROM'
  Detected: Windows 10 ISO (Build 19045.2673)
  Size: 4.2 GB (Projected)
  Uses: EFI
  Uses: Bootmgr (BIOS and UEFI)
  Uses: Install.esd (version 0.14.0+)
Using image: My_19045.2673_Full_x64_by_Flibustier_2023.iso (4.2 GB)

Format operation started
Requesting disk access...
Will use 'G:' as volume mountpoint
Opened \\.\PhysicalDrive5 for exclusive write access
Analyzing existing boot records...
Drive has a Rufus Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 128 sectors
Initializing disk...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 7.2 GB)
Waiting for logical drive to reappear...
Formatting to NTFS (using IFS)
Using cluster size: 4096 bytes
Quick format was selected
Creating file system...
Format completed.
Writing Master Boot Record...
Set bootable USB partition as 0x80
Using Rufus MBR
Found volume \\?\Volume{4afc4f7d-ba56-11ed-bd49-001a7dda7111}\
Disabling file indexing...
Notice: Volume Device Path is \Device\HarddiskVolume14
Waiting for access on \\?\Volume{4afc4f7d-ba56-11ed-bd49-001a7dda7111}...
Opened \\?\Volume{4afc4f7d-ba56-11ed-bd49-001a7dda7111} for exclusive write access
Writing Partition Boot Record...
Using Standard NTFS partition boot record
Confirmed new volume has an NTFS boot sector
Successfully remounted \\?\Volume{4afc4f7d-ba56-11ed-bd49-001a7dda7111}\ as G:
Extracting files...
Image is a UDF image
Extracting: G:\boot\bcd (16 KB)
Extracting: G:\boot\boot.sdi (3 MB)
Extracting: G:\boot\bootfix.bin (1 KB)
Extracting: G:\boot\bootsect.exe (103.8 KB)
Extracting: G:\boot\etfsboot.com (4 KB)
Extracting: G:\boot\fonts\segmono_boot.ttf (42.8 KB)
Extracting: G:\boot\fonts\segoe_slboot.ttf (83.2 KB)
Extracting: G:\boot\fonts\segoen_slboot.ttf (82.9 KB)
Extracting: G:\boot\fonts\wgl4_boot.ttf (46.3 KB)
Extracting: G:\boot\memtest.exe (971.3 KB)
Extracting: G:\boot\resources\bootres.dll (86.3 KB)
Extracting: G:\boot\ru-ru\bootsect.exe.mui (17.5 KB)
Extracting: G:\bootmgr (401.2 KB)
Extracting: G:\bootmgr.efi (1.5 MB)
Extracting: G:\efi\boot\bootx64.efi (1.5 MB)
Extracting: G:\efi\microsoft\boot\bcd (16 KB)
Extracting: G:\efi\microsoft\boot\cdboot.efi (744.8 KB)
Extracting: G:\efi\microsoft\boot\cdboot_noprompt.efi (744.8 KB)
Extracting: G:\efi\microsoft\boot\efisys.bin (1.4 MB)
Extracting: G:\efi\microsoft\boot\efisys_noprompt.bin (1.4 MB)
Extracting: G:\efi\microsoft\boot\fonts\segmono_boot.ttf (42.8 KB)
Extracting: G:\efi\microsoft\boot\fonts\segoe_slboot.ttf (83.2 KB)
Extracting: G:\efi\microsoft\boot\fonts\segoen_slboot.ttf (82.9 KB)
Extracting: G:\efi\microsoft\boot\fonts\wgl4_boot.ttf (46.3 KB)
Extracting: G:\efi\microsoft\boot\memtest.efi (1.3 MB)
Extracting: G:\efi\microsoft\boot\resources\bootres.dll (86.3 KB)
Extracting: G:\efi\microsoft\boot\winsipolicy.p7b (9.5 KB)
Extracting: G:\sources\boot.wim (327.7 MB)
Extracting: G:\sources\ei.cfg (30 bytes)
Extracting: G:\sources\install.esd (3.8 GB)
Extracting: G:\sources\setup.exe (278.8 KB)
Finalizing, please wait...
Created: G:autorun.inf
Created: G:autorun.ico
NTFS Fixup (Checkdisk)...
Volume label is My_19045_2673_Full_x64.

Stage 1: Examining basic file system structure ...
  256 file records processed.
File verification completed.
 Phase duration (File record verification): 8.75 milliseconds.
  0 large file records processed.
 Phase duration (Orphan file record recovery): 0.29 milliseconds.
  0 bad file records processed.
 Phase duration (Bad file record checking): 0.29 milliseconds.

Stage 2: Examining file name linkage ...
  300 index entries processed.
Index verification completed.
 Phase duration (Index verification): 19.92 milliseconds.
 Phase duration (Orphan reconnection): 0.20 milliseconds.
 Phase duration (Orphan recovery to lost and found): 0.01 milliseconds.
  0 reparse records processed.
  0 reparse records processed.
 Phase duration (Reparse point and Object ID verification): 0.60 milliseconds.

Stage 3: Examining security descriptors ...
Security descriptor verification completed.
 Phase duration (Security descriptor verification): 11.65 milliseconds.
  22 data files processed.
 Phase duration (Data attribute verification): 0.30 milliseconds.

Windows has scanned the file system and found no problems.
No further action is required.

   7564793 KB total disk space.
   4379928 KB in 39 files.
        84 KB in 24 indexes.
     13941 KB in use by the system.
     13040 KB occupied by the log file.
   3170840 KB available on disk.
      4096 bytes in each allocation unit.
   1891198 total allocation units on disk.
    792710 allocation units available on disk.
Total duration: 42.82 milliseconds (42 ms).
NTFS Fixup completed.

Found USB 2.0 device 'Kingston DataTraveler 2.0 USB Device' (0951:1665)
Using 'autorun.inf' label for drive G: 'My_19045_2673_Full_x64'
Found UAS (USB 3.0) device 'JMicron Generic SCSI Disk Device' (152D:0583)
Device eliminated because it was detected as a Hard Drive (score 13 > 0)
If this device is not a Hard Drive, please e-mail the author of this application
NOTE: You can enable the listing of Hard Drives under 'advanced drive properties'
Found non-USB removable device 'PLEXTOR PX-256M5Pro' => Eliminated
Found non-USB removable device 'ST1000DX001-1CM162' => Eliminated
Found non-USB removable device 'WDC WD20PURZ-85AKKY0' => Eliminated
1 device found
Disk type: Removable, Disk size: 7.7GB, Sector size: 512 bytes
Cylinders: 941, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 1
Disk ID: 0x00DE20ED
Drive has a Rufus Master Boot Record
Partition 1:
  Type: NTFS (0x07)
  Detected File System: NTFS
  Size: 7.2 GB (7746349056 bytes)
  Start Sector: 2048, Boot: Yes
pbatard commented 1 year ago
NOTE: No Windows Language Pack is installed for English (English) on this system.
This means that some controls may still be displayed using the system locale.

This may be why you're seeing untranslated messages.

Your Russian version of Windows is interesting, because AFAIK, localised versions of Windows should still come with the English language pack as standard (at least I don't recall seeing that message on French or other localised version, but I need to double check).

What happens if you do install the English language pack?

pbatard commented 1 year ago

Something's weird with your log compared to your screenshot though:

Localization set to 'en-US'

This means that your interface in Rufus should be displayed in English, not in Russian.

Did you switch language in Rufus after you posted the screenshot? Can your please also provide the log when using Russian for your language in Rufus?

Basically, the fact that you don't get Localization set to 'ru-RU' in your log is weird and does not match the screenshot you sent.

Jly4 commented 1 year ago

hmm... i already had english (US) installed

pbatard commented 1 year ago

According to EnumUILanguagesW(), I'm afraid you don't...

Jly4 commented 1 year ago

ARtCCbB

N3AFV6G

pbatard commented 1 year ago

I don't doubt that you somehow have the packs installed. But I can tell you that, despite that, EnumUILanguagesW() does not list 0x409, which is the code for English (United States) as installed.

Basically, the process is very simple:

  1. When running Rufus in a selected locale (here, it appears that you have selected English (English)) and this is not the default system locale, Rufus goes through all the Windows language IDs that are relevant to that language (the numbers at the end of this line)
  2. For each of these language IDs, Rufus invokes EnumUILanguagesW() with parameter MUI_LANGUAGE_ID to see if Windows reports that the language pack for that specific ID is installed (NB: And yes, if you're looking at the code, we need to do a string comparison for what are essentially integers — The Windows APIs are that weird)
  3. In your case, EnumUILanguagesW() does not ever see a match for 0409 which is the (hexadecimal) Windows language code for English (United States), so, all I can tell is that, the Windows API that is supposed to report what language packs are installed, does not report that you have a language pack for English (United States) installed. And no, as far as I can tell, this is not an application bug, like, for instance, comparing 409 vs 0409 as strings. It appears to be a Windows bug.
pbatard commented 1 year ago

Can you please download and run EnumUILanguages.exe from a command prompt, and paste your output? I'd like to see what EnumUILanguagesW() actually reports on your system.

For reference, the source code for this commandline application (which is derived from https://github.com/pbatard/base-console), is this:

/*
 * base-console - Because sometimes I want to release a win32 console
 * utility in a hurry, and I like to have it set up properly.
 *
 * Copyright © 2020 Pete Batard <pete@akeo.ie>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

#include "msapi_utf8.h"

#define _STRINGIFY(x) #x
#define STRINGIFY(x) _STRINGIFY(x)

#ifndef APP_VERSION
#define APP_VERSION_STR "[DEV]"
#else
#define APP_VERSION_STR STRINGIFY(APP_VERSION)
#endif

static __inline char* appname(const char* path)
{
    static char appname[128];
    _splitpath_s(path, NULL, 0, NULL, 0, appname, sizeof(appname), NULL, 0);
    return appname;
}

static BOOL CALLBACK EnumUILanguagesProc(LPWSTR lpUILanguageString, LONG_PTR lParam)
{
    fprintf(stdout, "o %S\n", lpUILanguageString);
    return TRUE;
}

int main_utf8(int argc, char** argv)
{
    fprintf(stdout, "Language Packs installed on this system (seen by EnumUILanguages):\n");
    EnumUILanguages(EnumUILanguagesProc, MUI_LANGUAGE_ID, (LONG_PTR)NULL);

    return 0;
}

int wmain(int argc, wchar_t** argv16)
{
    SetConsoleOutputCP(CP_UTF8);
    char** argv = calloc(argc, sizeof(char*));
    if (argv == NULL)
        return -1;
    for (int i = 0; i < argc; i++)
        argv[i] = wchar_to_utf8(argv16[i]);
    int r = main_utf8(argc, argv);
    for (int i = 0; i < argc; i++)
        free(argv[i]);
    free(argv);
#ifdef _DEBUG
    _CrtDumpMemoryLeaks();
#endif
    return r;
}
Jly4 commented 1 year ago
cmd_4lxQQRnCrM
pbatard commented 1 year ago

Thanks. Then I don't get why Rufus doesn't pick 0409 from your system because the EnumUILanguages() code from the console app I asked you to test is basically the same code as the one from Rufus, minus the actual comparison.

By any chance, do you perhaps have a rufus.loc somewhere in the directory where you have the Rufus executable? Because that's the only way I can currently see Rufus not picking your 0409 language pack, because, if you have a l "en-US" "English (English)" line in that rufus.loc that is missing the language ID codes, that would of course replicate the issue.

For instance, if I have a rufus.loc along with my exe, and remove 0x0809 from the l "en-US" "English (English)" line, I can get:

System locale ID: 0x0809 (en-GB)
NOTE: No Windows Language Pack is installed for English (English) on this system.
This means that some controls may still be displayed using the system locale.

But you really have to hack the loc file to get there, because otherwise, and I validated this, it will just pick the 0x0409 from the loc and therefore should have no issue matching it in the comparison call.

If you don't have a rufus.loc, then I'm probably going to have to install a localized version of Windows somewhere to be able to investigate this further...

One last thing I may also ask you before I do that: Can you please install and run DebugView from https://learn.microsoft.com/en-us/sysinternals/downloads/debugview and then launch Rufus?

You should see a line starting with *** Rufus init *** in Rufus along with some data that is relevant to localization. If you could send me a copy of that DebugView log, as it may contain further clues, I would appreciate it.

Jly4 commented 1 year ago

I understood what the problem is, I had rufus.loc and since I have been using Rufus for a long time, this file was created on 06.2022, after deleting it, I got the same window as you have in the screenshot

explorer_z8pF5ofnEi rufus-3 21_4KRCYneENm

maybe you are interested to see this file rufus.loc.zip

pbatard commented 1 year ago

A-ha! So I wasn't going crazy! 😄

I'm glad we could resolve this, because I really couldn't figure out how this could happen without a bug in EnumUILanguages() or a broken rufus.loc.

I guess I'll be more careful about always making sure to ask people who have localization issues if they have a rufus.loc somewhere.

And as a matter of fact, I think I definitely want to report if an external .loc is being used in the UI log (currently this is only being reported when using DebugView, because we need to pick that information early), so I'm going to keep this issue open and I will close it once I have added code in Rufus that displays if an external log is being used, in the Rufus UI log.

At any rate, thanks a lot for helping troubleshoot this issue!

Jly4 commented 1 year ago

thanks to you too for the quick help, rufus is a great program

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.