mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[loc] display a note in the log when a translation is behind
* Also make sure the messages regarding language pack availability are visible to the users in the log * Also fix a typo in the Malay translation
This commit is contained in:
parent
5e8a459828
commit
140236acd6
8 changed files with 26 additions and 14 deletions
|
@ -602,13 +602,15 @@ WORD get_language_id(loc_cmd* lcmd)
|
|||
wchar_t wlang[5];
|
||||
LANGID lang_id = GetUserDefaultUILanguage();
|
||||
|
||||
// Log will be reset, so we need to use the buffered uprintf() to get our messages to the user
|
||||
ubclear();
|
||||
if (lcmd == NULL)
|
||||
return MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
|
||||
|
||||
// Find if the selected language is the user default
|
||||
for (i = 0; i<lcmd->unum_size; i++) {
|
||||
if (lcmd->unum[i] == lang_id) {
|
||||
uprintf("localization: will use default UI language 0x%04X", lang_id);
|
||||
ubpushf("Will use default UI locale 0x%04X", lang_id);
|
||||
return MAKELANGID(lang_id, SUBLANG_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
@ -622,11 +624,12 @@ WORD get_language_id(loc_cmd* lcmd)
|
|||
// boolean to tell us that we found what we were after.
|
||||
EnumUILanguages(EnumUILanguagesProc, 0x4, (LONG_PTR)wlang); // 0x04 = MUI_LANGUAGE_ID
|
||||
if (found_lang) {
|
||||
uprintf("localization: detected installed language pack for 0x%04X", lcmd->unum[i]);
|
||||
ubpushf("Detected installed Windows Language Pack for 0x%04X (%s)", lcmd->unum[i], lcmd->txt[1]);
|
||||
return MAKELANGID(lcmd->unum[i], SUBLANG_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
uprintf("localization: no matching language pack - some messages will be displayed using default locale");
|
||||
ubpushf("NOTE: No Windows Language Pack is installed for %s on this system.\r\n"
|
||||
"This means that some controls will still be displayed using the system locale.", lcmd->txt[1]);
|
||||
return MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue