From a4380ee9a66e8256572fa1e0a0b1568b89747268 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 14 Oct 2008 21:40:14 +0000 Subject: [PATCH] - web: make some things in sample front page translatable. TODO: make them all translatable. - manager: compile fix for Linux svn path=/trunk/boinc/; revision=16207 --- checkin_notes | 16 +++++++++++ client/client_types.h | 7 +++-- clientgui/AsyncRPC.cpp | 4 ++- doc/index.php | 1 + html/inc/translation.inc | 57 +++++++++++++++++--------------------- html/user/sample_index.php | 11 ++++---- 6 files changed, 56 insertions(+), 40 deletions(-) diff --git a/checkin_notes b/checkin_notes index d58346051a..0cb0580fd2 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8367,6 +8367,22 @@ David 14 Oct 2008 In addition: the client maintains a min_rpc_time which is set based on request_delay and also by various exponential backoff schemes. new_rpc_delay now overrides this as well, in the same sense. + client/ cs_scheduler.cpp work_fetch.cpp + +David 14 Oct 2008 + - web: make some things in sample front page translatable. + TODO: make them all translatable. + - manager: compile fix for Linux + + client/ + client_types.h + clientgui/ + AsyncRPC.cpp + html/ + inc/ + translation.inc + user/ + sample_index.php diff --git a/client/client_types.h b/client/client_types.h index 9530e65bce..c3ac78eff8 100644 --- a/client/client_types.h +++ b/client/client_types.h @@ -270,6 +270,10 @@ public: /// earliest time to contact any server of this project (or zero) double min_rpc_time; void set_min_rpc_time(double future_time, const char* reason); + /// if nonzero, specifies a time when another scheduler RPC + /// should be done (as requested by server). + /// An RPC could be done sooner than this. + double next_rpc_time; /// returns true if min_rpc_time > now bool waiting_until_min_rpc_time(); /// need to fetch and parse the master URL @@ -278,9 +282,6 @@ public: /// user request, propagate host CPID, time-based, etc. /// Reasons are enumerated in scheduler_op.h int sched_rpc_pending; - /// if nonzero, specifies a time when another scheduler RPC - /// should be done (as requested by server) - double next_rpc_time; /// we need to call request_work_fetch() when a project /// transitions from being backed off to not. /// This (slightly misnamed) keeps track of whether this diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp index d0eda98275..207b598a9e 100755 --- a/clientgui/AsyncRPC.cpp +++ b/clientgui/AsyncRPC.cpp @@ -764,7 +764,8 @@ void CMainDocument::HandleCompletedRPC() { pFrame->ProcessEvent(event); } } - + +#if defined(__WXMSW__) || defined(__WXMAC__) if (m_bNeedTaskBarRefresh && !m_bWaitingForRPC) { m_bNeedTaskBarRefresh = false; CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon(); @@ -774,6 +775,7 @@ void CMainDocument::HandleCompletedRPC() { pTaskbar->ProcessEvent(event); } } +#endif // CachedMessageUpdate() does not do any RPCs, so it is safe here if (current_rpc_request.rpcType == RPC_TYPE_ASYNC_WITH_UPDATE_MESSAGE_LIST_AFTER) { diff --git a/doc/index.php b/doc/index.php index 501b016461..f067acf8c4 100644 --- a/doc/index.php +++ b/doc/index.php @@ -146,6 +146,7 @@ function show_other() {
  • Testing
  • Documentation +
  • Software development
  • APIs for add-on software
  • Personnel and contributors
  • Message boards diff --git a/html/inc/translation.inc b/html/inc/translation.inc index 377376ef80..f26b77983d 100644 --- a/html/inc/translation.inc +++ b/html/inc/translation.inc @@ -62,26 +62,26 @@ function buildLanguages($langdir,$transdir,$compdir,$append=false){ if ($dh = opendir($langdir.$transdir)) { while (($file = readdir($dh)) !== false) { if ($file==".." or $file=="."){ - // Skip parent and current dir + // Skip parent and current dir } else if (substr($file,-3)==".po"){ // and only do files ending in .po language_log("-------------Compiling $transdir$file------------",0); $language = parseLanguage( $langdir.$transdir.$file, $interface - ); - if (!$language){ - language_log( - "WARNING: Could not parse language ".$file - ); - continue; - } + ); + if (!$language){ + language_log( + "WARNING: Could not parse language ".$file + ); + continue; + } if (!$fh = fopen($langdir.$compdir.$file.".inc",$append?"a":"w")) { language_log( "ERROR: could not access $langdir $compdir - please check permissions",2 ); exit; } - fwrite($fh, " $value){ if ($value !== "") { //Skip if the msgstr is empty @@ -133,7 +133,7 @@ function parseLanguage($file){ // Get the last token if ($current_token && $current_token_text){ - $output[$current_token]=$current_token_text; + $output[$current_token]=$current_token_text; } return $output; } @@ -156,16 +156,16 @@ function tra($text /* ...arglist... */){ // Find the string in the user's language foreach ($languages_in_use as $language){ - if ($language_lookup_array[$language][$text]){ - $text = $language_lookup_array[$language][$text]; - break; - } + if ($language_lookup_array[$language][$text]){ + $text = $language_lookup_array[$language][$text]; + break; + } } // Replace relevant substrings with given arguments for ($i = 1; $i \ No newline at end of file +?> diff --git a/html/user/sample_index.php b/html/user/sample_index.php index 48fcf0ee42..357c266b1a 100644 --- a/html/user/sample_index.php +++ b/html/user/sample_index.php @@ -63,13 +63,14 @@ function show_nav() {
  • Teams - create or join a team
  • Certificate
  • ".tra("Applications")." + -

    Community

    +

    ".tra("Community")."

    @@ -131,7 +132,7 @@ if (!$stopped) { if ($profile) { echo " -

    User of the day

    +

    ".tra("User of the day")."

    "; show_uotd($profile); echo "\n";