mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=10950
This commit is contained in:
parent
7ab7b5eea9
commit
15b02359cd
|
@ -22,7 +22,7 @@ check_version()
|
|||
cd /tmp
|
||||
foundit=
|
||||
## get current version of $1
|
||||
desired=$2
|
||||
desired=`echo $2 | awk -F. '{print $1*100+$2}'`
|
||||
echo $ECHO_N "Checking version of '$1' >= $desired... $ECHO_C"
|
||||
name=$1
|
||||
fullpath=`type $name | awk '{ print $(NF) }'`;
|
||||
|
@ -42,7 +42,7 @@ check_version()
|
|||
version="0";
|
||||
fi
|
||||
if [ -n "${version}" ]; then
|
||||
version=`echo $version | awk '{ for (i=1;i<=NF;i++) { split($i,j,"."); m=j[1]"."j[2] ; if ((m*1)>0) { print m ; break; } } }'`
|
||||
version=`echo $version | awk '{ for (i=1;i<=NF;i++) { split($i,j,"."); m=j[1]*100+j[2] ; if ((m*1)>0) { print m ; break; } } }'`
|
||||
if [ -z "$version" ]; then version=0; fi
|
||||
success=`echo "$version" "$desired" | awk '{ if ($1 >= $2) { print "yes";} else {print "no";}} '`
|
||||
else
|
||||
|
@ -122,7 +122,7 @@ echo "$cmdline"
|
|||
if eval $cmdline; then
|
||||
echo "Done, now run ./configure"
|
||||
echo " ./configure -C to enable caching"
|
||||
echo " ./configure --enable-maintainer-mode to enable maintainer depedencies"
|
||||
echo " ./configure --enable-maintainer-mode to enable maintainer dependencies"
|
||||
exit 0
|
||||
else
|
||||
echo "Something failed .... please check error-message and re-run when fixed."
|
||||
|
|
|
@ -9015,3 +9015,17 @@ Charlie 19 Aug 2006
|
|||
|
||||
api/
|
||||
mac_icon.C
|
||||
|
||||
David 20 Aug 2006
|
||||
- _autosetup: the check_version function doesn't
|
||||
correctly handle version strings that begins with 0,
|
||||
such as the pkg-config version 0.15.
|
||||
This is due to that checking if a value is a number
|
||||
it is assumed that the number is more than 0.
|
||||
check_version also assumes that 1.10 is lower than 1.9 since it does a
|
||||
string comparison.
|
||||
(from Egon Larsson)
|
||||
|
||||
_autosetup
|
||||
html/inc/
|
||||
translation.inc
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require_once('docutil.php');
|
||||
require_once('../html/inc/translation.inc');
|
||||
|
||||
$cachefile = "poll_results_cache_$language.html";
|
||||
$cachefile = "cache/poll_results_$language_in_use.html";
|
||||
|
||||
if (file_exists($cachefile)) {
|
||||
$age = time() - filemtime($cachefile);
|
||||
|
|
|
@ -20,18 +20,27 @@ The preferences override file is named <code>global_prefs_override.xml</code>.
|
|||
Its structure as follows:
|
||||
".html_text("
|
||||
<global_preferences>
|
||||
<run_on_batteries>0</run_on_batteries>
|
||||
<run_if_user_active>0</run_if_user_active>
|
||||
<idle_time_to_run>3</idle_time_to_run>
|
||||
<cpu_scheduling_period_minutes>60</cpu_scheduling_period_minutes>
|
||||
<start_hour>0</start_hour>
|
||||
<start_hour>0</start_hour>
|
||||
<net_start_hour>0</net_start_hour>
|
||||
<net_start_hour>0</net_start_hour>
|
||||
<leave_apps_in_memory>0</leave_apps_in_memory>
|
||||
<confirm_before_connecting>0</confirm_before_connecting>
|
||||
<hangup_if_dialed>0</hangup_if_dialed>
|
||||
<work_buf_min_days>0.1</work_buf_min_days>
|
||||
<max_cpus>2</max_cpus>
|
||||
<cpu_scheduling_period_minutes>60</cpu_scheduling_period_minutes>
|
||||
<disk_interval>60</disk_interval>
|
||||
<disk_max_used_gb>100</disk_max_used_gb>
|
||||
<disk_max_used_pct>50</disk_max_used_pct>
|
||||
<disk_min_free_gb>0.1</disk_min_free_gb>
|
||||
<vm_max_used_pct>75</vm_max_used_pct>
|
||||
<idle_time_to_run>3</idle_time_to_run>
|
||||
<max_bytes_sec_down>0</max_bytes_sec_down>
|
||||
<max_bytes_sec_up>0</max_bytes_sec_up>
|
||||
<cpu_usage_limit>100</cpu_usage_limit>
|
||||
</global_preferences>
|
||||
")."
|
||||
|
||||
|
|
|
@ -382,68 +382,86 @@ if (languagesNeedsRebuild($lang_language_dir, $lang_translations_dir, $lang_prj_
|
|||
buildLanguages($lang_language_dir,$lang_translations_dir,$lang_prj_translations_dir, $lang_compiled_dir);
|
||||
}
|
||||
|
||||
// Define some variables (from constants) that the language files can use in the translation:
|
||||
// Define some variables (from constants) that the language files
|
||||
// can use in the translation:
|
||||
|
||||
$PROJECT = PROJECT;
|
||||
|
||||
|
||||
if (file_exists($lang_language_dir.$lang_compiled_dir."language_interface.inc")){
|
||||
require_once($lang_language_dir.$lang_compiled_dir."language_interface.inc");
|
||||
|
||||
// Make a list of languages which the user prefers
|
||||
// (by looking at cookies and browser settings)
|
||||
// cookies have highest priority.
|
||||
|
||||
if (isset($_COOKIE['lang'])){
|
||||
$language_string = $_COOKIE['lang'].",";
|
||||
} else {
|
||||
$language_string = '';
|
||||
}
|
||||
if (isset($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"])) {
|
||||
$language_string .= strtolower($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);
|
||||
}
|
||||
|
||||
// Find out which language to use by iterating trough list
|
||||
// The list is commaseperated, so split it into an array of the following type:
|
||||
// Array (
|
||||
// [0] => da
|
||||
// [1] => en-us;q=0.7
|
||||
// [2] => en;q=0.3
|
||||
// )
|
||||
|
||||
$client_languages=explode(",",$language_string);
|
||||
|
||||
//Now a language is either defined as primary-secondary or merely primary
|
||||
//it can also have a quality attribute set - which orders the languages in a user
|
||||
//preffered ordering. Since this is usally the same order as the array indices
|
||||
//we just ignore this attribute. (TODO: don't ignore this attribute)
|
||||
//A missing quality attribute means q=1
|
||||
|
||||
require_once($lang_language_dir.$lang_compiled_dir.$lang_project_default.".po.inc");
|
||||
//Always include the project default as fallback
|
||||
for ($i=sizeof($client_languages)-1;$i>=0;$i--){
|
||||
//Now for each language that the client requests
|
||||
if ((strlen($client_languages[$i])>2) && (substr($client_languages[$i],2,1)=="_" || substr($client_languages[$i],2,1)=="-")){
|
||||
//If this is defined as primary-secondary
|
||||
$language = substr(
|
||||
$client_languages[$i],0,2)."_".strtoupper(substr($client_languages[$i],3,2)
|
||||
);
|
||||
//represent it as xx_YY
|
||||
} else {
|
||||
$language = substr($client_languages[$i],0,2);
|
||||
//else just use xx
|
||||
}
|
||||
if (file_exists($lang_language_dir.$lang_compiled_dir.$language.".po.inc")) {
|
||||
//If we have the language, include it
|
||||
//echo "[$language]";
|
||||
require($lang_language_dir.$lang_compiled_dir.$language.".po.inc");
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!file_exists($lang_language_dir.$lang_compiled_dir."language_interface.inc")){
|
||||
language_log("Could not load language interface.",2);
|
||||
echo "ERROR: Could not load language interface. This is a fatal error, exiting.";
|
||||
echo "ERROR: Could not load language interface.
|
||||
This is a fatal error, exiting.
|
||||
";
|
||||
flush;
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once($lang_language_dir.$lang_compiled_dir."language_interface.inc");
|
||||
|
||||
// Make a list of languages which the user prefers
|
||||
// (by looking at cookies and browser settings)
|
||||
// cookies have highest priority.
|
||||
|
||||
if (isset($_COOKIE['lang'])){
|
||||
$language_string = $_COOKIE['lang'].",";
|
||||
} else {
|
||||
$language_string = '';
|
||||
}
|
||||
if (isset($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"])) {
|
||||
$language_string .= strtolower($HTTP_SERVER_VARS["HTTP_ACCEPT_LANGUAGE"]);
|
||||
}
|
||||
|
||||
// Find out which language to use by iterating trough list
|
||||
// The list is commaseperated, so split it into an array of the following type:
|
||||
// Array (
|
||||
// [0] => da
|
||||
// [1] => en-us;q=0.7
|
||||
// [2] => en;q=0.3
|
||||
// )
|
||||
|
||||
$client_languages=explode(",",$language_string);
|
||||
|
||||
// A language is either defined as primary-secondary or merely primary.
|
||||
// It can also have a quality attribute set,
|
||||
// which orders the languages in a user preferred ordering.
|
||||
// Since this is usally the same order as the array indices
|
||||
// we just ignore this attribute (TODO: don't ignore this attribute)
|
||||
// A missing quality attribute means q=1
|
||||
|
||||
// Always include the project default as fallback
|
||||
//
|
||||
require_once(
|
||||
$lang_language_dir.$lang_compiled_dir.$lang_project_default.".po.inc"
|
||||
);
|
||||
$language_in_use = $lang_project_default;
|
||||
|
||||
// loop over languages that the client requests
|
||||
//
|
||||
for ($i=sizeof($client_languages)-1;$i>=0;$i--) {
|
||||
if ((strlen($client_languages[$i])>2)
|
||||
&& (substr($client_languages[$i],2,1)=="_" || substr($client_languages[$i],2,1)=="-"))
|
||||
{
|
||||
// If this is defined as primary-secondary, represent it as xx_YY
|
||||
//
|
||||
$language = substr(
|
||||
$client_languages[$i],0,2)."_".strtoupper(substr($client_languages[$i],3,2)
|
||||
);
|
||||
} else {
|
||||
// else just use xx
|
||||
//
|
||||
$language = substr($client_languages[$i],0,2);
|
||||
}
|
||||
// If we have a translation for the language, include it
|
||||
//
|
||||
if (file_exists($lang_language_dir.$lang_compiled_dir.$language.".po.inc")) {
|
||||
require($lang_language_dir.$lang_compiled_dir.$language.".po.inc");
|
||||
$language_in_use = $language;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// If you include this file, $language_in_use is now set
|
||||
// to the language actually being used
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue