Ticket #1129: diff of user section.diff
File diff of user section.diff, 129.7 KB (added by , 13 years ago) |
---|
-
forum_banishment_vote.php
32 32 } 33 33 if (!$logged_in_user->prefs->privilege(S_MODERATOR)) { 34 34 // Can't moderate without being moderator 35 error_page( "You are not authorized to banish users.");35 error_page(tra("You are not authorized to banish users.")); 36 36 } 37 37 38 38 $userid = get_int('userid'); 39 39 $user = BoincUser::lookup_id($userid); 40 40 41 page_head( 'Banishment Vote');41 page_head(tra("Banishment Vote")); 42 42 43 43 echo "<form action=\"forum_banishment_vote_action.php?userid=".$userid."\" method=\"POST\">\n"; 44 44 echo form_tokens($logged_in_user->authenticator); 45 45 start_table(); 46 row1( "Banishment Vote");46 row1(tra("Banishment Vote")); 47 47 48 48 if (get_str('action')=="start") { 49 49 if (!$user) { 50 error_page( "no user");50 error_page(tra("No user with this ID found.")); 51 51 } 52 52 $x = $user->banished_until; 53 53 if ($x>time()) { 54 error_page( "User is already banished");54 error_page(tra("User is already banished")); 55 55 } 56 56 //display input that selects reason 57 57 echo "<input type=hidden name=action value=start>"; 58 58 echo "<input type=\"hidden\" name=\"userid\" value=\"".$userid."\">\n"; 59 row1("Are you sure you want to banish ".$user->name."? 60 This will prevent ".$user->name." from posting for chosen time period.<br /> 61 It should be done only if ".$user->name." 62 has consistently exhibited trollish behavior."); 59 row1(tra("Are you sure you want to banish %1?<br/>This will prevent %1 from posting for chosen time period.<br/>It should be done only if %1 has consistently exhibited trollish behavior.", $user->name)); 63 60 row2("", 64 "Select the reason category, optionally write a longer description of why the user should be banished.");65 row2( "Category",61 tra("Select the reason category, optionally write a longer description of why the user should be banished.")); 62 row2(tra("Category"), 66 63 "<select name=\"category\"> 67 <option value=\"1\"> Obscene</option>68 <option value=\"2\"> Flame/Hate mail</option>69 <option value=\"3\"> User Request</option>70 <option value=\"4\"> Other</option>64 <option value=\"1\">".tra("Obscene")."</option> 65 <option value=\"2\">".tra("Flame/Hate mail")."</option> 66 <option value=\"3\">".tra("User Request")."</option> 67 <option value=\"4\">".tra("Other")."</option> 71 68 </select>"); 72 row2( "Reason<br>Mailed if nonempty",69 row2(tra("Reason")."<br>".tra("Mailed if nonempty"), 73 70 "<textarea name=\"reason\" rows=\"10\" cols=\"80\"></textarea>"); 74 71 75 72 row2( 76 73 "", 77 "<input type=\"submit\" name=\"submit\" value=\" Proceed with vote\">"74 "<input type=\"submit\" name=\"submit\" value=\"".tra("Proceed with vote")."\">" 78 75 ); 79 76 } elseif (get_str('action')=="yes") { 80 77 vote_yes($config,$logged_in_user,$user); 81 78 } elseif (get_str('action')=="no") { 82 79 vote_no($config,$logged_in_user,$user); 83 80 } else { 84 error_page( 81 error_page("Unknown action"); 85 82 } 86 83 87 88 84 end_table(); 89 85 90 86 echo "</form>"; -
forum_post.php
37 37 $forum = BoincForum::lookup_id($forumid); 38 38 39 39 if (!user_can_create_thread($logged_in_user, $forum)) { 40 error_page( 41 "Only project admins may create a thread here. 42 However, you may reply existing threads." 43 ); 40 error_page(tra("Only project admins may create a thread here. However, you may reply existing threads.")); 44 41 } 45 42 check_post_access($logged_in_user, $forum); 46 43 … … 60 57 } 61 58 check_tokens($logged_in_user->authenticator); 62 59 if (!akismet_check($logged_in_user, $content)) { 63 $warning = "Your message was flagged as spam by the Akismet 64 anti-spam system. Please modify your text and try again. 65 "; 60 $warning = tra("Your message was flagged as spam by the Akismet anti-spam system. Please modify your text and try again."); 66 61 $preview = tra("Preview"); 67 62 } else { 68 63 $thread = create_thread( … … 72 67 } 73 68 } 74 69 75 page_head( 'Create new thread','','','', $bbcode_js);70 page_head(tra("Create new thread"),'','','', $bbcode_js); 76 71 show_forum_header($logged_in_user); 77 72 78 73 if ($warning) { … … 107 102 $body_help = ""; 108 103 109 104 if ($content && !$title) { 110 $submit_help = "<br /><font color=\"red\"> Remember to add a title</font>";105 $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>"; 111 106 } 112 107 113 108 if ($force_title && $title){ … … 129 124 } 130 125 131 126 if (is_news_forum($forum)) { 132 row2("", "<input name=export type=checkbox> Show this item as a Notice in the BOINC Manager<br><span class=note>Do so only for items likely to be of interest to all volunteers</span>");127 row2("", "<input name=export type=checkbox>".tra("Show this item as a Notice in the BOINC Manager")."<br><span class=note>".tra("Do so only for items likely to be of interest to all volunteers.")."</span>"); 133 128 } 134 129 row2("", "<input name=\"add_signature\" value=\"add_it\" ".$enable_signature." type=\"checkbox\"> ".tra("Add my signature to this post")); 135 row2("", "<input type=\"submit\" name=\"preview\" value=\"".tra("Preview")."\"> <input type=\"submit\" value=\" OK\">");130 row2("", "<input type=\"submit\" name=\"preview\" value=\"".tra("Preview")."\"> <input type=\"submit\" value=\"".tra("OK")."\">"); 136 131 137 132 138 133 end_table(); -
edit_passwd_action.php
30 30 $passwd2 = post_str("passwd2"); 31 31 32 32 if ($passwd != $passwd2) { 33 error_page( "New passwords are different");33 error_page(tra("New passwords are different")); 34 34 } 35 35 36 36 $config = get_config(); … … 38 38 if (!$min_passwd_length) $min_passwd_length = 6; 39 39 40 40 if (!is_ascii($passwd)) { 41 error_page( "Passwords may only include ASCII characters.");41 error_page(tra("Passwords may only include ASCII characters.")); 42 42 } 43 43 44 44 if (strlen($passwd)<$min_passwd_length) { 45 error_page( 46 "New password is too short: 47 minimum password length is $min_passwd_length characters." 48 ); 45 error_page(tra("New password is too short: minimum password length is %1 characters.", $min_passwd_length)); 49 46 } 50 47 if ($auth) { 51 48 $user = lookup_user_auth($auth); 52 49 if (!$user) { 53 error_page( "Invalid account key");50 error_page(tra("Invalid account key")); 54 51 } 55 52 } else { 56 53 $user = lookup_user_email_addr($email_addr); 57 54 if (!$user) { 58 error_page( "No account with that email address was found");55 error_page(tra("No account with that email address was found")); 59 56 } 60 57 $passwd_hash = md5($old_passwd.$email_addr); 61 58 if ($user->passwd_hash != $passwd_hash) { 62 error_page( "Invalid password");59 error_page(tra("Invalid password")); 63 60 } 64 61 } 65 62 66 page_head( "Change password");63 page_head(tra("Change password")); 67 64 $passwd_hash = md5($passwd.$user->email_addr); 68 65 $result = $user->update("passwd_hash='$passwd_hash'"); 69 66 if ($result) { 70 echo "Your password has been changed.";67 echo tra("Your password has been changed."); 71 68 } else { 72 echo " 73 We can't update your password due to a database problem. 74 Please try again later. 75 "; 69 echo tra("We can't update your password due to a database problem. Please try again later."); 76 70 } 77 71 78 72 page_tail(); -
login_action.php
29 29 30 30 // check for email/password case 31 31 // 32 $email_addr = strtolower(s trip_tags(post_str("email_addr", true)));32 $email_addr = strtolower(sanitize_tags(post_str("email_addr", true))); 33 33 $passwd = post_str("passwd", true); 34 34 35 35 if ($email_addr && $passwd) { -
delete_account.php
54 54 if ($cmd == "delete") { 55 55 $retval = delete_account($user); 56 56 if (!$retval) { 57 error_page( "Couldn't delete account");57 error_page(tra("Couldn't delete account")); 58 58 } else { 59 page_head("Account deleted"); 60 echo " 61 Your account has been deleted. 62 "; 59 page_head(tra("Account deleted")); 60 echo tra("Your account has been deleted."); 63 61 page_tail(); 64 62 } 65 63 } else { 66 page_head( "Confirm delete account");64 page_head(tra("Confirm delete account")); 67 65 echo " 68 66 <table><tr><td> 69 Deleting your account will remove all of your70 71 72 73 to this account. 67 ".tra("Deleting your account will remove all of your 68 personal information from our servers, 69 including your profile and message-board posts. 70 No jobs will be issued to any computers attached 71 to this account.")." 74 72 <p> 75 <b> This cannot be undone.76 Once your account has been deleted, you cannot get it back. 73 <b>".tra("This cannot be undone. 74 Once your account has been deleted, you cannot get it back.")." 77 75 <p> 78 Are you sure you want to delete your account?</b>76 ".tra("Are you sure you want to delete your account?")."</b> 79 77 <p> 80 78 "; 81 show_button("delete_account.php?cmd=delete", "Yes", "Delete this account");82 show_button("index.php", "No", "Do not delete this account");79 show_button("delete_account.php?cmd=delete", tra("Yes"), tra("Delete this account")); 80 show_button("index.php", tra("No"), tra("Do not delete this account")); 83 81 echo "</td></tr></table>\n"; 84 82 85 83 page_tail(); -
delete_profile.php
20 20 require_once("../inc/util.inc"); 21 21 require_once("../inc/profile.inc"); 22 22 23 check_get_args(array(" delete"));23 check_get_args(array("cmd")); 24 24 25 25 $user = get_logged_in_user(); 26 26 27 if (isset($_POST['delete']) && $_POST['delete']) { 27 $cmd = get_str("cmd", true); 28 29 if ($cmd == "delete") { 28 30 $result = delete_profile($user); 29 31 if (!$result) { 30 error_page( "couldn't delete profile - please try again later");32 error_page(tra("couldn't delete profile - please try again later")); 31 33 } 32 34 delete_user_pictures($user->id); 33 page_head( "Delete Confirmation");35 page_head(tra("Delete Confirmation")); 34 36 $user->update("has_profile=0"); 35 echo "Your profile has been deleted<br>";37 echo tra("Your profile has been deleted.")."<br>"; 36 38 page_tail(); 37 39 exit(); 38 40 } 39 41 40 page_head( "Profile delete confirmation");42 page_head(tra("Profile delete confirmation")); 41 43 42 echo "<form action=", $_SERVER['PHP_SELF'], " method=\"POST\">";43 44 44 echo " 45 <h2> Are you sure?</h2><p>46 Deleted profiles are gone forever and cannot be recovered --47 48 if you want another profile in the future. 45 <h2>".tra("Are you sure?")."</h2><p> 46 ".tra("Deleted profiles are gone forever and cannot be recovered -- 47 you will have to start from scratch 48 if you want another profile in the future.")." 49 49 <p> 50 If you're sure, click 'Delete' 51 to remove your profile from our database. 52 50 ".tra("If you're sure, click 'Delete' 51 to remove your profile from our database.")." 53 52 <p> 54 <input type=submit name=delete value=Delete>55 </form>56 53 "; 57 54 show_button("delete_profile.php?cmd=delete", tra("Yes"), tra("Delete my profile")); 55 show_button("index.php", tra("No"), tra("Do not delete my profile")); 58 56 page_tail(); 59 57 60 58 ?> -
ffmail_action.php
19 19 require_once("../project/project.inc"); 20 20 require_once("../inc/email.inc"); 21 21 22 $array_get_args = array("preview", "uname", "uemail", "comment", "action"); 23 for ($i=0; $i<5; $i++) { 24 $array_get_args[]= "n$i"; 25 $array_get_args[]= "e$i"; 26 } 27 check_get_args($array_get_args); 28 22 29 function replace($toname, $comment, $fromname, $template) { 23 30 $pat = array( 24 31 '/<toname\/>/', … … 44 51 45 52 $action = get_str('action'); 46 53 if ($action=='Preview') { 47 page_head( 'Email preview');48 echo "Your email will appear as follows:54 page_head(tra("Email preview")); 55 echo tra("Your email will appear as follows:")." 49 56 <hr> 50 57 "; 51 58 echo replace("[Friend's name]", $comment, $uname, $html); … … 54 61 55 62 echo " 56 63 <hr> 57 <b><a href=ffmail_action.php$args> Send email</a></b>64 <b><a href=ffmail_action.php$args>".tra("Send email")."</a></b> 58 65 <p> 59 [ Use your browser's back button to return to message form]66 [".tra("Use your browser's back button to return to message form")."] 60 67 "; 61 68 page_tail(); 62 69 } else { 63 page_head( "Sending emails");70 page_head(tra("Sending emails")); 64 71 $found = false; 65 72 for ($i=0; $i<5; $i++) { 66 73 $n = get_str("n$i", true); … … 81 88 $mail->Host = $PHPMAILER_HOST; 82 89 $mail->Mailer = $PHPMAILER_MAILER; 83 90 if ($mail->Send()) { 84 echo "<br> email sent successfully to $e\n";91 echo "<br>".tra("email sent successfully to %1", $e)."\n"; 85 92 } else { 86 echo "<br> failed to send email to $e: $mail->ErrorInfo\n";93 echo "<br>".tra("failed to send email to %1: %2", $e, $mail->ErrorInfo)."\n"; 87 94 } 88 95 } 89 96 } 90 97 if ($found) { 91 98 echo " 92 <p> 93 Thanks for telling your friends about ".PROJECT.". 94 "; 99 <p>".tra("Thanks for telling your friends about %1", PROJECT); 95 100 } else { 96 echo " 97 You forgot to enter your friends' names and/or email addresses; 98 Please <a href=ffmail_form.php>return to the form</a> 99 and enter them. 100 "; 101 echo tra("You forgot to enter your friends' names and/or email addresses; Please %1return to the form%2 and enter them.", "<a href=ffmail_form.php>", "</a>"); 101 102 } 102 103 page_tail(); 103 104 } -
donations.php
21 21 check_get_args(array()); 22 22 23 23 if (!defined("PAYPAL_ADDRESS")) { 24 error_page( "This project is not accepting donations.");24 error_page(tra("This project is not accepting donations.")); 25 25 } 26 26 27 27 db_init(); … … 31 31 $user_id = $logged_in_user->id; 32 32 } 33 33 34 page_head( PROJECT." donations");34 page_head(tra("%1 donations", PROJECT)); 35 35 36 36 if (function_exists("donations_intro")) { 37 37 donations_intro(); 38 38 } else { 39 echo "<div> This project is accepting donations via40 <a href=\"http://www.paypal.com/\">PayPal</a>.</div>39 echo "<div>".tra("This project is accepting donations via 40 %1.", "<a href=\"http://www.paypal.com/\">PayPal</a>")."</div> 41 41 <div class=\"smalltext\"> 42 To donate, fill in the amount you want to donate using the field below.42 ".tra("To donate, fill in the amount you want to donate using the field below. 43 43 PayPal is accepting multiple currencies 44 44 (Canadian Dollars, Euros, Pounds Sterling, U.S. Dollars, 45 45 Yen, Australian Dollars, New Zealand Dollars, … … 49 49 You can use included currency converter 50 50 to see the donation amount equivalent in different currencies 51 51 (please note that the rates are only estimates 52 and the actual amount may differ). </div>52 and the actual amount may differ).")."</div> 53 53 "; 54 54 } 55 55 … … 313 313 $estimated .= "</select>\n"; 314 314 $estimated .= "<input name=\"outV\" value=\"0.00\" style=\"text-align: right; width: 80px;\" disabled=\"disabled\">\n"; 315 315 316 echo row2( "Amount you would like to donate", $amount);317 echo row2( "Estimated value in", $estimated);316 echo row2(tra("Amount you would like to donate"), $amount); 317 echo row2(tra("Estimated value in"), $estimated); 318 318 if ($user_id) { 319 echo row2("Anonymous donation<br><span class=\"smalltext\">Select this if you dont want your name and account number displayed in 320 donator lists.<br>If not checked, you will be recorded as user ID ".$user_id." (".$logged_in_user->name.")</span>", 321 "<input type=\"checkbox\" name=\"anonymous\" id=\"anonymous\" value=\"1\"><label for=\"anonymous\">Yes</label>"); 319 $tmp_user_name = $user_id." (".$logged_in_user->name.")"; 320 echo row2(tra("Anonymous donation")."<br><span class=\"smalltext\">".tra("Select this if you dont want your name and account number displayed in 321 donator lists.<br>If not checked, you will be recorded as user ID %1", $tmp_user_name)."</span>", 322 "<input type=\"checkbox\" name=\"anonymous\" id=\"anonymous\" value=\"1\"><label for=\"anonymous\">".tra("Yes")."</label>"); 322 323 } else { 323 echo row2( "Anonymous donation<br><span class=\"smalltext\">To assign the donation with your user ID, please log in.",324 echo row2(tra("Anonymous donation")."<br><span class=\"smalltext\">".tra("To assign the donation with your user ID, please log in."), 324 325 "<input type=\"checkbox\" name=\"anonymous\" id=\"anonymous\" value=\"1\" checked=\"checked\" disabled=\"disabled\"> 325 <label for=\"anonymous\"> Yes</label>");326 <label for=\"anonymous\">".tra("Yes")."</label>"); 326 327 } 327 echo row2("", "<input type=\"submit\" value=\" Proceed\">");328 echo row1( "Donations are accepted through<br><img src=\"img/paypal_logo.png\" alt=\"PayPal\">");328 echo row2("", "<input type=\"submit\" value=\"".tra("Proceed")."\">"); 329 echo row1(tra("Donations are accepted through")."<br><img src=\"img/paypal_logo.png\" alt=\"PayPal\">"); 329 330 end_table(); 330 331 echo "</form>\n"; 331 332 -
host_delete.php
28 28 $hostid = get_int("hostid"); 29 29 $host = BoincHost::lookup_id($hostid); 30 30 if (!$host || $host->userid != $user->id) { 31 error_page( "We have no record of that computer.");31 error_page(tra("We have no record of that computer.")); 32 32 } 33 33 34 34 $nresults = host_nresults($host); 35 35 if ($nresults == 0) { 36 36 $host->delete(); 37 37 } else { 38 error_page( 39 "You can not delete our record of this computer because our 40 database still contains work for it. 41 You must wait a few days until the work for this computer 42 has been deleted from the project database." 43 ); 38 error_page(tra("You can not delete our record of this computer because our database still contains work for it. You must wait a few days until the work for this computer has been deleted from the project database.")); 44 39 } 45 page_head("Delete record of computer"); 46 echo " 47 Record deleted. 48 <p><a href=hosts_user.php>Return to list of your computers</a> 40 page_head(tra("Delete record of computer")); 41 echo tra("Record deleted.")." 42 <p><a href=hosts_user.php>".tra("Return to list of your computers")."</a> 49 43 "; 50 44 page_tail(); 51 45 -
forum_moderate_thread.php
24 24 BoincForumPrefs::lookup($logged_in_user); 25 25 26 26 if (!get_str('action')) { 27 error_page(" noaction");27 error_page("unknown action"); 28 28 } 29 29 $thread = BoincThread::lookup_id(get_int('thread')); 30 30 $forum = BoincForum::lookup_id($thread->forum); 31 31 32 32 if (!is_moderator($logged_in_user, $forum)) { 33 error_page( "not authorized");33 error_page(tra("not authorized")); 34 34 } 35 35 36 page_head( "Moderate thread '$thread->title'");36 page_head(tra("Moderate thread '%1'", $thread->title)); 37 37 38 38 echo "<form action=forum_moderate_thread_action.php?thread=$thread->id method=POST>\n"; 39 39 echo form_tokens($logged_in_user->authenticator); … … 45 45 case 'lock': 46 46 echo "<input type=hidden name=action value=$action>"; 47 47 row2("", 48 "Select the reason category, or write a longer description of why you're hiding or locking the thread; then press OK."48 tra("Select the reason category, or write a longer description of why you're hiding or locking the thread; then press OK.") 49 49 ); 50 row2( "Category",50 row2(tra("Category"), 51 51 "<select name=\"category\"> 52 <option value=\"1\"> Obscene</option>53 <option value=\"2\"> Flame/Hate mail</option>54 <option value=\"3\"> Commercial spam</option>55 <option value=\"4\"> Other</option>52 <option value=\"1\">".tra("Obscene")."</option> 53 <option value=\"2\">".tra("Flame/Hate mail")."</option> 54 <option value=\"3\">".tra("Commercial spam")."</option> 55 <option value=\"4\">".tra("Other")."</option> 56 56 </select>" 57 57 ); 58 58 break; … … 69 69 } 70 70 $selectbox .= '</option>'; 71 71 72 row2( "Current forum", $forum->title);73 row2( "Destination forum", $selectbox);72 row2(tra("Current forum"), $forum->title); 73 row2(tra("Destination forum"), $selectbox); 74 74 break; 75 75 case 'title': 76 76 echo "<input type=hidden name=action value=title>"; 77 row2( "New title:",77 row2(tra("New title:"), 78 78 "<input size=80 name=\"newtitle\" value=\"".htmlspecialchars($thread->title)."\">" 79 79 ); 80 80 break; … … 82 82 error_page("Unknown action"); 83 83 } 84 84 85 row2( "Reason<br><span class=note>Mailed if nonempty</span>",85 row2(tra("Reason")."<br><span class=note>".tra("Mailed if nonempty")."</span>", 86 86 "<textarea rows=10 cols=80 name=\"reason\"></textarea>" 87 87 ); 88 88 89 89 row2( 90 90 "", 91 "<input type=\"submit\" name=\"submit\" value=\" OK\">"91 "<input type=\"submit\" name=\"submit\" value=\"".tra("OK")."\">" 92 92 ); 93 93 94 94 end_table(); -
explain_state.php
24 24 25 25 switch($field) { 26 26 case "result_server_state": 27 page_head( "Server states");27 page_head(tra("Server states")); 28 28 echo " 29 29 <p> 30 A tasks's <b>server state</b> indicates 31 whether the task has been sent to a computer, 32 and if so whether the computer has finished it. 33 Possible values are: 30 ".tra("A tasks's <b>server state</b> indicates whether the task has been sent to a computer, and if so whether the computer has finished it. Possible values are:")." 34 31 <p> 35 32 "; 36 33 start_table(); 37 row2_plain("<b>Inactive</b>", 38 "The task is not ready to send 39 (for example, because its input files are unavailable)" 34 row2_plain("<b>".tra("Inactive")."</b>", 35 tra("The task is not ready to send (for example, because its input files are unavailable)") 40 36 ); 41 row2_plain("<b> Unsent</b>",42 "The task is ready to send, but hasn't been sent yet."37 row2_plain("<b>".tra("Unsent")."</b>", 38 tra("The task is ready to send, but hasn't been sent yet.") 43 39 ); 44 row2_plain("<b> In Progress</b>",45 "The task has been sent; waiting for completion."40 row2_plain("<b>".tra("In Progress")."</b>", 41 tra("The task has been sent; waiting for completion.") 46 42 ); 47 row2_plain("<b>Over</b>", 48 "The task has been sent to a computer and either 49 it has timed out or the computer has reported its completion." 43 row2_plain("<b>".tra("Over")."</b>", 44 tra("The task has been sent to a computer and either it has timed out or the computer has reported its completion.") 50 45 ); 51 46 break; 52 47 53 48 case "result_outcome": 54 page_head( "Outcomes");49 page_head(tra("Outcomes")); 55 50 echo " 56 51 <p> 57 A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. 58 Possible values are: 52 ".tra("A tasks's <b>outcome</b> is defined if its server state is <b>over</b>. Possible values are:")." 59 53 <p> 60 54 "; 61 55 start_table(); 62 row2_plain("<b>Unknown</b>", 63 "The task was sent to a computer, but the computer has not 64 yet completed the work and reported the outcome." 56 row2_plain("<b>".tra("Unknown")."</b>", 57 tra("The task was sent to a computer, but the computer has not yet completed the work and reported the outcome.") 65 58 ); 66 row2_plain("<b> Success</b>",67 "A computer completed and reported the task successfully."59 row2_plain("<b>".tra("Success")."</b>", 60 tra("A computer completed and reported the task successfully.") 68 61 ); 69 row2_plain("<b>Couldn't send</b>", 70 "The server wasn't able to send the task to a computer 71 (perhaps because its resource requirements were too large)" 62 row2_plain("<b>".tra("Couldn't send")."</b>", 63 tra("The server wasn't able to send the task to a computer (perhaps because its resource requirements were too large)") 72 64 ); 73 row2_plain("<b> Client error</b>",74 "The task was sent to a computer and an error occurred."65 row2_plain("<b>".tra("Client error")."</b>", 66 tra("The task was sent to a computer and an error occurred.") 75 67 ); 76 row2_plain("<b>No reply</b>", 77 "The task was sent to a computer 78 and no reply was received within the time limit." 68 row2_plain("<b>".tra("No reply")."</b>", 69 tra("The task was sent to a computer and no reply was received within the time limit.") 79 70 ); 80 row2_plain("<b>Didn't need</b>", 81 "The task wasn't sent to a computer because 82 enough other tasks were completed for this workunit." 71 row2_plain("<b>".tra("Didn't need")."</b>", 72 tra("The task wasn't sent to a computer because enough other tasks were completed for this workunit.") 83 73 ); 84 row2_plain("<b>Validate error</b>", 85 "The task was reported but could not be validated, 86 typically because the output files were lost on the server." 74 row2_plain("<b>".tra("Validate error")."</b>", 75 tra("The task was reported but could not be validated, typically because the output files were lost on the server.") 87 76 ); 88 77 break; 89 78 90 79 case "result_client_state": 91 page_head("Client states"); 92 echo "<p>A result's <b>client state</b> 93 indicates the stage of processing at which an error occurred. 80 page_head(tra("Client states")); 81 echo "<p>".tra("A result's <b>client state</b> indicates the stage of processing at which an error occurred.")." 94 82 <p> 95 83 "; 96 84 start_table(); 97 row2_plain("<b> New</b>",98 "The computer has not yet completed the task."85 row2_plain("<b>".tra("New")."</b>", 86 tra("The computer has not yet completed the task.") 99 87 ); 100 row2_plain("<b> Done</b>",101 "The computer completed the task successfully."88 row2_plain("<b>".tra("Done")."</b>", 89 tra("The computer completed the task successfully.") 102 90 ); 103 row2_plain("<b> Downloading</b>",104 "The computer couldn't download the application or input files."91 row2_plain("<b>".tra("Downloading")."</b>", 92 tra("The computer couldn't download the application or input files.") 105 93 ); 106 row2_plain("<b> Computing</b>",107 "An error occurred during computation."94 row2_plain("<b>".tra("Computing")."</b>", 95 tra("An error occurred during computation.") 108 96 ); 109 row2_plain("<b> Uploading</b>",110 "The computer couldn't upload the output files."97 row2_plain("<b>".tra("Uploading")."</b>", 98 tra("The computer couldn't upload the output files.") 111 99 ); 112 100 break; 113 101 114 102 case "result_time": 115 page_head( "Time reported and deadline");103 page_head(tra("Time reported and deadline")); 116 104 echo " 117 105 <p> 118 A task's <b>Time reported or deadline</b> field depends 119 on whether the task has been reported yet: 106 ".tra("A task's <b>Time reported or deadline</b> field depends on whether the task has been reported yet:")." 120 107 <p> 121 108 "; 122 109 start_table(); 123 row2( "Already reported", "The date/time it was reported");124 row2( "Not reported yet, deadline in the future",125 "Deadline, shown in green."110 row2(tra("Already reported"), tra("The date/time it was reported")); 111 row2(tra("Not reported yet, deadline in the future"), 112 tra("Deadline, shown in green.") 126 113 ); 127 row2( "Not reported yet, deadline in the past",128 "Deadline, shown in red."114 row2(tra("Not reported yet, deadline in the past"), 115 tra("Deadline, shown in red.") 129 116 ); 130 117 break; 131 118 132 119 default: 133 page_head( "Unknown field");120 page_head(tra("Unknown field")); 134 121 } 135 122 136 123 end_table(); -
create_account_action.php
23 23 include_once("../inc/recaptchalib.php"); 24 24 25 25 function show_error($str) { 26 page_head( "Can't create account");26 page_head(tra("Can't create account")); 27 27 echo "$str<br>\n"; 28 28 echo BoincDb::error(); 29 echo "<p> Click your browser's <b>Back</b> button to try again.\n<p>\n";29 echo "<p>".tra("Click your browser's <b>Back</b> button to try again.")."\n</p>\n"; 30 30 page_tail(); 31 31 exit(); 32 32 } 33 33 34 34 $config = get_config(); 35 35 if (parse_bool($config, "disable_account_creation")) { 36 page_head( "Account creation is disabled");36 page_head(tra("Account creation is disabled")); 37 37 echo " 38 <h3> Account creation is disabled</h3>39 Sorry, this project has disabled the creation of new accounts.40 Please try again later. 38 <h3>".tra("Account creation is disabled")."</h3> 39 ".tra("Sorry, this project has disabled the creation of new accounts. 40 Please try again later.")." 41 41 "; 42 42 exit(); 43 43 } … … 48 48 $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"] 49 49 ); 50 50 if (!$resp->is_valid) { 51 echo "" . tra("Your reCAPTCHA response was not correct. Please try again."). "";51 echo tra("Your reCAPTCHA response was not correct. Please try again."); 52 52 return; 53 53 } 54 54 } … … 61 61 $team = lookup_team($teamid); 62 62 $clone_user = lookup_user_id($team->userid); 63 63 if (!$clone_user) { 64 echo "User $userid not found"; 65 exit(); 64 error_page("User $userid not found"); 66 65 } 67 66 $project_prefs = $clone_user->project_prefs; 68 67 } else { … … 82 81 83 82 $new_name = post_str("new_name"); 84 83 if (strlen($new_name)==0) { 85 show_error( "You must supply a name for your account");84 show_error(tra("You must supply a name for your account")); 86 85 } 87 if ($new_name != s trip_tags($new_name)) {88 show_error( "HTML tags not allowed in name");86 if ($new_name != sanitize_tags($new_name)) { 87 show_error(tra("HTML tags not allowed in name")); 89 88 } 90 89 91 $new_email_addr = post_str("new_email_addr"); 92 $new_email_addr = strtolower($new_email_addr); 90 $new_email_addr = strtolower(post_str("new_email_addr")); 93 91 if (!is_valid_email_addr($new_email_addr)) { 94 show_error("Invalid email address: 95 you must enter a valid address of the form 96 name@domain" 97 ); 92 show_error(tra("Invalid email address: you must enter a valid address of the form name@domain")); 98 93 } 99 94 $user = lookup_user_email_addr($new_email_addr); 100 95 if ($user) { 101 show_error( "There's already an account with that email address.");96 show_error(tra("There's already an account with that email address.")); 102 97 } 103 98 104 99 $passwd = post_str("passwd"); 105 100 $passwd2 = post_str("passwd2"); 106 101 if ($passwd != $passwd2) { 107 show_error( "New passwords are different");102 show_error(tra("New passwords are different")); 108 103 } 109 104 110 105 $min_passwd_length = parse_config($config, "<min_passwd_length>"); 111 106 if (!$min_passwd_length) $min_passwd_length = 6; 112 107 113 108 if (!is_ascii($passwd)) { 114 show_error( "Passwords may only include ASCII characters.");109 show_error(tra("Passwords may only include ASCII characters.")); 115 110 } 116 111 117 112 if (strlen($passwd)<$min_passwd_length) { 118 113 show_error( 119 "New password is too short: 120 minimum password length is $min_passwd_length characters." 114 tra("New password is too short: minimum password length is %1 characters.", $min_passwd_length) 121 115 ); 122 116 } 123 117 … … 128 122 $country = "International"; 129 123 } 130 124 if (!is_valid_country($country)) { 131 echo "bad country"; 132 exit(); 125 error_page("bad country"); 133 126 } 134 127 135 $postal_code = post_str("postal_code", true);128 $postal_code = sanitize_tags(post_str("postal_code", true)); 136 129 137 130 $user = make_user( 138 131 $new_email_addr, $new_name, $passwd_hash, 139 132 $country, $postal_code, $project_prefs, $teamid 140 133 ); 141 134 if (!$user) { 142 show_error( "Couldn't create account");135 show_error(tra("Couldn't create account")); 143 136 } 144 137 145 138 if(defined('INVITE_CODES')) { -
forum_search.php
28 28 29 29 start_table(); 30 30 echo "<form action=\"forum_search_action.php\" method=\"post\">"; 31 row1( "Search query");32 row2( "Search for keywords:<br />33 <span class=\"smalltext\"> Posts that contain all the specified words will be displayed</span>",34 '<input type="text" style="width: 290px" name="search_keywords" size="30" /><br />35 <span class= "smalltext">For example: "screensaver freeze"</span>');36 row2( "Search for author ID:<br />37 <span class=\"smalltext\"> Only posts by this author will be displayed</span>",38 '<input type="text" style="width: 150px" name="search_author" size="10" /><br />39 <span class= "smalltext">For example: "43214"</span>');31 row1(tra("Search query")); 32 row2(tra("Search for keywords:")."<br /> 33 <span class=\"smalltext\">".tra("Posts that contain all the specified words will be displayed")."</span>", 34 "<input type=\"text\" style=\"width: 290px\" name=\search_keywords\" size=\"30\" /><br /> 35 <span class=\"smalltext\">".tra("For example: \"screensaver freeze\"")."</span>"); 36 row2(tra("Search for author ID:")."<br /> 37 <span class=\"smalltext\">".tra("Only posts by this author will be displayed")."</span>", 38 "<input type=\"text\" style=\"width: 150px\" name=\"search_author\" size=\"10\" /><br /> 39 <span class=\"smalltext\">".tra("For example: \"43214\"")."</span>"); 40 40 41 row1( "Search options");42 row2( "Search limits<br />43 <span class=\"smalltext\"> Search at most this many days back in time</span>",44 '<select name="search_max_time">45 <option value= "1">1 day</option>46 <option value= "3">3 days</option>47 <option value= "7">7 days</option>48 <option value= "15">15 days</option>49 <option value= "30" selected>30 days</option>50 <option value= "90">3 months</option>51 <option value= "180">6 months</option>52 <option value= "360">1 year</option>53 </select> ');41 row1(tra("Search options")); 42 row2(tra("Search limits")."<br /> 43 <span class=\"smalltext\">".tra("Search at most this many days back in time")."</span>", 44 "<select name=\"search_max_time\"> 45 <option value=\"1\">".tra("1 day")."</option> 46 <option value=\"3\">".tra("%1 days", "3")."</option> 47 <option value=\"7\">".tra("%1 days", "7")."</option> 48 <option value=\"15\">".tra("%1 days", "15")."</option> 49 <option value=\"30\" selected>".tra("%1 days", "30")."</option> 50 <option value=\"90\">".tra("%1 months", "3")."</option> 51 <option value=\"180\">".tra("%1 months", "6")."</option> 52 <option value=\"360\">".tra("1 year")."</option> 53 </select>"); 54 54 55 55 $forumid = null; 56 56 if (get_str("forumid",true)){ 57 57 $forumid = get_str("forumid"); 58 58 } 59 $forumlist="<option value=\"-1\"> All</option>";59 $forumlist="<option value=\"-1\">".tra("All")."</option>"; 60 60 $categories = BoincCategory::enum(); 61 61 foreach ($categories as $category) { 62 62 $forums = BoincForum::enum("parent_type=0 and category=$category->id"); … … 68 68 } 69 69 } 70 70 } 71 row2( "Forum<br />72 <span class=\"smalltext\"> Only display posts from this forum</span>",71 row2(tra("Forum")."<br /> 72 <span class=\"smalltext\">".tra("Only display posts from this forum")."</span>", 73 73 '<select name="search_forum">'.$forumlist.'</select'); 74 74 75 75 $sortlist = null; … … 80 80 $sortlist.="<option value=\"".$id."\">".$style."</option>"; 81 81 } 82 82 } 83 row2( "Sort by",83 row2(tra("Sort by"), 84 84 '<select name="search_sort">'.$sortlist.'</select'); 85 85 86 86 row1(" "); 87 row2("","<input type=\"submit\" value=\" Start the search\">");87 row2("","<input type=\"submit\" value=\"".tra("Start the search")."\">"); 88 88 echo "</form>"; 89 89 end_table(); 90 90 91 91 page_tail(); 92 exit;93 92 94 93 $cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit 95 94 ?> -
bbcode.php
20 20 21 21 check_get_args(array()); 22 22 23 page_head( "BBCode tags");23 page_head(tra("BBCode tags")); 24 24 echo "<p> 25 BBCode tags let you format text in your profile and message-board postings.25 ".tra("BBCode tags let you format text in your profile and message-board postings. 26 26 It's similar to HTML, but simpler. The tags start with a [ (where you would 27 have used < in HTML) and end with ] (where you would have used >in28 HTML). </p>";27 have used %1 in HTML) and end with ] (where you would have used %2 in 28 HTML).", "<", ">")."</p>"; 29 29 30 30 start_table(); 31 row1( "Examples");32 row2_plain("[b] Bold[/b]", "<b>Bold</b>");33 row2_plain("[i] Italic[/i]", "<i>Italic</i>");34 row2_plain("[u] Underline[/u]", "<u>Underline</u>");35 row2_plain("[size=15] Big text[/size]", "<span style=\"font-size: 15px\">Big text</span>");36 row2_plain("[color=red] Red text[/color]", "<font color=\"red\">Red text</font></li>");37 row2_plain("[url=http://google.com/] Google[/url]", "<a href=\"http://google.com/\">Google</a>");38 row2_plain("[quote] Quoted text[/quote]", "use for quoted blocks of text");39 row2_plain("[img]http://example.com/pic.jpg[/img]", "use to display an image");40 row2_plain("[code] Code snippet here[/code]", "use to display some code");41 row2_plain("[pre] Pre-formatted text[/pre]", "use to display pre-formatted (usually monospaced) text");42 row2_plain("[list]<br>* Item 1<br>*Item2<br>[/list]", "<ul><li>Item 1</li><li>Item 2</li></ul>");31 row1(tra("Examples")); 32 row2_plain("[b]".tra("Bold")."[/b]", "<b>".tra("Bold")."</b>"); 33 row2_plain("[i]".tra("Italic")."[/i]", "<i>".tra("Italic")."</i>"); 34 row2_plain("[u]".tra("Underline")."[/u]", "<u>".tra("Underline")."</u>"); 35 row2_plain("[size=15]".tra("Big text")."[/size]", "<span style=\"font-size: 15px\">".tra("Big text")."</span>"); 36 row2_plain("[color=red]".tra("Red text")."[/color]", "<font color=\"red\">".tra("Red text")."</font></li>"); 37 row2_plain("[url=http://google.com/]".tra("link to website")."[/url]", "<a href=\"http://google.com/\">".tra("link to website")."</a>"); 38 row2_plain("[quote]".tra("Quoted text")."[/quote]", tra("use for quoted blocks of text")); 39 row2_plain("[img]http://example.com/pic.jpg[/img]", tra("use to display an image")); 40 row2_plain("[code]".tra("Code snippet here")."[/code]", tra("use to display some code")); 41 row2_plain("[pre]".tra("Pre-formatted text")."[/pre]", tra("use to display pre-formatted (usually monospaced) text")); 42 row2_plain("[list]<br>* ".tra("Item 1")."<br>* ".tra("Item2")."<br>[/list]", "<ul><li>".tra("Item 1")."</li><li>".tra("Item 2")."</li></ul>"); 43 43 row2_plain("[trac]#1[/trac] or [trac]ticket:1[/trac]", 44 "use to link to Trac ticket on BOINC website: <a href=\"http://boinc.berkeley.edu/trac/ticket/1\">#1</a>");44 tra("use to link to Trac ticket on BOINC website").": <a href=\"http://boinc.berkeley.edu/trac/ticket/1\">#1</a>"); 45 45 row2_plain("[trac]wiki:WebForum[/trac]", 46 "use to link to Trac Wiki on BOINC website: <a href=\"http://boinc.berkeley.edu/trac/wiki/WebForum\">WebForum</a>");46 tra("use to link to Trac Wiki on BOINC website").": <a href=\"http://boinc.berkeley.edu/trac/wiki/WebForum\">WebForum</a>"); 47 47 row2_plain("[trac]changeset:12345[/trac]", 48 "use to link to SVN changeset on BOINC website: <a href=\"http://boinc.berkeley.edu/trac/changeset/12345\">[12345]</a>");48 tra("use to link to SVN changeset on BOINC website").": <a href=\"http://boinc.berkeley.edu/trac/changeset/12345\">[12345]</a>"); 49 49 end_table(); 50 50 51 51 echo "<p> 52 If you don't close a tag or don't specify a parameter correctly,53 the raw tag itself will display instead of the formatted text. </p>52 ".tra("If you don't close a tag or don't specify a parameter correctly, 53 the raw tag itself will display instead of the formatted text.")."</p> 54 54 "; 55 55 page_tail(); 56 56 ?> -
forum_thread.php
44 44 } 45 45 46 46 if ($threadid < 1) { 47 error_page( tra("Invalid thread ID!"));47 error_page("Invalid thread ID!"); 48 48 } 49 49 50 50 $thread = BoincThread::lookup_id($threadid); … … 66 66 if ($logged_in_user) { 67 67 remove_subscriptions_forum($logged_in_user->id, $thread->id); 68 68 } 69 error_page( 70 tra("This thread has been hidden by moderators") 71 ); 69 error_page(tra("This thread has been hidden by moderators.")); 72 70 } 73 71 } 74 72 … … 242 240 if ($thread->status) { 243 241 show_button( 244 242 "forum_thread_status.php?action=clear&id=$thread->id", 245 "Export",246 "Export this news item as a Notice"243 tra("Export"), 244 tra("Export this news item as a Notice") 247 245 ); 248 246 } else { 249 247 show_button( 250 248 "forum_thread_status.php?action=set&id=$thread->id", 251 "Don't export",252 "Don't export this news item as a Notice"249 tra("Don't export"), 250 tra("Don't export this news item as a Notice") 253 251 ); 254 252 } 255 253 } … … 259 257 <input type=\"hidden\" name=\"id\" value=\"", $thread->id, "\">" . 260 258 tra("Sort"); 261 259 echo select_from_array("sort", $thread_sort_styles, $sort_style); 262 echo "<input type=\"submit\" value=\" Sort\">260 echo "<input type=\"submit\" value=\"tra(Sort)\"> 263 261 </td></tr></table></form> 264 262 "; 265 263 -
home.php
42 42 page_head(tra("Welcome to %1", PROJECT)); 43 43 echo "<p>".tra("View and edit your account preferences using the links below.")."</p>\n"; 44 44 if ($via_web) { 45 echo " 46 <p> If you have not already done so, 47 <a href=\"http://boinc.berkeley.edu/download.php\">download BOINC client software</a>.</p> 48 "; 45 echo "<p> " 46 .tra("If you have not already done so, %1download BOINC client software%2.", "<a href=\"http://boinc.berkeley.edu/download.php\">", "</a>")."</p>"; 49 47 } 50 48 } else { 51 49 page_head(tra("Your account")); -
forum_report_post.php
42 42 // 43 43 44 44 if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) { 45 error_page( "You need more average or total credit to report a post.");45 error_page(tra("You need more average or total credit to report a post.")); 46 46 } 47 47 48 48 //__-------------- Action part … … 61 61 62 62 //__--------------- Display part 63 63 if ($success_page==1) { 64 page_head('Report Registered'); 65 echo "Your report has been recorded. 66 Thanks for your input. 67 <p> 68 A moderator will now look at your report and decide what will happen - 69 this may take a little while, so please be patient. 70 "; 71 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\">Return to thread</a>"; 64 page_head(tra("Report Registered")); 65 echo tra("Your report has been recorded. Thanks you for your input.")."<p>" 66 .tra("A moderator will now look at your report and decide what will happen - this may take a little while, so please be patient"); 67 68 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\">".tra("Return to thread")."</a>"; 72 69 } elseif ($success_page==0){ 73 page_head( 'Report a forum post');70 page_head(".tra(""Report a forum post"")."); 74 71 if (!$no_forum_rating) { 75 echo "<p>Before reporting this post, 76 consider using the +/- rating system instead. 77 If enough users rate a post negatively it will eventually be hidden. 78 <br>You can find the rating system at the bottom of the post. 72 echo "<p>".tra("Before reporting this post, consider using the +/- rating system instead. If enough users rate a post negatively it will eventually be hidden.<br />You can find the rating system at the bottom of the post.")."</p> 79 73 "; 80 74 } 81 75 start_forum_table(array(tra("Author"), tra("Message"),"")); 82 76 show_post($post, $thread, $forum, $user, 0, 0); 83 77 echo "<form action=\"forum_report_post.php\" method=\"get\">\n"; 84 78 echo form_tokens($user->authenticator); 85 row1( "Report post");86 row2( "Why do you find the post offensive:<br><font size=-1>Please include enough information so that a person that87 has not yet read the thread will quickly be able to identify the issue.</font>",79 row1(tra("Report post")); 80 row2(tra("Why do you find the post offensive: %1Please include enough information so that a person that 81 has not yet read the thread will quickly be able to identify the issue.%2", "<span class=\"smalltext\">", "</span>"), 88 82 "<textarea name=\"reason\" rows=12 cols=54></textarea>" 89 83 ); 90 row2("", "<input type=\"submit\" name=\"submit\" value=\" OK\">");84 row2("", "<input type=\"submit\" name=\"submit\" value=\"".tra("OK")."\">"); 91 85 echo "<input type=\"hidden\" name=\"post\" value=\"".$post->id."\">"; 92 86 echo "</form>"; 93 87 end_table(); 94 88 } elseif ($success_page==-1) { 95 page_head('Report not registered'); 96 echo "<p>Your report could not be recorded. 97 Please wait a while and try again. 98 <p>If this is not a temporary error, 99 please report it to the project developers. 89 page_head(tra("Report not registered")); 90 echo "<p>".tra("Your report could not be recorded. Please wait a while and try again.")."</p> 91 <p>".tra("If this is not a temporary error, please report it to the project developers.")."</p> 100 92 "; 101 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\"> Return to thread</a>";93 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\">".tra("Return to thread")."</a>"; 102 94 } 103 95 page_tail(); 104 96 ?> -
account_finish_action.php
24 24 $name = post_str("name"); 25 25 26 26 if (strlen($name)==0) { 27 error_page( "You must supply a name for your account");27 error_page(tra("You must supply a name for your account")); 28 28 } 29 if ($new_name != s trip_tags($new_name)) {30 error_page( "HTML tags not allowed in name");29 if ($new_name != sanitize_tags($new_name)) { 30 error_page(tra("HTML tags not allowed in name")); 31 31 } 32 32 33 33 $country = post_str("country"); 34 34 if (!is_valid_country($country)) { 35 error_page( 35 error_page("invalid country"); 36 36 } 37 37 $country = BoincDb::escape_string($country); 38 $postal_code = BoincDb::escape_string(s trip_tags(post_str("postal_code", true)));38 $postal_code = BoincDb::escape_string(sanitize_tags(post_str("postal_code", true))); 39 39 $auth = BoincDb::escape_string($auth); 40 40 41 41 $name = BoincDb::escape_string($name); -
get_passwd.php
22 22 23 23 check_get_args(array()); 24 24 25 page_head( "Forgot your account info?");25 page_head(tra("Forgot your account info?")); 26 26 27 echo " 28 <h3>1) If you know your account's email address, 29 and you can receive email there:</h3> 30 <p> 31 Enter the email address below, and click OK. 32 You will be sent email instructions for resetting your password. 33 "; 27 echo "<h3>" 28 .tra("1) If you know your account's email address, and you can receive email there:")."</h3><p>" 29 .tra("Enter the email address below, and click OK. You will be sent email instructions for resetting your password."); 34 30 35 31 $master_url = parse_config(get_config(), "<master_url>"); 36 32 $x = strstr($master_url, "//"); … … 41 37 42 38 start_table(); 43 39 echo "<form method=post action=mail_passwd.php>\n"; 44 row2( "Email address","<input type=\"text\" size=40 name=email_addr>");45 row2("", "<input type=submit value= OK>");40 row2(tra("Email address"),"<input type=\"text\" size=40 name=email_addr>"); 41 row2("", "<input type=submit value=\"".tra("OK")."\">"); 46 42 echo "</form>"; 47 43 end_table(); 48 44 49 echo " 50 <p> 51 <h3>2) If you forgot your account's email address, 52 or you can't receive email there:</h3> 45 echo "<p><h3>" 46 .tra("2) If you forgot your account's email address, or you can't receive email there:")."</h3>" 47 .tra("If you have run BOINC under this account, you can still access it. Here's how:")." 53 48 54 If you have run BOINC under the account,55 you can still access it.56 Here's how:57 58 49 <ul> 59 <li> Go to the BOINC data directory on your computer 60 (on Windows this is usually <b>C:\\Documents and Settings\All Users\Application Data\BOINC</b> or <b>C:\\Program Files\BOINC</b>. 61 <li> Find your account file for this project; 62 it will be named <b>$account_file</b>. 63 <li> Open the file in a text editor like Notepad. 64 You'll see something like 50 <li> ".tra("Go to the BOINC data directory on your computer (on Windows this is usually <b>C:\\Documents and Settings\All Users\Application Data\BOINC</b> or <b>C:\\Program Files\BOINC</b>.")." 51 <li> ".tra("Find your account file for this project; it will be named <b>%1</b>.", $account_file)." 52 <li> ".tra("Open the file in a text editor like Notepad. You'll see something like")." 65 53 <pre> 66 54 <account> 67 55 <master_url>http://lhcathome.cern.ch/</master_url> … … 71 59 </account> 72 60 </pre> 73 61 74 <li> Select and Copy the string between <authenticator> 75 and </authenticator> 76 (<b>8b8496fdd26df7dc0423ecd43c09a56b</b> in the above example). 62 <li> ".tra("Select and Copy the string between %1 and %2 (%3 in the above example).", "<authenticator>", "</authenticator>", "<b>8b8496fdd26df7dc0423ecd43c09a56b</b>")." 77 63 78 <li> Paste the string into the field below, and click OK. 79 <li> You will now be logged in to your account; 80 update the email and password of your account. 64 <li> ".tra("Paste the string into the field below, and click OK.")." 65 <li> ".tra("You will now be logged in to your account; update the email and password of your account.")." 81 66 </ul> 82 67 "; 83 68 start_table(); 84 69 85 70 echo "<form action=login_action.php method=post>\n"; 86 row2( "Log in with authenticator", "<input type=\"text\" name=authenticator size=40>");87 row2( "Stay logged in on this computer",71 row2(tra("Log in with authenticator"), "<input type=\"text\" name=authenticator size=40>"); 72 row2(tra("Stay logged in on this computer"), 88 73 "<input type=checkbox name=send_cookie checked>" 89 74 ); 90 row2("", "<input type=submit value= OK>");75 row2("", "<input type=submit value=\"".tra("OK")."\">"); 91 76 echo "</form>"; 92 77 93 78 end_table(); -
forum_rate.php
23 23 24 24 $config = get_config(); 25 25 if (parse_bool($config, "no_forum_rating")) { 26 page_head( "Rating offline");27 echo "This function is turned off by the project";26 page_head(tra("Rating offline")); 27 echo tra("This function is turned off by the project"); 28 28 page_tail(); 29 29 exit(0); 30 30 } … … 55 55 // before allowing them to rate a post. 56 56 // 57 57 if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) { 58 error_page( "You need more average or total credit to rate a post.");58 error_page(tra("You need more average or total credit to rate a post.")); 59 59 } 60 60 61 61 if (BoincPostRating::lookup($user->id, $post->id)) { 62 error_page( "You have already rated this post.<br /><br /><a href=\"forum_thread.php?nowrap=true&id=".$thread->id."#".$post->id."\">Return to thread</a>");62 error_page(tra("You have already rated this post.")."<br /><br /><a href=\"forum_thread.php?nowrap=true&id=".$thread->id."#".$post->id."\">".tra("Return to thread")."</a>"); 63 63 } else { 64 64 $success = BoincPostRating::replace($user->id, $post->id, $rating); 65 65 show_result_page($success, $post, $thread, $choice); … … 69 69 function show_result_page($success, $post, $thread, $choice) { 70 70 if ($success) { 71 71 if ($choice) { 72 page_head( 'Input Recorded');73 echo "Your input has been recorded. Thanks for your help.";72 page_head(tra("Input Recorded")); 73 echo tra("Your input has been recorded. Thanks for your help."); 74 74 } else { 75 page_head( 'Vote Registered');76 echo "Your rating has been recorded. Thanks for your input.";75 page_head(tra("Vote Registered")); 76 echo tra("Your rating has been recorded. Thanks for your input."); 77 77 } 78 echo "<a href=\"forum_thread.php?nowrap=true&id=", $thread->id, "#", $post->id, "\"> Return to thread</a>";78 echo "<a href=\"forum_thread.php?nowrap=true&id=", $thread->id, "#", $post->id, "\">".tra("Return to thread")."</a>"; 79 79 } else { 80 page_head( 'Vote Submission Problem');80 page_head(tra("Vote Submission Problem")); 81 81 if ($post) { 82 echo "There was a problem recording your vote in our database. Please try again later.";83 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\"> Return to thread</a>";82 echo tra("There was a problem recording your vote in our database. Please try again later."); 83 echo "<a href=\"forum_thread.php?id=", $thread->id, "#", $post->id, "\">".tra("Return to thread")."</a>"; 84 84 } else { 85 echo "The post you specified does not exist, or your rating was invalid.";85 echo tra("The post you specified does not exist, or your rating was invalid."); 86 86 } 87 87 } 88 88 page_tail(); -
host_app_versions.php
22 22 23 23 function rsc_name($t) { 24 24 switch ($t) { 25 case 2: return "CPU";26 case 3: return "nvidia GPU";27 case 4: return "ATI GPU";25 case 2: return tra("CPU"); 26 case 3: return tra("nvidia GPU"); 27 case 4: return tra("ATI GPU"); 28 28 } 29 return "Unknown";29 return tra("Unknown"); 30 30 } 31 31 32 32 function av_desc($gavid) { 33 33 if ($gavid >= 1000000) { 34 34 $appid = (int)($gavid/1000000); 35 35 $app = BoincApp::lookup_id($appid); 36 if (!$app) return "Anonymous platform, missing app";36 if (!$app) return tra("Anonymous platform, missing app"); 37 37 $rsc_type = $gavid % 1000000; 38 38 $r = rsc_name($rsc_type); 39 return "$app->user_friendly_name ( anonymous platform, $r)";39 return "$app->user_friendly_name (".tra("anonymous platform").", $r)"; 40 40 41 41 } else { 42 42 $av = BoincAppVersion::lookup_id($gavid); 43 if (!$av) return "Missing app version";43 if (!$av) return tra("Missing app version"); 44 44 $app = BoincApp::lookup_id($av->appid); 45 if (!$app) return "Missing app";45 if (!$app) return tra("Missing app"); 46 46 $platform = BoincPlatform::lookup_id($av->platformid); 47 if (!$platform) return "Missing platform";47 if (!$platform) return tra("Missing platform"); 48 48 $pc = (strlen($av->plan_class))?"($av->plan_class)":""; 49 49 $v = number_format($av->version_num/100, 2); 50 50 return "$app->user_friendly_name $v $platform->name $pc"; … … 53 53 54 54 function show_hav($hav) { 55 55 row1(av_desc($hav->app_version_id)); 56 row2( "Number of tasks completed", $hav->pfc_n);57 row2( "Max tasks per day", $hav->max_jobs_per_day);58 row2( "Number of tasks today", $hav->n_jobs_today);59 row2( "Consecutive valid tasks", $hav->consecutive_valid);56 row2(tra("Number of tasks completed"), $hav->pfc_n); 57 row2(tra("Max tasks per day"), $hav->max_jobs_per_day); 58 row2(tra("Number of tasks today"), $hav->n_jobs_today); 59 row2(tra("Consecutive valid tasks"), $hav->consecutive_valid); 60 60 $x = number_format($hav->turnaround_avg/86400, 2); 61 61 if ($hav->et_avg) { 62 62 $gflops = 1e-9/$hav->et_avg; 63 row2( "Average processing rate", $gflops);63 row2(tra("Average processing rate"), $gflops); 64 64 } 65 row2( "Average turnaround time", "$x days");65 row2(tra("Average turnaround time"), "$x days"); 66 66 } 67 67 68 68 $hostid = get_int('hostid'); -
forum_help_desk.php
24 24 25 25 $user = get_logged_in_user(false); 26 26 27 page_head( "Questions and answers");27 page_head(tra("Questions and answers")); 28 28 29 echo "<p> 30 Talk live via Skype with a volunteer, in any of several languages. 31 Go to 32 <a href=\"http://boinc.berkeley.edu/help.php\">BOINC Online Help</a>.</p> 33 "; 29 echo "<p>". 30 tra("Talk live via Skype with a volunteer, in any of several languages. Go to %1BOINC Online Help%2.", "<a href=\"http://boinc.berkeley.edu/help.php\">", "</a>"). 31 "</p>"; 34 32 35 33 show_forum_header($user); 36 34 … … 44 42 show_mark_as_read_button($user); 45 43 start_forum_table(array( 46 44 tra("Topic"), 47 tra(" #Questions"),45 tra("Questions"), 48 46 tra("Last post") 49 47 )); 50 48 } -
friend.php
61 61 error_page(tra("You can't be friends with yourself")); 62 62 } 63 63 $destuser = BoincUser::lookup_id($destid); 64 if (!$destuser) error_page( tra("No such user"));64 if (!$destuser) error_page("No such user"); 65 65 66 66 check_pending($user, $destuser); 67 67 check_ignoring($user, $destuser); … … 71 71 <form method=post action=friend.php> 72 72 <input type=hidden name=userid value=$destid> 73 73 <input type=hidden name=action value=add_confirm>" . 74 tra("You have asked to add %1 as a friend. We will notify % 2and will ask him/her to confirm that you are friends.",75 "<b>".$destuser->name."</b>" ,"<b>".$destuser->name."</b>") ."74 tra("You have asked to add %1 as a friend. We will notify %1 and will ask him/her to confirm that you are friends.", 75 "<b>".$destuser->name."</b>") ." 76 76 <p>" . 77 77 tra("Add an optional message here:") ." 78 78 <br> 79 79 <textarea name=message cols=64 rows=4></textarea> 80 80 <p> 81 <input type=submit value= OK>81 <input type=submit value=\"".tra("OK")."\"> 82 82 </form> 83 83 "; 84 84 page_tail(); … … 89 89 function handle_add_confirm($user) { 90 90 $destid = post_int('userid'); 91 91 $destuser = BoincUser::lookup_id($destid); 92 if (!$destuser) error_page( tra("No such user"));92 if (!$destuser) error_page("No such user"); 93 93 94 94 check_pending($user, $destuser); 95 95 check_ignoring($user, $destuser); 96 96 97 97 $msg = post_str('message', true); 98 if ($msg) $msg = s trip_tags(BoincDb::escape_string($msg));98 if ($msg) $msg = sanitize_tags(BoincDb::escape_string($msg)); 99 99 100 100 $now = time(); 101 101 $ret = BoincFriend::replace( … … 132 132 } 133 133 $srcid = get_int('userid'); 134 134 $srcuser = BoincUser::lookup_id($srcid); 135 if (!$srcuser) error_page( tra("No such user"));135 if (!$srcuser) error_page("No such user"); 136 136 $friend = BoincFriend::lookup($srcid, $user->id); 137 if (!$friend) error_page( tra("Request not found"));137 if (!$friend) error_page("Request not found"); 138 138 page_head(tra("Friend request")); 139 139 echo time_str($friend->create_time)."<p>\n"; 140 140 $x = user_links($srcuser, true); … … 155 155 function handle_accept($user) { 156 156 $srcid = get_int('userid'); 157 157 $srcuser = BoincUser::lookup_id($srcid); 158 if (!$srcuser) error_page( tra("No such user"));158 if (!$srcuser) error_page("No such user"); 159 159 160 160 $friend = BoincFriend::lookup($srcid, $user->id); 161 161 if (!$friend) { 162 error_page( tra("No request"));162 error_page("No request"); 163 163 } 164 164 $friend->update("reciprocated=1"); 165 165 166 166 // "accept message" not implemented in interface yet 167 167 $msg = post_str('message', true); 168 if ($msg) $msg = s trip_tags(BoincDb::escape_string($msg));168 if ($msg) $msg = sanitize_tags(BoincDb::escape_string($msg)); 169 169 $now = time(); 170 170 $ret = BoincFriend::replace("user_src=$user->id, user_dest=$srcid, message='$msg', create_time=$now, reciprocated=1"); 171 171 if (!$ret) { … … 213 213 function handle_accepted($user) { 214 214 $destid = get_int('userid'); 215 215 $destuser = BoincUser::lookup_id($destid); 216 if (!$destuser) error_page( tra("No such user"));216 if (!$destuser) error_page("No such user"); 217 217 $notify = BoincNotify::lookup($user->id, NOTIFY_FRIEND_ACCEPT, $destid); 218 218 if ($notify) { 219 219 $notify->delete(); … … 228 228 function handle_cancel_confirm($user) { 229 229 $destid = get_int('userid'); 230 230 $destuser = BoincUser::lookup_id($destid); 231 if (!$destuser) error_page( tra("No such user"));231 if (!$destuser) error_page("No such user"); 232 232 page_head(tra("Cancel friendship?")); 233 233 echo 234 234 tra("Are you sure you want to cancel your friendship with %1?", … … 244 244 function handle_cancel($user) { 245 245 $destid = get_int('userid'); 246 246 $destuser = BoincUser::lookup_id($destid); 247 if (!$destuser) error_page( tra("No such user"));247 if (!$destuser) error_page("No such user"); 248 248 BoincFriend::delete($user->id, $destid); 249 249 page_head(tra("Friendship cancelled")); 250 250 echo tra("Your friendship with %1 has been cancelled.",$destuser->name); … … 285 285 handle_cancel($user); 286 286 break; 287 287 default: 288 error_page( tra("Unknown action"));288 error_page("Unknown action"); 289 289 } 290 290 291 291 ?> -
host_update_credit.php
25 25 db_init(); 26 26 $user = get_logged_in_user(); 27 27 28 page_head( "Updating computer credit");28 page_head(tra("Updating computer credit")); 29 29 30 30 $hostid = get_int("hostid"); 31 31 32 32 $host = lookup_host($hostid); 33 33 if (!$host || $host->userid != $user->id) { 34 error_page( "We have no record of that computer");34 error_page(tra("We have no record of that computer")); 35 35 } 36 36 37 37 host_update_credit($hostid); 38 echo "<br> Host credit updated";38 echo "<br>".tra("Host credit updated"); 39 39 page_tail(); 40 40 41 41 ?> -
host_venue_action.php
30 30 31 31 $host = BoincHost::lookup_id($hostid); 32 32 if (!$host) { 33 error_page( "No such host");33 error_page(tra("No such host")); 34 34 } 35 35 if ($host->userid != $user->id) { 36 error_page( "Not your host");36 error_page(tra("Not your host")); 37 37 } 38 38 39 39 $retval = $host->update("venue='$venue'"); 40 40 if ($retval) { 41 page_head( "Host venue updated");41 page_head(tra("Host venue updated")); 42 42 if ($venue == '') { 43 $venue = '( none)';43 $venue = '('.tra("none").')'; 44 44 } 45 45 echo " 46 The venue of this host has been set to <b>$venue</b>.46 ".tra("The venue of this host has been set to %1.", "<b>$venue</b>")." 47 47 <p> 48 This change will take effect the next time the 49 host communicates with this project. 48 ".tra("This change will take effect the next time the host communicates with this project.")." 50 49 <p> 51 <a href=show_host_detail.php?hostid=$hostid> Return to host page</a>.50 <a href=show_host_detail.php?hostid=$hostid>".tra("Return to host page")."</a>. 52 51 "; 53 52 page_tail(); 54 53 } else { -
host_edit_action.php
21 21 require_once("../inc/host.inc"); 22 22 23 23 function fail($msg) { 24 echo "Error:$msg";24 echo tra("Error:")." $msg"; 25 25 page_tail(); 26 26 exit(); 27 27 } … … 29 29 function get_host($hostid, $user) { 30 30 $host = BoincHost::lookup_id($hostid); 31 31 if (!$host || $host->userid != $user->id) { 32 fail( "We have no record of that computer");32 fail(tra("We have no record of that computer")); 33 33 } 34 34 return $host; 35 35 } 36 36 37 37 $user = get_logged_in_user(); 38 38 39 page_head( "Merge computer records");39 page_head(tra("Merge computer records")); 40 40 41 41 $nhosts = get_int("nhosts"); 42 42 $hostid = get_int("id_0"); … … 62 62 $latest_host = BoincHost::lookup_id($latest_host->id); 63 63 } 64 64 echo " 65 <p><a href=hosts_user.php> Return to list of your computers</a>65 <p><a href=hosts_user.php>".tra("Return to list of your computers")."</a> 66 66 "; 67 67 page_tail(); 68 68 -
forum_rss.php
38 38 if (!$forum) error_page("no such forum"); 39 39 40 40 if (get_int('setup', true)) { 41 page_head("$forum->name RSS feed"); 42 echo " 43 This message board is available as an RSS feed. 44 Options: 45 <form action=forum_rss.php> 46 <input type=hidden name=forumid value=$forumid> 41 page_head(tra("%1 RSS feed", $forum->title)); 42 echo tra("This message board is available as an RSS feed.") 43 .tra("Options:")." 44 <form action=\"forum_rss.php\" method=\"get\"> 45 <input type=\"hidden\" name=\"forumid\" value=\"$forumid\"> 47 46 <p> 48 Include only posts by user ID <input name=userid> (default: all users).47 ".tra("Include only posts by user ID %1 (default: all users).", "<input name=\"userid\">")." 49 48 <p> 50 Include only posts from the last <input name=ndays> days (default: 30).49 ".tra("Include only posts from the last %1 days (default: 30).", "<input name=\"ndays\">")." 51 50 <p> 52 Truncate posts <input type=checkbox name=truncate checked>51 ".tra("Truncate posts: %1 (Include only first 265 characters of each post)", "<input type=\"checkbox\" name=\"truncate\" checked>")." 53 52 <p> 54 Threads only <input type=checkbox name=threads_only>53 ".tra("Threads only: %1 (Include only the first post of every thread)", "<input type=\"checkbox\" name=\"threads_only\">")." 55 54 <p> 56 <input type= submit value=OK>55 <input type=\"submit\" value=\"".tra("OK")."\"> 57 56 "; 58 57 page_tail(); 59 58 exit; -
ffmail_form.php
16 16 // You should have received a copy of the GNU Lesser General Public License 17 17 // along with BOINC. If not, see <http://www.gnu.org/licenses/>. 18 18 19 // TODO: - find out if this is used (add some logging mechanism or so) 20 // - if used rewrite code to use display functions from util.inc 21 // - if used find a way to give the user a language choice (projects must translate messages themself) 22 19 23 require_once("../inc/util.inc"); 20 24 21 25 check_get_args(array()); … … 24 28 $user = get_logged_in_user(); 25 29 26 30 if (!@file_get_contents('../ops/ffmail/subject')) { 27 error_page( 28 'This project hasn\'t created an email message - 29 please notify its administrators' 30 ); 31 error_page(tra("This project hasn\'t created an email message - please notify its administrators")); 31 32 } 32 33 33 page_head( "Tell your friends about ".PROJECT);34 page_head(tra("Tell your friends about %1", PROJECT)); 34 35 35 36 echo " 36 37 <table width=600><tr><td> 37 Help us by telling your friends, family and coworkers about ".PROJECT.". 38 ".tra("Help us by telling your friends, family and coworkers about %1", PROJECT)." 38 39 <p> 39 Fill in this form with the names and email addresses 40 of people you think might be interested in ".PROJECT.". 41 We'll send them an email in your name, 42 and you can add your own message if you like. 40 ".tra("Fill in this form with the names and email addresses of people you think might be interested in %1. We'll send them an email in your name, and you can add your own message if you like.", PROJECT)." 43 41 <form method=get action=ffmail_action.php> 44 42 <table cellpadding=4> 45 <tr><td class=heading> Your name:</td><td class=heading>Your email address:</td></tr>43 <tr><td class=heading>".tra("Your name:")."</td><td class=heading>".tra("Your email address:")."</td></tr> 46 44 <tr><td><b>$user->name</b></td><td><b>$user->email_addr</b></td></tr> 47 45 48 46 <input type=hidden name=uname value=\"$user->name\"> 49 47 <input type=hidden name=uemail value=\"$user->email_addr\"> 50 48 51 <tr><td class=heading> Friend's name:</td><td class=heading>Friend's email address:</td></tr>49 <tr><td class=heading>".tra("Friend's name:")."</td><td class=heading>".tra("Friend's email address:")."</td></tr> 52 50 "; 53 51 for ($i=0; $i<5; $i++) { 54 52 echo " … … 56 54 "; 57 55 } 58 56 echo " 59 <tr><td class=heading colspan=2> Additional message (optional)</td></tr>57 <tr><td class=heading colspan=2>".tra("Additional message (optional)")."</td></tr> 60 58 <tr><td colspan=2><textarea name=comment rows=8 cols=50></textarea></td></tr> 61 <tr><td align=center><input type=submit name=action value= Preview></td>62 <td align=center><input type=submit name=action value= Send></td>59 <tr><td align=center><input type=submit name=action value=".tra("Preview")."></td> 60 <td align=center><input type=submit name=action value=".tra("Send")."></td> 63 61 </tr> 64 62 </table> 65 63 </form> -
forum_subscribe.php
43 43 44 44 function subscribe($forum, $thread, $user) { 45 45 if (BoincSubscription::replace($user->id, $thread->id)) { 46 page_head( "Subscription successful");46 page_head(tra("Subscription successful")); 47 47 show_forum_header($user); 48 48 show_title($forum, $thread); 49 echo "<p>You are now subscribed to <b>", cleanup_title($thread->title), "</b>. 50 You will be notified whenever there is a new post."; 49 echo "<p>".tra("You are now subscribed to %1. You will be notified whenever there is a new post.", "<b>".cleanup_title($thread->title)."</b>"); 51 50 } else { 52 page_head("Subscription failed"); 53 echo "<p>We are currently unable to subscribe you to this thread (<b>", cleanup_title($thread->title), "</b>). 54 Please try again later.."; 51 page_head(tra("Subscription failed")); 52 echo "<p>".tra("We are currently unable to subscribe you to %1. Please try again later..", "<b>".cleanup_title($thread->title)."</b>"); 55 53 } 56 echo "</p><p><br /><a href=\"forum_thread.php?id=".$thread->id."\"> Return to thread</a></p>";54 echo "</p><p><br /><a href=\"forum_thread.php?id=".$thread->id."\">".tra("Return to thread")."</a></p>"; 57 55 page_tail(); 58 56 } 59 57 60 58 function unsubscribe($forum, $thread, $user) { 61 59 BoincSubscription::delete($user->id, $thread->id); 62 60 if (!BoincSubscription::lookup($user->id, $thread->id)) { 63 page_head( "Unsubscription successful");61 page_head(tra("Unsubscription successful")); 64 62 show_forum_header($user); 65 63 show_title($forum, $thread); 66 echo "<p>You are no longer subscribed to <b>", cleanup_title($thread->title), "</b>. 67 You will no longer receive notifications for this thread."; 64 echo "<p>".tra("You are no longer subscribed to %1. You will no longer receive notifications for this thread.", "<b>".cleanup_title($thread->title)."</b>"); 68 65 } else { 69 page_head("Unsubscription failed"); 70 echo "<p>We are currently unable to unsubscribe you to this thread (<b>", cleanup_title($thread->title), "</b>). 71 Please try again later.."; 66 page_head(tra("Unsubscription failed")); 67 echo "<p>".tra("We are currently unable to unsubscribe you from %1. Please try again later..", "<b>".cleanup_title($thread->title)."</b>"); 72 68 } 73 echo "</p><p><br /><a href=\"forum_thread.php?id=".$thread->id."\"> Return to thread</a></p>";69 echo "</p><p><br /><a href=\"forum_thread.php?id=".$thread->id."\">".tra("Return to thread")."</a></p>"; 74 70 page_tail(); 75 71 } 76 72 77 73 if (!$thread || !$action) { 78 error_page( "Unknown subscription action");74 error_page(tra("Unknown subscription action")); 79 75 } 80 76 81 77 $user = get_logged_in_user(); -
donated.php
22 22 23 23 $st = get_str("st", true); 24 24 25 page_head( "PayPal - Transaction Completed");25 page_head(tra("PayPal - Transaction Completed")); 26 26 27 27 if ($st == "Completed") { 28 echo "<div> Thank you for donating!<br>\n";29 echo "Your donation for has been completed.<br>\n";30 echo "Your donation will be added to the progress bar after confirmation by PayPal.</div>";28 echo "<div>".tra("Thank you for donating!")."<br>\n"; 29 echo tra("Your donation for has been completed.")."<br>\n"; 30 echo tra("Your donation will be added to the progress bar after confirmation by PayPal.")."</div>"; 31 31 } else { 32 echo "<strong> You have canceled your donation</strong>";32 echo "<strong>".tra("You have canceled your donation.")."</strong>"; 33 33 } 34 34 35 35 page_tail(); -
account_finish.php
23 23 require_once('../inc/boinc_db.inc'); 24 24 require_once('../inc/util.inc'); 25 25 require_once('../inc/countries.inc'); 26 require_once('../inc/translation.inc');27 26 28 27 check_get_args(array("auth")); 29 28 … … 32 31 if (!$user) { 33 32 error_page("no such account"); 34 33 } 35 page_head( "Finish account setup");34 page_head(tra("Finish account setup")); 36 35 37 36 echo " 38 37 <form action=account_finish_action.php method=post> -
forum_moderate_thread_action.php
35 35 if (!$forum) error_page("no forum"); 36 36 37 37 if (!is_moderator($logged_in_user, $forum)) { 38 error_page( "You are not authorized to moderate this post.");38 error_page(tra("You are not authorized to moderate this post.")); 39 39 } 40 40 41 41 $explanation = ""; … … 95 95 $action_name = "renamed from '$thread->title' to '$new_title'"; 96 96 break; 97 97 default: 98 error_page("Unknown action 98 error_page("Unknown action"); 99 99 } 100 100 101 101 if (!$result) { 102 error_page( "Moderation failed");102 error_page(tra("Action failed: possible database problem")); 103 103 } 104 104 105 105 $reason = post_str('reason', true); -
forum_forum.php
31 31 if (!$start) $start = 0; 32 32 33 33 $forum = BoincForum::lookup_id($id); 34 if (!$forum) error_page(" no forum");34 if (!$forum) error_page("forum ID not found"); 35 35 $user = get_logged_in_user(false); 36 36 37 37 if (!is_forum_visible_to_user($forum, $user)) { 38 38 if ($user) { 39 39 remove_subscriptions_forum($user->id, $id); 40 40 } 41 error_page( "Not visible");41 error_page(tra("Not visible to you")); 42 42 } 43 43 44 44 BoincForumPrefs::lookup($user); … … 67 67 switch ($forum->parent_type) { 68 68 case 0: 69 69 $category = BoincCategory::lookup_id($forum->category); 70 if ($category->is_helpdesk) {70 if ($category->is_helpdesk) { 71 71 page_head(tra("Questions and Answers").' : '.$forum->title); 72 72 echo '<link href="forum_help_desk.php" rel="up" title="Forum Index">'; 73 73 } else { … … 79 79 break; 80 80 case 1: 81 81 $team = BoincTeam::lookup_id($forum->category); 82 page_head( "Team message board for <a href=team_display.php?teamid=$team->id>$team->name</a>");82 page_head(tra("Team message board for %1", "<a href=team_display.php?teamid=$team->id>$team->name</a>")); 83 83 show_forum_header($user); 84 84 show_team_forum_title($forum); 85 85 break; … … 95 95 96 96 if (user_can_create_thread($user, $forum)) { 97 97 show_button( 98 "forum_post.php?id=$id", "New thread", "Add a new thread to this forum"98 "forum_post.php?id=$id", tra("New thread"), tra("Add a new thread to this forum") 99 99 ); 100 100 } 101 101 … … 114 114 show_forum($forum, $start, $sort_style, $user); 115 115 116 116 echo " 117 <p> 118 This message board is available as an 119 <a href=forum_rss.php?forumid=$forum->id&setup=1>RSS feed 120 <img src=img/feed_logo.png></a> 121 "; 117 <p>". 118 tra("This message board is available as an %1RSS feed%2", "<a href=forum_rss.php?forumid=$forum->id&setup=1>", " <img src=img/feed_logo.png></a>"); 122 119 123 120 page_tail(); 124 121 … … 174 171 175 172 echo "<td width=\"1%\" class=\"threadicon\"><nobr>"; 176 173 if ($thread->hidden) { 177 show_image(IMAGE_HIDDEN, "This thread is hidden", "hidden");174 show_image(IMAGE_HIDDEN, tra("This thread is hidden"), tra("hidden")); 178 175 } else if ($unread) { 179 176 if ($thread->sticky) { 180 177 if ($thread->locked) { 181 show_image(NEW_IMAGE_STICKY_LOCKED, "This thread is sticky and locked, and you haven't read it yet", "sticky/locked/unread");178 show_image(NEW_IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked, and you haven't read it yet"), tra("sticky/locked/unread")); 182 179 } else { 183 show_image(NEW_IMAGE_STICKY, "This thread is sticky and you haven't read it yet", "sticky/unread");180 show_image(NEW_IMAGE_STICKY, tra("This thread is sticky and you haven't read it yet"), tra("sticky/unread")); 184 181 } 185 182 } else { 186 183 if ($thread->locked) { 187 show_image(NEW_IMAGE_LOCKED, "You haven't read this thread yet, and it's locked", "unread/locked");184 show_image(NEW_IMAGE_LOCKED, tra("You haven't read this thread yet, and it's locked"), tra("unread/locked")); 188 185 } else { 189 show_image(NEW_IMAGE, "You haven't read this thread yet", "unread");186 show_image(NEW_IMAGE, tra("You haven't read this thread yet"), tra("unread")); 190 187 } 191 188 } 192 189 } else { 193 190 if ($thread->sticky) { 194 191 if ($thread->locked) { 195 show_image(IMAGE_STICKY_LOCKED, "This thread is sticky and locked", "sticky/locked");192 show_image(IMAGE_STICKY_LOCKED, tra("This thread is sticky and locked"), tra("sticky/locked")); 196 193 } else { 197 show_image(IMAGE_STICKY, "This thread is sticky", "sticky");194 show_image(IMAGE_STICKY, tra("This thread is sticky"), tra("sticky")); 198 195 } 199 196 } else { 200 197 if ($thread->locked) { 201 show_image(IMAGE_LOCKED, "This thread is locked", "locked");198 show_image(IMAGE_LOCKED, tra("This thread is locked"), tra("locked")); 202 199 } else { 203 show_image(IMAGE_POST, "You read this thread", "read");200 show_image(IMAGE_POST, tra("You read this thread"), tra("read")); 204 201 } 205 202 } 206 203 } -
user_search.php
147 147 if (strlen($search_string)<3) { 148 148 error_page(tra("search string must be at least 3 characters")); 149 149 } 150 $s = boinc_real_escape_string($search_string);150 $s = BoincDb::escape_string($search_string); 151 151 $s = escape_pattern($s); 152 152 $fields = "id, create_time, name, country, total_credit, expavg_credit, teamid, url, has_profile, donated"; 153 153 $users = BoincUser::enum_fields($fields, "name like '$s%'", "limit $count"); … … 185 185 case 'name_prefix': 186 186 break; 187 187 default: 188 error_page( tra("missing search type"));188 error_page("missing search type"); 189 189 } 190 190 191 191 $filter = null; -
html.php
16 16 // You should have received a copy of the GNU Lesser General Public License 17 17 // along with BOINC. If not, see <http://www.gnu.org/licenses/>. 18 18 19 20 19 require_once("../inc/util.inc"); 21 20 22 21 check_get_args(array()); 23 22 24 page_head( "Allowed HTML tags");23 page_head(tra("Allowed HTML tags")); 25 24 26 echo " 27 The following HTML tags are allowed in profiles, team descriptions, 28 signatures, etc.: 25 echo tra("The following HTML tags are allowed in team descriptions:")." 29 26 <ul> 30 <li> <b> or <strong> (bold) 31 <li> <i> or <em> (italics) 32 <li> <a> (hyperlink) 33 <li> <p> (paragraph) 34 <li> <br> (break) 35 <li> <pre> (preformatted) 36 <li> <img> (image; height cannot exceed 450 pixels. 37 Please do not link to images without 38 permission of the web site where the image is hosted.) 27 <li> <b> or <strong> (".tra("bold").") 28 <li> <i> or <em> (".tra("italics").") 29 <li> <a> (".tra("hyperlink").") 30 <li> <p> (".tra("paragraph").") 31 <li> <br> (".tra("break").") 32 <li> <pre> (".tra("preformatted").") 33 <li> <img> (".tra("image; height cannot exceed 450 pixels. Please do not link to images without permission of the web site where the image is hosted.").") 39 34 </ul> 40 You can also use ampersand notation for special characters. 41 "; 35 ".tra("You can also use ampersand notation for special characters."); 42 36 43 37 page_tail(); 44 38 ?> -
host_edit_form.php
27 27 $hostid = get_int("hostid"); 28 28 $host = BoincHost::lookup_id($hostid); 29 29 if (!$host || $host->userid != $user->id) { 30 error_page( "We have no record of that computer");30 error_page(tra("We have no record of that computer")); 31 31 } 32 32 33 33 $detail = get_int('detail', true); 34 34 35 page_head( "Merge computers");35 page_head(tra("Merge computers")); 36 36 37 37 $t = time_str($host->create_time); 38 echo " 39 Sometimes BOINC assigns separate identities to the same computer by mistake. 40 You can correct this by merging old identities with the newest one. 41 <form name=blah action=host_edit_action.php> 38 echo tra("Sometimes BOINC assigns separate identities to the same computer by mistake. You can correct this by merging old identities with the newest one.")." 39 <form name=host_list action=host_edit_action.php> 42 40 <input type=hidden name=id_0 value=$hostid> 43 41 <p> 44 42 "; … … 55 53 if ($nhosts==500) break; 56 54 } 57 55 if ($nhosts == 1) { 58 echo "<br> No hosts are eligible for merging with this one.";56 echo "<br>".tra("No hosts are eligible for merging with this one."); 59 57 if (!$detail) { 60 echo "<p><a href=host_edit_form.php?hostid=$hostid&detail=1> Show details</a>58 echo "<p><a href=host_edit_form.php?hostid=$hostid&detail=1>".tra("Show details")."</a> 61 59 "; 62 60 } 63 61 page_tail(); 64 62 exit(); 65 63 } 66 64 echo " 65 <p>" 66 .tra("Check the computers that are the same as %1 (created %2, computer ID %3):", $host->domain_name, $t, $host->id)." 67 67 <p> 68 Check the computers that are the same as $host->domain_name69 (created $t, computer ID $host->id):70 <p>71 68 "; 72 69 start_table(); 73 row_heading_array(array("", "name", "created", "computer ID"));70 row_heading_array(array("", tra("name"), tra("created"), tra("computer ID"))); 74 71 75 72 $i = 1; 76 73 foreach ($hosts as $host2) { 77 74 $t = time_str($host2->create_time); 78 75 $x = $host2->domain_name; 79 76 if ($x == "") { 80 $x = "[ no hostname]";77 $x = "[".tra("no hostname")."]"; 81 78 } 82 79 row_array(array( 83 80 "<input type=checkbox name=id_$i value=$host2->id>", … … 94 91 function set_all() { 95 92 "; 96 93 for ($i=1; $i<$nhosts; $i++) { 97 echo "document. blah.id_$i.checked=1;\n";94 echo "document.host_list.id_$i.checked=1;\n"; 98 95 } 99 96 echo " 100 97 } 101 98 function clear_all() { 102 99 "; 103 100 for ($i=1; $i<$nhosts; $i++) { 104 echo "document. blah.id_$i.checked=0;\n";101 echo "document.host_list.id_$i.checked=0;\n"; 105 102 } 106 103 echo " 107 104 } … … 109 106 <p><a href=javascript:set_all()>Select all</a> 110 107 <p><a href=javascript:clear_all()>Unselect all</a> 111 108 <input type=hidden name=nhosts value=$nhosts> 112 <p><input type=submit value=' Merge hosts'>109 <p><input type=submit value='".tra("Merge hosts")."'> 113 110 </form> 114 111 "; 115 112 116 113 if (!$detail) { 117 echo "<p><a href=host_edit_form.php?hostid=$hostid&detail=1> Show details</a>114 echo "<p><a href=host_edit_form.php?hostid=$hostid&detail=1>".tra("Show details")."</a> 118 115 "; 119 116 } 120 117 -
forum_moderate_post_action.php
25 25 $x = ""; 26 26 $reason = post_str('reason', true); 27 27 if ($reason){ 28 $x .= " 29 Moderator comment: $reason 28 $x .= "\nModerator comment: $reason 30 29 "; 31 30 } 32 31 return $x; 33 32 } 34 33 35 34 function hide_explanation() { 36 $x = "\nYour post was categorized as ";37 35 switch (post_int("category", true)) { 38 case 1: $x .= "Obscene"; break;39 case 2: $x .= "Flame/Hate mail"; break;40 case 3: $x .= "Commercial spam"; break;41 case 4: $x .= "Double post"; break;42 case 5: $x .= "User Request"; break;43 default: $x .= "Other"; break;36 case 1: $c = "Obscene"; break; 37 case 2: $c = "Flame/Hate mail"; break; 38 case 3: $c = "Commercial spam"; break; 39 case 4: $c = "Double post"; break; 40 case 5: $c = "User Request"; break; 41 default: $c = "Other"; break; 44 42 } 43 $x = "\nYour post was categorized as ".$c; 45 44 $x .= mod_comment(); 46 45 return $x; 47 46 } … … 55 54 $forum = BoincForum::lookup_id($thread->forum); 56 55 57 56 if (!is_moderator($user, $forum)) { 58 error_page( "You are not authorized to moderate this post.");57 error_page(tra("You are not authorized to moderate this post.")); 59 58 } 60 59 61 60 // See if "action" is provided - either through post or get 62 61 if (!post_str('action', true)) { 63 62 if (!get_str('action', true)){ 64 error_page( "You must specify an action...");63 error_page(tra("You must specify an action...")); 65 64 } else { 66 65 $action = get_str('action'); 67 66 } … … 83 82 if (!$new_thread) error_page("No such thread"); 84 83 $new_forum = BoincForum::lookup_id($new_thread->forum); 85 84 if ($forum->parent_type != $new_forum->parent_type) { 86 error_page( "Can't move to different category type");85 error_page(tra("Can't move to different category type")); 87 86 } 88 87 if ($forum->parent_type != 0) { 89 88 if ($forum->category != $new_forum->category) { 90 error_page( "Can't move to different category");89 error_page(tra("Can't move to different category")); 91 90 } 92 91 } 93 92 $result = move_post($post, $thread, $forum, $new_thread, $new_forum); … … 108 107 } 109 108 } 110 109 if (!$auth) { 111 error_page( "Not authorized to banish users");110 error_page(tra("Not authorized to banish users")); 112 111 } 113 112 $userid = post_int('userid'); 114 $ user = BoincUser::lookup_id($userid);115 if (!$ user) {116 error_page(" no user");113 $bad_user = BoincUser::lookup_id($userid); 114 if (!$bad_user) { 115 error_page("user ID not found"); 117 116 } 118 BoincForumPrefs::lookup($ user);117 BoincForumPrefs::lookup($bad_user); 119 118 $duration = post_int('duration'); 120 119 if ($duration == -1) { 121 120 $t = 2147483647; // Maximum integer value … … 123 122 $t = time() + $duration; 124 123 } 125 124 $reason = post_str("reason", true); 126 $result = $ user->prefs->update("banished_until=$t");127 page_head( "Banishment");125 $result = $bad_user->prefs->update("banished_until=$t"); 126 page_head(tra("Banishment")); 128 127 if ($result) { 129 echo "User ".$user->name." has been banished.";130 send_banish_email($forum, $ user, $t, $reason);128 echo tra("User %1 has been banished.", $bad_user->name); 129 send_banish_email($forum, $bad_user, $t, $reason); 131 130 } else { 132 e cho "DB failure";131 error_page(tra("Action failed: possible database problem")); 133 132 } 134 133 page_tail(); 135 134 exit(); 136 135 } else { 137 error_page("Unknown action 136 error_page("Unknown action"); 138 137 } 139 138 140 139 if (!$result) { 141 error_page( "Action failed: possible database problem");140 error_page(tra("Action failed: possible database problem")); 142 141 } 143 142 144 143 send_moderation_email($forum, $post, $thread, $explanation, $action_name); -
forum_index.php
50 50 $t = $forum->title; 51 51 if (!strlen($t)) $t = $team->name; 52 52 $d = $forum->description; 53 if (!strlen($d)) $d = "Discussion among members of $team->name";53 if (!strlen($d)) $d = tra("Discussion among members of %1", $team->name); 54 54 break; 55 55 } 56 56 $j = $i % 2; … … 120 120 if ($user) { 121 121 $subs = BoincSubscription::enum("userid=$user->id"); 122 122 if (count($subs)) { 123 echo "<p><span class=title> Subscribed threads</span><p>";123 echo "<p><span class=title>".tra("Subscribed threads")."</span><p>"; 124 124 show_thread_and_context_header(); 125 125 $i = 0; 126 126 foreach ($subs as $sub) { -
team_lookup.php
66 66 $name_lc = strtolower($team_name); 67 67 $name_lc = escape_pattern($name_lc); 68 68 69 $clause = "name like '%". boinc_real_escape_string($name_lc)."%' order by expavg_credit desc limit 100";69 $clause = "name like '%".BoincDb::escape_string($name_lc)."%' order by expavg_credit desc limit 100"; 70 70 $teams = BoincTeam::enum($clause); 71 71 72 72 if ($format == 'xml') { … … 83 83 84 84 page_head(tra("Search Results")); 85 85 if (count($teams)) { 86 echo "<h2>".tra("Search results for '%1'", s trip_tags($team_name))."</h2>";86 echo "<h2>".tra("Search results for '%1'", sanitize_tags($team_name))."</h2>"; 87 87 echo "<p>"; 88 88 echo tra("You may view these teams' members, statistics, and information."); 89 89 echo "<ul>"; -
profile_search_action.php
26 26 echo "<tr><td>".user_links($user)."</td><td>".date_str($user->create_time)."</td><td>$user->country</td><td>".(int)$user->total_credit."</td><td>".(int)$user->expavg_credit."</td></tr>\n"; 27 27 } 28 28 29 $search_string = get_str('search_string'); 30 $search_string = strip_tags($search_string); 31 $search_string = boinc_real_escape_string($search_string); 29 $search_string = BoincDb::escape_string(sanitize_tags(get_str('search_string'))); 32 30 $offset = get_int('offset', true); 33 31 if (!$offset) $offset=0; 34 32 $count = 10; -
prefs_edit.php
20 20 include_once("../inc/util.inc"); 21 21 include_once("../inc/prefs.inc"); 22 22 23 db_init();23 check_get_args(array("action", "subset", "venue", "cols", "tnow", "ttok")); 24 24 25 25 $user = get_logged_in_user(); 26 26 -
edit_email_action.php
28 28 $email_addr = strtolower(post_str("email_addr")); 29 29 $passwd = post_str("passwd", true); 30 30 31 page_head( "Change email address of account");31 page_head(tra("Change email address of account")); 32 32 33 33 if (!is_valid_email_addr($email_addr)) { 34 echo "New email address '$email_addr' is invalid";34 echo tra("New email address '%1' is invalid.", $email_addr); 35 35 } else if (is_banned_email_addr($email_addr)) { 36 echo "New email address '$email_addr' is invalid";36 echo tra("New email address '%1' is invalid.", $email_addr); 37 37 } else if ($email_addr == $user->email_addr) { 38 echo "New email address is same as existing address; no change.";38 echo tra("New email address is same as existing address. Nothing is changed."); 39 39 } else { 40 40 $existing = lookup_user_email_addr($email_addr); 41 41 if ($existing) { 42 echo "There's already an account with that email address";42 echo tra("There's already an account with that email address"); 43 43 } else { 44 44 $passwd_hash = md5($passwd.$user->email_addr); 45 45 … … 51 51 $passwd_hash = md5($passwd.$user->email_addr); 52 52 } 53 53 if ($passwd_hash != $user->passwd_hash) { 54 echo "Invalid password.";54 echo tra("Invalid password."); 55 55 } else { 56 56 $passwd_hash = md5($passwd.$email_addr); 57 57 $email_addr = BoincDb::escape_string($email_addr); … … 59 59 "email_addr='$email_addr', passwd_hash='$passwd_hash', email_validated=0" 60 60 ); 61 61 if ($result) { 62 echo " 63 The email address of your account is now $email_addr. 64 "; 62 echo tra("The email address of your account is now %1.", $email_addr); 65 63 if (defined("SHOW_NONVALIDATED_EMAIL_ADDR")) { 66 echo "<p> Please <a href=validate_email_addr.php>validate this email address</a>.\n";64 echo "<p>".tra("Please %1validate this email address%2.", "<a href=validate_email_addr.php>", "</a>")."\n"; 67 65 } 68 66 } else { 69 echo " 70 We can't update your email address 71 due to a database problem. Please try again later. 72 "; 67 echo tra("We can't update your email address due to a database problem. Please try again later."); 73 68 } 74 69 } 75 70 } -
forum_banishment_vote_action.php
30 30 check_tokens($logged_in_user->authenticator); 31 31 32 32 if (!$logged_in_user->prefs->privilege(S_MODERATOR)) { 33 error_page( "You are not authorized to banish users.");33 error_page(tra("You are not authorized to banish users.")); 34 34 } 35 35 36 36 // See if "action" is provided - either through post or get 37 37 if (!post_str('action', true)) { 38 38 if (!get_str('action', true)){ 39 error_page( "You must specify an action...");39 error_page(tra("You must specify an action...")); 40 40 } else { 41 41 $action = get_str('action'); 42 42 } … … 48 48 $user=BoincUser::lookup_id($userid); 49 49 50 50 if ($action!="start"){ 51 error_page("Unknown action 51 error_page("Unknown action"); 52 52 } 53 53 54 // TODO: create a function for this in forum_banishment_vote.inc to make it more flexible 54 55 switch (post_int("category", true)) { 55 56 case 1: 56 $mod_category = "Obscene";57 $mod_category = tra("Obscene"); 57 58 case 2: 58 $mod_category = "Flame/Hate mail";59 $mod_category = tra("Flame/Hate mail"); 59 60 case 3: 60 $mod_category = "User Request";61 $mod_category = tra("User Request"); 61 62 default: 62 $mod_category = "Other";63 $mod_category = tra("Other"); 63 64 } 64 65 65 66 if (post_str('reason', true)){ -
edit_user_info_action.php
27 27 check_tokens($user->authenticator); 28 28 29 29 $name = post_str("user_name"); 30 if ($name != s trip_tags($name)) {30 if ($name != sanitize_tags($name)) { 31 31 error_page(tra("HTML tags are not allowed in your name.")); 32 32 } 33 33 if (strlen($name) == 0) { 34 34 error_page(tra("You must supply a name for your account.")); 35 35 } 36 $url = post_str("url", true); 37 $url = strip_tags($url); 36 $url = sanitize_tags(post_str("url", true)); 38 37 $country = post_str("country"); 39 38 if ($country == "") { 40 39 $country = "International"; 41 40 } 42 41 if (!is_valid_country($country)) { 43 error_page( tra("bad country"));42 error_page("bad country"); 44 43 } 45 44 $country = BoincDb::escape_string($country); 46 $postal_code = post_str("postal_code", true); 47 $postal_code = strip_tags($postal_code); 45 $postal_code = sanitize_tags(post_str("postal_code", true)); 48 46 49 47 $name = BoincDb::escape_string($name); 50 48 $url = BoincDb::escape_string($url); -
team_forum.php
50 50 $id = BoincForum::insert("(category, parent_type) values ($team->id, 1)"); 51 51 $forum = BoincForum::lookup_id($id); 52 52 if (!$forum) { 53 error_page(tra(" couldn't create message board"));53 error_page(tra("Couldn't create message board")); 54 54 } 55 55 edit_form($user, $team, $forum, true); 56 56 } … … 104 104 105 105 function remove($team) { 106 106 $forum = BoincForum::lookup("parent_type=1 and category=$team->id"); 107 if (!$forum) error_page( tra("message board not found"));107 if (!$forum) error_page("message board not found"); 108 108 109 109 // delete threads and posts 110 110 // … … 131 131 } 132 132 133 133 function edit_action($forum) { 134 $title = s trip_tags(post_str('title'));134 $title = sanitize_tags(post_str('title')); 135 135 $title = BoincDb::escape_string($title); 136 $description = s trip_tags(post_str('description'));136 $description = sanitize_tags(post_str('description')); 137 137 $description = BoincDb::escape_string($description); 138 138 $post_min_interval = post_int('post_min_interval'); 139 139 $post_min_total_credit = post_int('post_min_total_credit'); … … 151 151 function show_forum($team) { 152 152 $forum = BoincForum::lookup("parent_type=1 and category=$team->id"); 153 153 if (!$forum) { 154 error_page(tra(" team has no forum"));154 error_page(tra("Team has no forum")); 155 155 } 156 156 Header("Location: forum_forum.php?id=$forum->id"); 157 157 } … … 161 161 162 162 $team = BoincTeam::lookup_id($teamid); 163 163 if (!$team) { 164 error_page( tra("no such team"));164 error_page("no such team"); 165 165 } 166 166 167 167 $cmd = get_str('cmd', true); … … 186 186 require_founder_login($user, $team); 187 187 check_tokens($user->authenticator); 188 188 $forum = BoincForum::lookup("parent_type=1 and category=$teamid"); 189 if (!$forum) error_page( tra("no such forum"));189 if (!$forum) error_page("no such forum"); 190 190 edit_action($forum); 191 191 } else if ($cmd == "remove_confirm") { 192 192 $user = get_logged_in_user(); … … 197 197 require_founder_login($user, $team); 198 198 remove($team); 199 199 } else if ($cmd != "") { 200 error_page( tra("unknown command %1", $cmd));200 error_page("unknown command $cmd"); 201 201 } else { 202 202 show_forum($team); 203 203 } -
forum_reply.php
73 73 } 74 74 check_tokens($logged_in_user->authenticator); 75 75 if (!akismet_check($logged_in_user, $content)) { 76 $warning = "Your post has been flagged as spam by the Akismet 77 anti-spam system. Please modify your text and try again. 78 "; 76 $warning = tra("Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again."); 79 77 $preview = tra("Preview"); 80 78 } else { 81 79 create_post( … … 126 124 global $logged_in_user, $bbcode_html; 127 125 global $content, $preview; 128 126 129 $x1 = "Message:".html_info().post_warning();127 $x1 = tra("Message:").html_info().post_warning(); 130 128 $x2 = ""; 131 129 if ($parent_post) { 132 $x2 .=" reply to <a href=#".$parent_post->id.">Message ID ".$parent_post->id."</a>:";130 $x2 .=" ".tra("reply to %1Message ID%2:", "<a href=#".$parent_post->id.">", " ".$parent_post->id."</a>"); 133 131 } 134 132 $x2 .= "<form action=forum_reply.php?thread=".$thread->id; 135 133 … … 146 144 } else if (!$no_quote) { 147 145 if ($parent_post) $x2 .= quote_text(htmlspecialchars($parent_post->content))."\n"; 148 146 } 149 if (!$logged_in_user->prefs->no_signature_by_default) {147 if (!$logged_in_user->prefs->no_signature_by_default) { 150 148 $enable_signature="checked=\"true\""; 151 149 } else { 152 150 $enable_signature=""; 153 151 } 154 152 $x2 .= "</textarea><p> 155 153 <input type=\"submit\" name=\"preview\" value=\"".tra("Preview")."\"> 156 <input type=\"submit\" value=\" Post reply\">154 <input type=\"submit\" value=\"".tra("Post reply")."\"> 157 155 158 <input name=\"add_signature\" id=\"add_signature\" value=\"add_it\" ".$enable_signature." type=\"checkbox\">159 <label for=\"add_signature\"> Add my signature to this reply</label>156 <input type=\"checkbox\" name=\"add_signature\" id=\"add_signature\" value=\"add_it\" ".$enable_signature."> 157 <label for=\"add_signature\">".tra("Add my signature to this reply")."</label> 160 158 161 159 </form> 162 160 "; -
edit_forum_preferences_action.php
32 32 BoincForumPrefs::lookup($user); 33 33 34 34 if (post_str("action", true)=="reset_confirm"){ 35 page_head("Confirm reset"); 36 echo "This action will erase any changes you have made 37 in your community preferences. 38 To cancel, click your browser's Back button. 35 page_head(tra("Confirm reset")); 36 echo tra("This action will erase any changes you have made in your community preferences. To cancel, click your browser's Back button.")." 39 37 <p> 40 38 <form action=edit_forum_preferences_action.php method=post> 41 39 <input type=hidden name=action value=reset> 42 <input type=submit value=\" Reset preferences\">40 <input type=submit value=\"".tra("Reset preferences")."\"> 43 41 </form> 44 42 "; 45 43 page_tail(); … … 89 87 $size = getImageSize($file); 90 88 if ($size[2]!=2 and $size[2]!=3){ 91 89 //Not the right kind of file 92 error_page( "Error: Not the right kind of file, only PNG and JPEG are supported.");90 error_page(tra("Error: Not the right kind of file, only PNG and JPEG are supported.")); 93 91 } 94 92 $width = $size[0]; 95 93 $height = $size[1]; … … 115 113 $pm_notification = post_int("pm_notification"); 116 114 $signature = post_str("signature", true); 117 115 if (strlen($signature)>250) { 118 error_page( 119 "Your signature was too long, please keep it less than 250 chars" 120 ); 116 error_page(tra("Your signature was too long, please keep it less than 250 characters.")); 121 117 } 122 118 $forum_sort = post_int("forum_sort"); 123 119 $thread_sort = post_int("thread_sort"); … … 140 136 if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))){ 141 137 $other_user = BoincUser::lookup_id($user_to_add); 142 138 if (!$other_user) { 143 echo "No such user: $other_user";139 echo tra("No such user: %1", $other_user); 144 140 } else { 145 141 add_ignored_user($user, $other_user); 146 142 } … … 154 150 if ($_POST["remove".trim($ignored_users[$i])]!=""){ 155 151 $other_user = BoincUser::lookup_id($ignored_users[$i]); 156 152 if (!$other_user) { 157 echo "No such user: $other_user";153 echo tra("No such user: %1", $other_user); 158 154 } else { 159 155 remove_ignored_user($user, $other_user); 160 156 } -
forum_user_posts.php
70 70 } 71 71 } 72 72 } 73 page_head( "Posts by $user->name");73 page_head(tra("Posts by %1", $user->name)); 74 74 75 75 $posts = BoincPost::enum("user=$userid order by id desc"); 76 76 $n = 0; … … 113 113 if ($offset) { 114 114 $x = $offset - $count; 115 115 echo "<a href=forum_user_posts.php?userid=$userid&offset=$x> 116 <b> Previous $count</b>116 <b>".tra("Previous %1", $count)."</b> 117 117 </a> 118 118 "; 119 119 if ($show_next) echo " | "; … … 122 122 if ($show_next) { 123 123 $offset += $count; 124 124 echo "<a href=forum_user_posts.php?userid=$userid&offset=$offset> 125 <b> Next $count</b>125 <b>".tra("Next %1", $count)."</b> 126 126 </a> 127 127 "; 128 128 } -
add_venue.php
21 21 require_once("../inc/util.inc"); 22 22 require_once("../inc/prefs.inc"); 23 23 24 check_get_args(array("action", "subset", "venue", "cols")); 25 24 26 db_init(); 25 27 26 28 $user = get_logged_in_user(); -
forum_edit.php
38 38 39 39 if (!is_moderator($logged_in_user, $forum)) { 40 40 if (time() > $post->timestamp + MAXIMUM_EDIT_TIME) { 41 error_page( 42 "You can no longer edit this post.<br />Posts can only be edited at most ".(MAXIMUM_EDIT_TIME/60)." minutes after they have been created." 43 ); 41 error_page(tra("You can no longer edit this post.<br/>Posts can only be edited at most %1 minutes after they have been created.", (MAXIMUM_EDIT_TIME/60))); 44 42 } 45 43 } 46 44 47 45 $post_owner = BoincUser::lookup_id($post->user); 48 46 if (($logged_in_user->id != $post_owner->id) || (can_reply($thread, $forum, $logged_in_user) == false)) { 49 error_page ( "You are not authorized to edit this post.");47 error_page (tra("You are not authorized to edit this post.")); 50 48 } 51 49 52 50 $thread_owner = BoincUser::lookup_id($thread->owner); … … 74 72 75 73 if ($can_edit_title){ 76 74 $title = trim($title); 77 $title = s trip_tags($title);75 $title = sanitize_tags($title); 78 76 $title = BoincDb::escape_string($title); 79 77 $thread->update("title='$title'"); 80 78 } … … 85 83 } 86 84 } 87 85 88 page_head( 'Forum','','','', $bbcode_js);86 page_head(tra("Forum"),'','','', $bbcode_js); 89 87 90 88 show_forum_header($logged_in_user); 91 89 switch ($forum->parent_type) { … … 109 107 echo "<form action=\"forum_edit.php?id=".$post->id."\" method=\"POST\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; 110 108 echo form_tokens($logged_in_user->authenticator); 111 109 start_table(); 112 row1( "Edit your message");110 row1(tra("Edit your message")); 113 111 if ($can_edit_title) { 114 112 //If this is the user can edit the thread title display a way of doing so 115 113 if ($preview) { -
hosts_user.php
46 46 if ($userid) { 47 47 $user = lookup_user_id($userid); 48 48 if (!$user) { 49 error_page( "No such user");49 error_page(tra("No such user")); 50 50 } 51 51 52 52 if ($user->show_hosts) { 53 53 page_head(tra("Computers belonging to %1", $user->name)); 54 54 } else { 55 page_head( "Computers hidden");56 echo tra( "This user has chosen not to show information about their computers.");55 page_head(tra("Computers hidden")); 56 echo tra(tra("This user has chosen not to show information about his or her computers.")); 57 57 page_tail(); 58 58 exit(); 59 59 } … … 61 61 } else { 62 62 $user = get_logged_in_user(); 63 63 $userid = $user->id; 64 page_head( "Your computers");64 page_head(tra("Your computers")); 65 65 $private = true; 66 66 } 67 67 -
apps.php
18 18 19 19 require_once("../inc/boinc_db.inc"); 20 20 require_once("../inc/util.inc"); 21 require_once("../inc/translation.inc");22 21 23 22 check_get_args(array("xml")); 24 23 -
forum_search_action.php
87 87 88 88 $search_string="%"; 89 89 foreach ($keyword_list as $key => $word){ 90 $search_string.= mysql_escape_string($word)."%";91 } 90 $search_string.=BoincDb::escape_string($word)."%"; 91 } 92 92 $optional_join = ""; 93 93 // if looking in a single forum, need to join w/ thread table 94 94 // because that's where the link to forum is … … 209 209 } 210 210 211 211 if (!count($thread) && !count($posts)){ 212 echo "<p>Sorry, couldn't find anything matching your search query. You 213 can try to broaden your search by using less words (or less specific words).</p> 214 <p>You can also 215 <a href=\"http://www.google.com/search?domains=".URL_BASE."&sitesearch=".URL_BASE."/forum_thread.php&q=".htmlentities($search_keywords)."\"> 216 try the same search on Google.</a></p>"; 212 echo "<p>".tra("Sorry, couldn't find anything matching your search query. You can try to broaden your search by using less words (or less specific words).")."</p> 213 <p>" 214 .tra("You can also %1try the same search on Google.%2", 215 "<a href=\"http://www.google.com/search?domains=".URL_BASE."&sitesearch=".URL_BASE."/forum_thread.php&q=".htmlentities($search_keywords)."\">", 216 "</a>") 217 ."</p>"; 217 218 } 218 echo "<p><a href=\"forum_search.php\"> Perform another search</a></p>";219 echo "<p><a href=\"forum_search.php\">".tra("Perform another search")."</a></p>"; 219 220 page_tail(); 220 exit;221 221 222 222 $cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit 223 223 ?> -
forum_thread_status.php
40 40 $ret = $thread->update("status=0"); 41 41 } 42 42 if (!$ret){ 43 error_page( "Could not update the status of the thread: ".$thread->id);43 error_page(tra("Could not update the status of the thread: %1", $thread->id)); 44 44 } 45 45 } else { 46 error_page( "You must be the creator of the thread to update its status");46 error_page(tra("You must be the creator of the thread to update its status.")); 47 47 } 48 48 49 49 // -------------- 50 50 51 page_head( "Thread status updated");52 echo "<p> The status has been updated.</p>";53 echo "<p><a href=\"forum_thread.php?nowrap=true&id=".$thread->id."\"> Return to the thread</a></p>";51 page_head(tra("Thread status updated")); 52 echo "<p>".tra("The status has been updated.")."</p>"; 53 echo "<p><a href=\"forum_thread.php?nowrap=true&id=".$thread->id."\">".tra("Return to thread")."</a></p>"; 54 54 page_tail(); 55 55 ?> -
create_profile.php
274 274 $response1 = sanitize_html($response1); 275 275 $response2 = sanitize_html($response2); 276 276 if ($profile) { 277 $query = " response1 = '". boinc_real_escape_string($response1)."',"278 ." response2 = '". boinc_real_escape_string($response2)."',"279 ." language = '". boinc_real_escape_string($language)."',"277 $query = " response1 = '".BoincDb::escape_string($response1)."'," 278 ." response2 = '".BoincDb::escape_string($response2)."'," 279 ." language = '".BoincDb::escape_string($language)."'," 280 280 ." has_picture = '$hasPicture'," 281 281 ." verification = '$profile->verification'" 282 282 ." WHERE userid = '$user->id'"; … … 287 287 } else { 288 288 $query = 'SET ' 289 289 ." userid = '$user->id'," 290 ." language = '". boinc_real_escape_string($language)."',"291 ." response1 = '". boinc_real_escape_string($response1)."',"292 ." response2 = '". boinc_real_escape_string($response2)."',"290 ." language = '".BoincDb::escape_string($language)."'," 291 ." response1 = '".BoincDb::escape_string($response1)."'," 292 ." response2 = '".BoincDb::escape_string($response2)."'," 293 293 ." has_picture = '$hasPicture'," 294 294 ." verification=0"; 295 295 $result = BoincProfile::insert($query); -
edit_forum_preferences_form.php
28 28 $user = get_logged_in_user(); 29 29 BoincForumPrefs::lookup($user); 30 30 31 page_head( "Community preferences");31 page_head(tra("Community preferences")); 32 32 33 33 // output a script for counting chars left in text field 34 34 // … … 48 48 49 49 // ------------ Notification ----------- 50 50 51 row1( "Notifications");51 row1(tra("Notifications")); 52 52 $ch0 = $user->prefs->pm_notification==0?"checked":""; 53 53 $ch1 = $user->prefs->pm_notification==1?"checked":""; 54 54 $ch2 = $user->prefs->pm_notification==2?"checked":""; 55 55 row2( 56 "How should we notify you of new private messages, friend requests, posts in subscribed threads, and other events?",57 "<input type=radio name=pm_notification value=0 $ch0> On my Account page (no email)58 <br><input type=radio name=pm_notification value=1 $ch1> Immediately, by email59 <br><input type=radio name=pm_notification value=2 $ch2> In a single daily email56 tra("How should we notify you of new private messages, friend requests, posts in subscribed threads, and other events?"), 57 "<input type=radio name=pm_notification value=0 $ch0> ".tra("On my Account page (no email)")." 58 <br><input type=radio name=pm_notification value=1 $ch1> ".tra("Immediately, by email")." 59 <br><input type=radio name=pm_notification value=2 $ch2> ".tra("In a single daily email")." 60 60 " 61 61 ); 62 62 … … 72 72 } else { 73 73 $select_0 = "checked=\"true\""; 74 74 } 75 row1( "Message-board identity");76 row2( "Avatar77 <br><span class=\"note\"> An image representing you on the message boards.78 <br> Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels</span>",75 row1(tra("Message-board identity")); 76 row2(tra("Avatar")." 77 <br><span class=\"note\">".tra("An image representing you on the message boards.")." 78 <br>".tra("Format: JPG or PNG. Size: at most 4 KB, 100x100 pixels")."</span>", 79 79 "<input type=\"radio\" id=\"avatar_select_0\" name=\"avatar_select\" value=\"0\" ".$select_0."> 80 <label for=\"avatar_select_0\"> Don't use an avatar</label><br>80 <label for=\"avatar_select_0\">".tra("Don't use an avatar")."</label><br> 81 81 <input type=\"radio\" id=\"avatar_select_1\" name=\"avatar_select\" value=\"1\" ".$select_1."> 82 <label for=\"avatar_select_1\"> Use a Globally Recognized Avatar provided by <a href=\"http://gravatar.com\">Gravatar.com</a></label><br>82 <label for=\"avatar_select_1\">".tra("Use a Globally Recognized Avatar provided by %1", "<a href=\"http://gravatar.com\">Gravatar.com</a>")."</label><br> 83 83 <input type=\"radio\" id=\"avatar_select_2\" name=\"avatar_select\" value=\"2\" ".$select_2."> 84 <label for=\"avatar_select_2\"> Use this uploaded avatar:</label> <input type=\"file\" name=\"picture\">"84 <label for=\"avatar_select_2\">".tra("Use this uploaded avatar:")."</label> <input type=\"file\" name=\"picture\">" 85 85 ); 86 86 if (strlen($user->prefs->avatar)){ 87 row2( "Avatar preview<br><span class=\"note\">This is how your avatar will look</span>",87 row2(tra("Avatar preview")."<br><span class=\"note\">".tra("This is how your avatar will look")."</span>", 88 88 "<img src=\"".$user->prefs->avatar."\" width=\"100\" height=\"100\">"); 89 89 } 90 90 91 if (!$user->prefs->no_signature_by_default){ 92 $signature_by_default="checked=\"checked\""; 93 } else { 94 $signature_by_default=""; 95 } 91 $signature_by_default = $user->prefs->no_signature_by_default==false?"checked=\"checked\"":""; 92 96 93 $signature=$user->prefs->signature; 97 94 $maxlen=250; 98 95 row2( 99 "Signature for message board posts"96 tra("Signature for message board posts") 100 97 .html_info() 101 ."<br><br>Check out <a href=http://boinc.berkeley.edu/links.php#sigs>various free services</a> 102 <br> providing dynamic 'signature images' 103 <br> showing your latest credit info, project news, etc.", 98 ."<br><br>" 99 .tra("Check out %1various free services%2 100 <br> providing dynamic 'signature images' 101 <br> showing your latest credit info, project news, etc.", "<a href=http://boinc.berkeley.edu/links.php#sigs>", "</a>"), 104 102 "<textarea name=\"signature\" rows=4 cols=50 id=\"signature\" onkeydown=\"textCounter(this.form.signature, this.form.remLen,$maxlen);\" 105 103 onkeyup=\"textCounter(this.form.signature, this.form.remLen,250);\">".$signature."</textarea> 106 <br><input name=\"remLen\" type=\"text\" id=\"remLen\" value=\"".($maxlen-strlen($signature))."\" size=\"3\" maxlength=\"3\" readonly> chars remaining107 <br><input type=\"checkbox\" name=\"signature_by_default\" ".$signature_by_default."> Attach signature by default "104 <br><input name=\"remLen\" type=\"text\" id=\"remLen\" value=\"".($maxlen-strlen($signature))."\" size=\"3\" maxlength=\"3\" readonly> ".tra("characters remaining")." 105 <br><input type=\"checkbox\" name=\"signature_by_default\" ".$signature_by_default."> ".tra("Attach signature by default") 108 106 ); 109 107 if ($user->prefs->signature!=""){ 110 row2( "Signature preview".111 "<br><span class=note> This is how your signature will look in the forums</span>",108 row2(tra("Signature preview"). 109 "<br><span class=note>".tra("This is how your signature will look in the forums")."</span>", 112 110 output_transform($user->prefs->signature) 113 111 ); 114 112 } 115 113 116 114 // ------------ Message display ----------- 117 115 118 if ($user->prefs->hide_avatars){ 119 $forum_hide_avatars = "checked=\"checked\""; 120 } else { 121 $forum_hide_avatars = ""; 122 } 123 if ($user->prefs->hide_signatures){ 124 $forum_hide_signatures = "checked=\"checked\""; 125 } else { 126 $forum_hide_signatures = ""; 127 } 116 $forum_hide_avatars = $user->prefs->hide_avatars?"checked=\"checked\"":""; 117 $forum_hide_signatures = $user->prefs->hide_signatures?"checked=\"checked\"":""; 118 $forum_link_popup = $user->prefs->link_popup?"checked=\"checked\"":""; 119 $forum_image_as_link = $user->prefs->images_as_links?"checked=\"checked\"":""; 120 $forum_jump_to_unread = $user->prefs->jump_to_unread?"checked=\"checked\"":""; 121 $forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts?"checked=\"checked\"":""; 122 $forum_highlight_special = $user->prefs->highlight_special?"checked=\"checked\"":""; 128 123 129 if ($user->prefs->link_popup){130 $forum_link_popup="checked=\"checked\"";131 } else {132 $forum_link_popup="";133 }134 if ($user->prefs->images_as_links){135 $forum_image_as_link="checked=\"checked\"";136 } else {137 $forum_image_as_link="";138 }139 if ($user->prefs->jump_to_unread){140 $forum_jump_to_unread="checked=\"checked\"";141 } else {142 $forum_jump_to_unread="";143 }144 if ($user->prefs->ignore_sticky_posts){145 $forum_ignore_sticky_posts="checked=\"checked\"";146 } else {147 $forum_ignore_sticky_posts="";148 }149 if ($user->prefs->highlight_special){150 $forum_highlight_special="checked=\"checked\"";151 } else {152 $forum_highlight_special="";153 }154 155 124 $forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount); 156 125 $forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount); 157 126 158 row1( "Message display");127 row1(tra("Message display")); 159 128 row2( 160 "What to display",161 "<input type=\"checkbox\" name=\"forum_hide_avatars\" ".$forum_hide_avatars."> Hide avatar images<br>162 <input type=\"checkbox\" name=\"forum_hide_signatures\" ".$forum_hide_signatures."> Hide signatures<br>163 <input type=\"checkbox\" name=\"forum_images_as_links\" ".$forum_image_as_link."> Show images as links<br>164 <input type=\"checkbox\" name=\"forum_link_popup\" ".$forum_link_popup."> Open links in new window/tab<br>165 <input type=\"checkbox\" name=\"forum_highlight_special\" ".$forum_highlight_special."> Highlight special users<br>129 tra("What to display"), 130 "<input type=\"checkbox\" name=\"forum_hide_avatars\" ".$forum_hide_avatars."> ".tra("Hide avatar images")."<br> 131 <input type=\"checkbox\" name=\"forum_hide_signatures\" ".$forum_hide_signatures."> ".tra("Hide signatures")."<br> 132 <input type=\"checkbox\" name=\"forum_images_as_links\" ".$forum_image_as_link."> ".tra("Show images as links")."<br> 133 <input type=\"checkbox\" name=\"forum_link_popup\" ".$forum_link_popup."> ".tra("Open links in new window/tab")."<br> 134 <input type=\"checkbox\" name=\"forum_highlight_special\" ".$forum_highlight_special."> ".tra("Highlight special users")."<br> 166 135 " 167 136 ); 168 137 169 row2( "How to sort",170 "Threads: ".select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting)."<br>Posts:".select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting)."<br>171 <input type=\"checkbox\" name=\"forum_jump_to_unread\" ".$forum_jump_to_unread."> Jump to first new post in thread automatically<br>172 <input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" ".$forum_ignore_sticky_posts."> Do not reorder sticky posts<br>173 <input type=\"text\" name=\"forum_minimum_wrap_postcount\" size=3 value=\"".$forum_minimum_wrap_postcount."\"> If a thread contains more than this number of posts<br />174 <input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"".$forum_display_wrap_postcount."\"> only display the first one and this many of the last ones<br />138 row2(tra("How to sort"), 139 tra("Threads:")." ".select_from_array("forum_sort", $forum_sort_styles, $user->prefs->forum_sorting)."<br>".tra("Posts:")." ".select_from_array("thread_sort", $thread_sort_styles, $user->prefs->thread_sorting)."<br> 140 <input type=\"checkbox\" name=\"forum_jump_to_unread\" ".$forum_jump_to_unread."> ".tra("Jump to first new post in thread automatically")."<br> 141 <input type=\"checkbox\" name=\"forum_ignore_sticky_posts\" ".$forum_ignore_sticky_posts.">".tra("Do not reorder sticky posts")."<br> 142 <input type=\"text\" name=\"forum_minimum_wrap_postcount\" size=3 value=\"".$forum_minimum_wrap_postcount."\"> ".tra("If a thread contains more than this number of posts")."<br /> 143 <input type=\"text\" name=\"forum_display_wrap_postcount\" size=3 value=\"".$forum_display_wrap_postcount."\"> ".tra("only display the first one and this many of the last ones")."<br /> 175 144 " 176 145 ); 177 146 178 147 // ------------ Message filtering ----------- 179 148 180 row1( "Message filtering");149 row1(tra("Message filtering")); 181 150 182 151 $filtered_userlist = get_ignored_list($user); 183 152 $forum_filtered_userlist = ""; … … 189 158 echo "Missing user $id"; 190 159 continue; 191 160 } 192 $forum_filtered_userlist .= "<input type =\"submit\" name=\"remove".$filtered_user->id."\" value=\" Remove\"> ".$filtered_user->id." - ".user_links($filtered_user)."<br>";161 $forum_filtered_userlist .= "<input type =\"submit\" name=\"remove".$filtered_user->id."\" value=\"".tra("Remove")."\"> ".$filtered_user->id." - ".user_links($filtered_user)."<br>"; 193 162 } 194 163 } 195 164 196 row2( "Filtered users".197 "<br><span class=note> Ignore message board posts and private messages from these users.</span>",165 row2(tra("Filtered users"). 166 "<br><span class=note>".tra("Ignore message board posts and private messages from these users.")."</span>", 198 167 "$forum_filtered_userlist 199 <input type=\"text\" name=\"forum_filter_user\" size=12> User ID (For instance: 123456789)200 <br><input type=\"submit\" name=\"add_user_to_filter\" value=\" Add user to filter\">168 <input type=\"text\" name=\"forum_filter_user\" size=12> ".tra("User ID (For instance: 123456789)")." 169 <br><input type=\"submit\" name=\"add_user_to_filter\" value=\"".tra("Add user to filter")."\"> 201 170 " 202 171 ); 203 172 204 row1( "Update");205 row2( "Click here to update preferences", "<input type=submit value=\"Update\">");173 row1(tra("Update")); 174 row2(tra("Click here to update preferences"), "<input type=submit value=\"".tra("Update")."\">"); 206 175 echo "</form>\n"; 207 row1( "Reset");208 row2( "Or click here to reset preferences to the defaults",209 "<form method=\"post\" action=\"edit_forum_preferences_action.php\"><input type=\"submit\" value=\" Reset\"><input type=\"hidden\" name=\"action\" value=\"reset_confirm\"></form>"176 row1(tra("Reset")); 177 row2(tra("Or click here to reset preferences to the defaults"), 178 "<form method=\"post\" action=\"edit_forum_preferences_action.php\"><input type=\"submit\" value=\"".tra("Reset")."\"><input type=\"hidden\" name=\"action\" value=\"reset_confirm\"></form>" 210 179 ); 211 180 end_table(); 212 181 page_tail(); -
forum_moderate_post.php
37 37 error_page("No action specified"); 38 38 } 39 39 if (!is_moderator($logged_in_user, $forum)) { 40 error_page( "You are not authorized to moderate this post.");40 error_page(tra("You are not authorized to moderate this post.")); 41 41 } 42 42 43 page_head( 'Moderate post');43 page_head(tra("Moderate post")); 44 44 45 45 echo "<form action=\"forum_moderate_post_action.php?id=".$post->id."\" method=\"POST\">\n"; 46 46 echo form_tokens($logged_in_user->authenticator); … … 49 49 if (get_str('action')=="hide") { 50 50 //display input that selects reason 51 51 echo "<input type=hidden name=action value=hide>"; 52 row1( "Hide post");53 row2( "Reason",52 row1(tra("Hide post")); 53 row2(tra("Reason"), 54 54 "<select name=\"category\"> 55 <option value=\"1\"> Obscene</option>56 <option value=\"2\"> Flame/Hate mail</option>57 <option value=\"3\"> Commercial spam</option>58 <option value=\"4\"> Doublepost</option>59 <option value=\"5\"> User Request</option>60 <option value=\"6\"> Other</option>55 <option value=\"1\">".tra("Obscene")."</option> 56 <option value=\"2\">".tra("Flame/Hate mail")."</option> 57 <option value=\"3\">".tra("Commercial spam")."</option> 58 <option value=\"4\">".tra("Doublepost")."</option> 59 <option value=\"5\">".tra("User Request")."</option> 60 <option value=\"6\">".tra("Other")."</option> 61 61 </select>"); 62 62 } elseif (get_str('action')=="move") { 63 row1( "Move post");63 row1(tra("Move post")); 64 64 echo "<input type=hidden name=action value=move>"; 65 row2( "Destination thread ID:", "<input name=\"threadid\">");66 // tododisplay where to move the post as a dropdown instead of having to get ID65 row2(tra("Destination thread ID:"), "<input name=\"threadid\">"); 66 // TODO: display where to move the post as a dropdown instead of having to get ID 67 67 } elseif (get_str('action')=="banish_user") { 68 68 $userid = get_int('userid'); 69 69 $user = BoincUser::lookup_id($userid); 70 70 BoincForumPrefs::lookup($user); 71 71 if (!$user) { 72 error_page("no user ");72 error_page("no user found"); 73 73 } 74 74 $x = $user->prefs->banished_until; 75 75 if ($x>time()) { 76 error_page( "User is already banished");76 error_page(tra("User is already banished")); 77 77 } 78 row1("Banish user"); 79 row1("Are you sure you want to banish ".$user->name."? 80 This will prevent ".$user->name." from posting for chosen time period.<br /> 81 It should be done only if ".$user->name." 82 has consistently exhibited trollish behavior."); 83 row2("Ban duration", "<select name=\"duration\"> 84 <option value=\"14400\">4 hours</option> 85 <option value=\"86400\">1 day</option> 86 <option value=\"604800\">1 week</option> 87 <option value=\"1209600\" selected=\"selected\">2 weeks</option> 88 <option value=\"2592000\">1 month</option> 89 <option value=\"-1\">Forever</option> 78 row1(tra("Banish user")); 79 row1(tra("Are you sure you want to banish %1?<br/>This will prevent %1 from posting for chosen time period.<br/>It should be done only if %1 has consistently exhibited trollish behavior.", $user->name)); 80 row2(tra("Ban duration"), "<select name=\"duration\"> 81 <option value=\"14400\">".tra("4 hours")."</option> 82 <option value=\"86400\">".tra("1 day")."</option> 83 <option value=\"604800\">".tra("1 week")."</option> 84 <option value=\"1209600\" selected=\"selected\">".tra("2 weeks")."</option> 85 <option value=\"2592000\">".tra("1 month")."</option> 86 <option value=\"-1\">".tra("Forever")."</option> 90 87 </select>"); 91 88 echo "<input type=\"hidden\" name=\"action\" value=\"banish_user\">\n"; 92 89 echo "<input type=\"hidden\" name=\"id\" value=\"".$postid."\">\n"; 93 90 echo "<input type=\"hidden\" name=\"userid\" value=\"".$userid."\">\n"; 94 91 echo "<input type=\"hidden\" name=\"confirmed\" value=\"yes\">\n"; 95 92 } else { 96 error_page( 93 error_page("Unknown action"); 97 94 } 98 95 99 row2("Optional explanation 100 <br><span class=note>This is included in email to user</span>", 96 row2(tra("Optional explanation %1 This is included in email to user.%2", "<br><span class=note>", "</span>"), 101 97 "<textarea name=\"reason\" rows=\"10\" cols=\"80\"></textarea>"); 102 98 103 99 row2( 104 100 "", 105 "<input type=\"submit\" name=\"submit\" value=\" OK\">"101 "<input type=\"submit\" name=\"submit\" value=\"".tra("OK")."\">" 106 102 ); 107 103 108 104 end_table(); -
profile_menu.php
50 50 $user = lookup_user_id($profile->userid); 51 51 echo uotd_thumbnail($profile, $user); 52 52 echo user_links($user)."<br>"; 53 echo sub_sentence(output_transform(s trip_tags($profile->response1)), ' ', 150, true);53 echo sub_sentence(output_transform(sanitize_tags($profile->response1)), ' ', 150, true); 54 54 } 55 55 56 56 echo "</td></tr>"; -
team_edit_action.php
27 27 $teamid = post_int("teamid"); 28 28 $team = BoincTeam::lookup_id($teamid); 29 29 30 if (!$team) error_page( tra("no such team"));30 if (!$team) error_page("no such team"); 31 31 require_admin($user, $team); 32 32 33 $team_url = BoincDb::escape_string(s trip_tags(post_str("url", true)));33 $team_url = BoincDb::escape_string(sanitize_tags(post_str("url", true))); 34 34 $x = strstr($team_url, "http://"); 35 35 if ($x) { 36 36 $team_url = substr($team_url, 7); 37 37 } 38 $team_name = BoincDb::escape_string(s trip_tags(post_str("name")));38 $team_name = BoincDb::escape_string(sanitize_tags(post_str("name"))); 39 39 $team_name_lc = strtolower($team_name); 40 40 41 41 $tnh = post_str("name_html", true); … … 50 50 $country = "International"; 51 51 } 52 52 if (!is_valid_country($country)) { 53 error_page( tra("bad country"));53 error_page("bad country"); 54 54 } 55 55 $joinable = post_str('joinable', true)?1:0; 56 56