[loc] persits the user-selected locale

* ...since it seems this is what most Rufus users want.
* Also fix a typo in the Malay translation (reported by hyxer)
* Closes #250
This commit is contained in:
Pete Batard 2013-12-22 18:28:38 +00:00
parent 36693d2144
commit 63e1fe3d55
4 changed files with 11 additions and 10 deletions

View File

@ -3872,7 +3872,7 @@ t IDC_START "Mula"
m IDC_START +18,0
t IDS_ADVANCED_OPTIONS_GRP "Pilihan Lanjutan"
s IDS_ADVANCED_OPTIONS_GRP +19,0
t IDC_ENABLE_FIXED_DISKS "Senaraiakan cakera keras USB"
t IDC_ENABLE_FIXED_DISKS "Senaraikan cakera keras USB"
s IDC_ENABLE_FIXED_DISKS +20,0
# Note: it is acceptable to drop the parenthesis () below if you are running out of space
# as there is a tooltip (MSG_169) providing these details

View File

@ -424,7 +424,7 @@ BOOL get_loc_data_file(const char* filename, loc_cmd* lcmd)
if (!eol)
loc_line_nr += line_nr_incr;
get_loc_data_line(buf);
goto out;
break;
case '\r':
case '\n':
if (escape_sequence) {
@ -502,8 +502,8 @@ BOOL get_loc_data_file(const char* filename, loc_cmd* lcmd)
}
break;
}
if (ftell(fd) > end_offset)
goto out;
if ((c == EOF) || (ftell(fd) > end_offset))
break;
// Have at least 2 chars extra, for \r\n sequences
if (i >= bufsize-2) {
bufsize *= 2;

View File

@ -2205,7 +2205,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
relaunch:
uprintf("localization: using locale '%s'\n", selected_locale->txt[0]);
get_loc_data_file(loc_file, selected_locale);
if (get_loc_data_file(loc_file, selected_locale))
WriteRegistryKeyStr(REGKEY_HKCU, REGKEY_LOCALE, selected_locale->txt[0]);
// Create the main Window
hDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_DIALOG), NULL, MainCallback);

View File

@ -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.2.360"
CAPTION "Rufus v1.4.2.361"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -288,8 +288,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,2,360
PRODUCTVERSION 1,4,2,360
FILEVERSION 1,4,2,361
PRODUCTVERSION 1,4,2,361
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -306,13 +306,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.2.360"
VALUE "FileVersion", "1.4.2.361"
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.2.360"
VALUE "ProductVersion", "1.4.2.361"
END
END
BLOCK "VarFileInfo"