mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[loc] fix override of translation commands from separate dialogs
* Hashed string was missing the dialog ID. This means that something like: g IDD_DIALOG1 t IDC_CONTROL "Hello" g IDD_DIALOG2 t IDC_CONTROL "Goodbye" would result in "Goodbye" appearing on dialog 1.
This commit is contained in:
parent
803fe30709
commit
b19bcdefb9
2 changed files with 11 additions and 7 deletions
|
@ -254,8 +254,12 @@ void add_dialog_command(int index, loc_cmd* lcmd)
|
|||
// A dialog command must be unique, so we use a hash to identify any
|
||||
// command that may already have been populated, and ensure it is replaced
|
||||
// with the new one.
|
||||
str[0] = lcmd->command + 0x30;
|
||||
safe_strcpy(&str[1], sizeof(str)-1, lcmd->txt[0]);
|
||||
// Two dialogs may have different "m IDC_CONTROL" lines, and also
|
||||
// "m IDC_CONTROL" and "t IDC_CONTROL" are separate, so we compute two more
|
||||
// unique identifiers for dialog and command at the beginning of our string
|
||||
str[0] = index + 0x30;
|
||||
str[1] = lcmd->command + 0x30;
|
||||
safe_strcpy(&str[2], sizeof(str)-2, lcmd->txt[0]);
|
||||
i = htab_hash(str);
|
||||
if (i != 0) {
|
||||
if (htab_table[i].dlg_cmd != NULL) {
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.4.0.287"
|
||||
CAPTION "Rufus v1.4.0.288"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -284,8 +284,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,287
|
||||
PRODUCTVERSION 1,4,0,287
|
||||
FILEVERSION 1,4,0,288
|
||||
PRODUCTVERSION 1,4,0,288
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -302,13 +302,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.4.0.287"
|
||||
VALUE "FileVersion", "1.4.0.288"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.4.0.287"
|
||||
VALUE "ProductVersion", "1.4.0.288"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue