mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-17 08:34:27 -04:00
[loc] remove nagging about lost translators
* All things considered, this was probably more detrimental than helpful
* Reverts 26af32b522
This commit is contained in:
parent
8bb20f3d7c
commit
65bbe984fd
5 changed files with 13 additions and 49 deletions
|
@ -474,8 +474,6 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
||||||
vvuprintf("Local time: %" PRId64 "\n", local_time);
|
vvuprintf("Local time: %" PRId64 "\n", local_time);
|
||||||
if (local_time < reg_time + update_interval) {
|
if (local_time < reg_time + update_interval) {
|
||||||
vuprintf("Next update check in %" PRId64 " seconds.\n", reg_time + update_interval - local_time);
|
vuprintf("Next update check in %" PRId64 " seconds.\n", reg_time + update_interval - local_time);
|
||||||
// This is as good a place as any to ask for translation help
|
|
||||||
LostTranslatorCheck();
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
25
src/parser.c
25
src/parser.c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Rufus: The Reliable USB Formatting Utility
|
* Rufus: The Reliable USB Formatting Utility
|
||||||
* Elementary Unicode compliant find/replace parser
|
* Elementary Unicode compliant find/replace parser
|
||||||
* Copyright © 2012-2014 Pete Batard <pete@akeo.ie>
|
* Copyright © 2012-2016 Pete Batard <pete@akeo.ie>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -239,13 +239,12 @@ BOOL get_supported_locales(const char* filename)
|
||||||
FILE* fd = NULL;
|
FILE* fd = NULL;
|
||||||
BOOL r = FALSE;
|
BOOL r = FALSE;
|
||||||
char line[1024];
|
char line[1024];
|
||||||
char* LT[] = LOST_TRANSLATORS; //just to get the arraysize...
|
|
||||||
size_t i, j, k;
|
size_t i, j, k;
|
||||||
loc_cmd *lcmd = NULL, *last_lcmd = NULL;
|
loc_cmd *lcmd = NULL, *last_lcmd = NULL;
|
||||||
long end_of_block;
|
long end_of_block;
|
||||||
int version_line_nr = 0;
|
int version_line_nr = 0;
|
||||||
uint32_t loc_base_minor = -1, loc_base_micro = -1;
|
uint32_t loc_base_minor = -1, loc_base_micro = -1;
|
||||||
|
|
||||||
fd = open_loc_file(filename);
|
fd = open_loc_file(filename);
|
||||||
if (fd == NULL)
|
if (fd == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -346,16 +345,8 @@ BOOL get_supported_locales(const char* filename)
|
||||||
if (lcmd->unum[2] < loc_base_micro) {
|
if (lcmd->unum[2] < loc_base_micro) {
|
||||||
luprintf("the version of this translation is older than the base one and may result in some messages not being properly translated.\n"
|
luprintf("the version of this translation is older than the base one and may result in some messages not being properly translated.\n"
|
||||||
"If you are the translator, please update your translation with the changes that intervened between v%d.%d.%d and v%d.%d.%d.\n"
|
"If you are the translator, please update your translation with the changes that intervened between v%d.%d.%d and v%d.%d.%d.\n"
|
||||||
"See https://github.com/pbatard/rufus/blob/master/res/localization/ChangeLog.txt",
|
"See https://github.com/pbatard/rufus/blob/master/res/localization/ChangeLog.txt",
|
||||||
LOC_FRAMEWORK_VERSION, loc_base_minor, lcmd->unum[2], LOC_FRAMEWORK_VERSION, loc_base_minor, loc_base_micro);
|
LOC_FRAMEWORK_VERSION, loc_base_minor, lcmd->unum[2], LOC_FRAMEWORK_VERSION, loc_base_minor, loc_base_micro);
|
||||||
} else if (lcmd->unum[2] >= loc_base_micro) {
|
|
||||||
// Don't bug users about a locale that may already have been upgraded
|
|
||||||
for (i=0; i<ARRAYSIZE(LT); i++) {
|
|
||||||
if (safe_strcmp(last_lcmd->txt[0], lost_translators[i]) == 0) {
|
|
||||||
uprintf("NOTE: This translation appears up to date - Removing it from LOST_TRANSLATORS");
|
|
||||||
lost_translators[i][0] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
version_line_nr = loc_line_nr;
|
version_line_nr = loc_line_nr;
|
||||||
}
|
}
|
||||||
|
@ -374,7 +365,7 @@ BOOL get_supported_locales(const char* filename)
|
||||||
}
|
}
|
||||||
r = !list_empty(&locale_list);
|
r = !list_empty(&locale_list);
|
||||||
if (r == FALSE)
|
if (r == FALSE)
|
||||||
uprintf("localization: '%s' contains no valid locale sections\n", filename);
|
uprintf("localization: '%s' contains no valid locale sections\n", filename);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (fd != NULL)
|
if (fd != NULL)
|
||||||
|
@ -576,7 +567,7 @@ out:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a line of UTF-16 text and return the data if it matches the 'token'
|
* Parse a line of UTF-16 text and return the data if it matches the 'token'
|
||||||
* The parsed line is of the form: [ ]token[ ]=[ ]["]data["][ ] and is
|
* The parsed line is of the form: [ ]token[ ]=[ ]["]data["][ ] and is
|
||||||
* modified by the parser
|
* modified by the parser
|
||||||
*/
|
*/
|
||||||
static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
|
static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
|
||||||
|
@ -603,7 +594,7 @@ static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
|
||||||
i += wcsspn(&wline[i], wspace);
|
i += wcsspn(&wline[i], wspace);
|
||||||
|
|
||||||
// Check for an equal sign
|
// Check for an equal sign
|
||||||
if (wline[i] != L'=')
|
if (wline[i] != L'=')
|
||||||
return NULL;
|
return NULL;
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
@ -1006,7 +997,7 @@ char* insert_section_data(const char* filename, const char* section, const char*
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fseek(fd_in, 0, SEEK_SET);
|
fseek(fd_in, 0, SEEK_SET);
|
||||||
// duprintf("'%s' was detected as %s\n", filename,
|
// duprintf("'%s' was detected as %s\n", filename,
|
||||||
// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM"));
|
// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM"));
|
||||||
|
|
||||||
wtmpname = (wchar_t*)calloc(wcslen(wfilename)+2, sizeof(wchar_t));
|
wtmpname = (wchar_t*)calloc(wcslen(wfilename)+2, sizeof(wchar_t));
|
||||||
|
@ -1145,7 +1136,7 @@ char* replace_in_token_data(const char* filename, const char* token, const char*
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fseek(fd_in, 0, SEEK_SET);
|
fseek(fd_in, 0, SEEK_SET);
|
||||||
// duprintf("'%s' was detected as %s\n", filename,
|
// duprintf("'%s' was detected as %s\n", filename,
|
||||||
// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM"));
|
// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM"));
|
||||||
|
|
||||||
|
|
||||||
|
|
20
src/rufus.c
20
src/rufus.c
|
@ -132,7 +132,6 @@ static HBRUSH hInfoBrush;
|
||||||
static WNDPROC info_original_proc = NULL;
|
static WNDPROC info_original_proc = NULL;
|
||||||
char ClusterSizeLabel[MAX_CLUSTER_SIZES][64];
|
char ClusterSizeLabel[MAX_CLUSTER_SIZES][64];
|
||||||
char msgbox[1024], msgbox_title[32], *ini_file = NULL;
|
char msgbox[1024], msgbox_title[32], *ini_file = NULL;
|
||||||
char lost_translators[][6] = LOST_TRANSLATORS;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Globals
|
* Globals
|
||||||
|
@ -990,25 +989,6 @@ static void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Randomly nag users about translations that have been left behind
|
|
||||||
void LostTranslatorCheck(void)
|
|
||||||
{
|
|
||||||
char *p;
|
|
||||||
char* lang = safe_strdup(selected_locale->txt[1]);
|
|
||||||
int i, r = rand() * LOST_TRANSLATOR_PROBABILITY / RAND_MAX;
|
|
||||||
for (i=0; i<ARRAYSIZE(lost_translators); i++)
|
|
||||||
if (strcmp(selected_locale->txt[0], lost_translators[i]) == 0)
|
|
||||||
break;
|
|
||||||
if ((r == 0) && (i != ARRAYSIZE(lost_translators)) && (lang != NULL) && ((p = strchr(lang, '(')) != NULL)) {
|
|
||||||
p[-1] = 0;
|
|
||||||
safe_sprintf(msgbox, sizeof(msgbox), "Note: The %s translation requires an update, but the original "
|
|
||||||
"translator is no longer contributing to it...\nIf you can read English and want to help complete "
|
|
||||||
"this translation, please visit: http://rufus.akeo.ie/translate.", lang);
|
|
||||||
MessageBoxU(hMainDialog, msgbox, "Translation help needed", MB_OK|MB_ICONINFORMATION);
|
|
||||||
}
|
|
||||||
safe_free(lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Report the features of the selected ISO images
|
// Report the features of the selected ISO images
|
||||||
static const char* YesNo(BOOL b) {
|
static const char* YesNo(BOOL b) {
|
||||||
return (b) ? "Yes" : "No";
|
return (b) ? "Yes" : "No";
|
||||||
|
|
|
@ -33,10 +33,6 @@
|
||||||
#define RUFUS_DEBUG // print debug info to Debug facility
|
#define RUFUS_DEBUG // print debug info to Debug facility
|
||||||
/* Features not ready for prime time and that may *DESTROY* your data - USE AT YOUR OWN RISKS! */
|
/* Features not ready for prime time and that may *DESTROY* your data - USE AT YOUR OWN RISKS! */
|
||||||
// #define RUFUS_TEST
|
// #define RUFUS_TEST
|
||||||
/* Languages for which translators are M.I.A. and that we could use help with */
|
|
||||||
#define LOST_TRANSLATORS { "ms-MY" } // NB: locales MUST be <= 5 chars
|
|
||||||
/* Probability of getting the M.I.A. translator message. For more on this, see LostTranslatorCheck() */
|
|
||||||
#define LOST_TRANSLATOR_PROBABILITY 1000
|
|
||||||
|
|
||||||
#define APPLICATION_NAME "Rufus"
|
#define APPLICATION_NAME "Rufus"
|
||||||
#define COMPANY_NAME "Akeo Consulting"
|
#define COMPANY_NAME "Akeo Consulting"
|
||||||
|
@ -454,7 +450,6 @@ extern BOOL WimApplyImage(const char* image, int index, const char* dst);
|
||||||
extern BOOL IsBootableImage(const char* path);
|
extern BOOL IsBootableImage(const char* path);
|
||||||
extern BOOL AppendVHDFooter(const char* vhd_path);
|
extern BOOL AppendVHDFooter(const char* vhd_path);
|
||||||
extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid);
|
extern int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid);
|
||||||
extern void LostTranslatorCheck(void);
|
|
||||||
extern LONG ValidateSignature(HWND hDlg, const char* path);
|
extern LONG ValidateSignature(HWND hDlg, const char* path);
|
||||||
extern BOOL IsFontAvailable(const char* font_name);
|
extern BOOL IsFontAvailable(const char* font_name);
|
||||||
extern BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
extern BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 2.7.845"
|
CAPTION "Rufus 2.7.846"
|
||||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||||
|
@ -320,8 +320,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,7,845,0
|
FILEVERSION 2,7,846,0
|
||||||
PRODUCTVERSION 2,7,845,0
|
PRODUCTVERSION 2,7,846,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -338,13 +338,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "2.7.845"
|
VALUE "FileVersion", "2.7.846"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "2.7.845"
|
VALUE "ProductVersion", "2.7.846"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue