mirror of https://github.com/BOINC/boinc.git
To allow customized new version message to be translatable, allow only the branded name of BOINC to be customized in the message.
Emphasize this difference by changing NVC_CONFIG struct member new_version_text to new_version_name. Fix a bug I introduced in release_brand.sh script.
This commit is contained in:
parent
a03075c73c
commit
fc02420dd4
|
@ -38,7 +38,7 @@ NVC_CONFIG::NVC_CONFIG() {
|
|||
//
|
||||
void NVC_CONFIG::defaults() {
|
||||
client_download_url = "https://boinc.berkeley.edu/download.php";
|
||||
client_new_version_text = "";
|
||||
client_new_version_name = "";
|
||||
client_version_check_url = "https://boinc.berkeley.edu/download.php?xml=1";
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@ int NVC_CONFIG::parse(FILE* f) {
|
|||
downcase_string(client_download_url);
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_string("client_new_version_text", client_new_version_text)) {
|
||||
if (xp.parse_string("client_new_version_name", client_new_version_name)) {
|
||||
continue;
|
||||
}
|
||||
if (xp.parse_string("client_version_check_url", client_version_check_url)) {
|
||||
|
@ -163,7 +163,9 @@ static bool parse_version(FILE* f, char* new_version, int len) {
|
|||
}
|
||||
|
||||
static void show_newer_version_msg(const char* new_vers) {
|
||||
if (nvc_config.client_new_version_text.empty()) {
|
||||
char buf[1024];
|
||||
|
||||
if (nvc_config.client_new_version_name.empty()) {
|
||||
msg_printf_notice(0, true,
|
||||
"https://boinc.berkeley.edu/manager_links.php?target=notice&controlid=download",
|
||||
"%s (%s). <a href=%s>%s</a>",
|
||||
|
@ -173,9 +175,12 @@ static void show_newer_version_msg(const char* new_vers) {
|
|||
_("Download")
|
||||
);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), _("A new version of %s is available"),
|
||||
nvc_config.client_new_version_name.c_str()
|
||||
);
|
||||
msg_printf_notice(0, true, NULL,
|
||||
"%s (%s). <a href=%s>%s</a>",
|
||||
nvc_config.client_new_version_text.c_str(),
|
||||
buf,
|
||||
new_vers,
|
||||
nvc_config.client_download_url.c_str(),
|
||||
_("Download")
|
||||
|
|
|
@ -36,7 +36,7 @@ extern void newer_version_startup_check();
|
|||
|
||||
struct NVC_CONFIG {
|
||||
std::string client_download_url;
|
||||
std::string client_new_version_text;
|
||||
std::string client_new_version_name;
|
||||
std::string client_version_check_url;
|
||||
|
||||
NVC_CONFIG();
|
||||
|
|
|
@ -197,7 +197,7 @@ cp -fp curl/ca-bundle.crt ../BOINC_Installer/Pkg_Root/Library/Application\ Suppo
|
|||
cp -fp win_build/installerv2/redist/all_projects_list.xml ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/installer_projects_list.xml
|
||||
|
||||
if [ -n "${NEWVERSIONCHECKDIR}" ]; then
|
||||
cp -fp "win_build/installerv2/redist/${NEWVERSIONCHECKDIR}/nvc_config.xml" ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/installer_projects_list.xml
|
||||
cp -fp "win_build/installerv2/redist/${NEWVERSIONCHECKDIR}/nvc_config.xml" ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/nvc_config.xml
|
||||
fi
|
||||
|
||||
cp -fp clientscr/res/boinc_logo_black.jpg ../BOINC_Installer/Pkg_Root/Library/Application\ Support/BOINC\ Data/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<nvc_config>
|
||||
<client_download_url>https://www.worldcommunitygrid.org/reg/ms/viewDownloadAgain.do</client_download_url>
|
||||
<client_version_check_url>https://www.worldcommunitygrid.org/download_all.php?xml=1</client_version_check_url>
|
||||
<client_new_version_text>A new version of World Community Grid is available</client_new_version_text>
|
||||
<client_new_version_name>World Community Grid</client_new_version_name>
|
||||
</nvc_config>
|
||||
|
|
Loading…
Reference in New Issue