Ticket #1007: more.translation.enchancement.patch
File more.translation.enchancement.patch, 8.1 KB (added by , 14 years ago) |
---|
-
team.inc
174 174 } 175 175 } 176 176 row2(tra('New members in last day'), $x); 177 row2(tra('Total members'), "$team->nusers (<a href=team_members.php?teamid=$team->id&offset=0&sort_by=expavg_credit>".tra('view')."</a>)"); 178 row2(tra('Active members'), "$team->nusers_active (<a href=team_members.php?teamid=$team->id&offset=0&sort_by=expavg_credit>".tra('view')."</a>)"); 179 row2(tra('Members with credit'), "$team->nusers_worked (<a href=team_members.php?teamid=$team->id&offset=0&sort_by=total_credit>".tra('view')."</a>)"); 177 $listurl = "team_members.php?teamid=$team->id&offset=0&sort_by="; 178 row2(tra('Total members'), '$team->nusers (<a href="'.$listurl.'expavg_credit">'.tra("view").'</a>)'); 179 row2(tra('Active members'), '$team->nusers_active (<a href="'.$listurl.'expavg_credit">'.tra("view").'</a>)'); 180 row2(tra('Members with credit'), '$team->nusers_worked (<a href="'.$listurl.'total_credit">'.tra("view").'</a>)'); 180 181 end_table(); 181 182 } 182 183 … … 211 212 if ($sort_by == "total_credit") { 212 213 echo '<th>'.tra('Total credit').'</th>'; 213 214 } else { 214 echo "<th><a href=team_members.php?teamid=$team->id&sort_by=total_credit&offset=$offset>".tra('Total credit')."</a></th>";215 echo '<th><a href="team_members.php?teamid=$team->id&sort_by=total_credit&offset=$offset">'.tra("Total credit").'</a></th>'; 215 216 } 216 217 if ($sort_by == "expavg_credit") { 217 218 echo '<th>'.tra('Recent average credit').'</th>'; 218 219 } else { 219 echo "<th><a href=team_members.php?teamid=$team->id&sort_by=expavg_credit&offset=$offset>".tra('Recent average credit').'</a></th>';220 echo '<th><a href="team_members.php?teamid=$team->id&sort_by=expavg_credit&offset=$offset">'.tra("Recent average credit").'</a></th>'; 220 221 } 221 222 } 222 223 } … … 541 542 $name_html = BoincDb::escape_string($name_html); 542 543 $description = BoincDb::escape_string($description); 543 544 if (!is_valid_country($country)) { 544 $country = 'None';545 $country = tra("None"); 545 546 } 546 547 $country = BoincDb::escape_string($country); // for Cote d'Ivoire 547 548 -
user.inc
181 181 case NOTIFY_SUBSCRIBED_POST: 182 182 return subscribed_post_web_line($notify); 183 183 } 184 return "Unknown notification type: $notify->type";184 return tra("Unknown notification type:")." ".$notify->type; 185 185 } 186 186 187 187 function weak_auth($user) { … … 195 195 if (is_valid_email_addr($user->email_addr)) { 196 196 $email_text = $user->email_addr; 197 197 } else { 198 $email_text = "Verification pending";198 $email_text = tra("Verification pending"); 199 199 } 200 200 201 201 row1(tra("Account information")); -
util.inc
89 89 90 90 function show_login($user) { 91 91 if ($user) { 92 echo "Logged in as %s.\n", $user->name;93 echo "<br><a href=\"login_form.php\"> Log in as someone else.</a>\n";92 echo tra("Logged in as")." ".$user->name.".\n"; 93 echo "<br><a href=\"login_form.php\">".tra("Log in as someone else.")."</a>\n"; 94 94 } else { 95 echo "Not logged in.";95 echo tra("Not logged in."); 96 96 } 97 97 } 98 98 … … 173 173 174 174 function db_error_page() { 175 175 page_head("Database error"); 176 echo "A database error occurred while handling your request. 177 <br>Please try again later. 178 "; 176 echo tra("A database error occurred while handling your request.")."<br>".tra("Please try again later."); 179 177 page_tail(); 180 178 } 181 179 … … 200 198 $seconds = (int)($x % 60); 201 199 202 200 $datestring = ""; 203 if ($days) { 204 $datestring .= "$days days "; 205 } 206 if ($hours || strlen($datestring)) { 207 $datestring .= "$hours hours "; 208 } 209 if ($minutes || strlen($datestring)) { 210 $datestring .= "$minutes min "; 211 } 212 if ($seconds) { 213 $datestring .= "$seconds sec"; 214 } 201 if ($days) 202 $datestring .= "$days ".tra("days")." "; 215 203 204 if ($hours || strlen($datestring)) 205 $datestring .= "$hours ".tra("hours")." "; 206 207 if ($minutes || strlen($datestring)) 208 $datestring .= "$minutes ".tra("min")." "; 209 210 if ($seconds) 211 $datestring .= "$seconds ".tra("sec")." "; 212 216 213 return $datestring; 217 214 } 218 215 … … 365 362 366 363 function check_tokens($auth) { 367 364 if (valid_tokens($auth)) return; 368 error_page( 369 "Link has timed out. Please click Back, refresh the page, 370 and try again." 371 ); 365 error_page(tra("Link has timed out. Please click Back, refresh the page, and try again.")); 372 366 } 373 367 374 368 function no_computing() { … … 398 392 $trunc = true; 399 393 break; 400 394 } 401 if ($result) { 395 396 if ($result) 402 397 $result .= " $word"; 403 } else {398 else 404 399 $result = $word; 405 }406 400 } 407 401 408 if ($ellipsis && $trunc) {402 if ($ellipsis && $trunc) 409 403 $result .= "..."; 410 }411 404 412 405 return $result; 413 406 } … … 436 429 } else { 437 430 $img_url = URL_BASE."img/head_20.png"; 438 431 } 439 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title=" View the profile of '.$user->name.'" align="top" src="'.$img_url.'" alt="Profile"></a><br>';432 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title="'.tra("View the profile of").' '.$user->name.'" align="top" src="'.$img_url.'" alt="'.tra("Profile").'"></a><br>'; 440 433 } 441 $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>";434 $x .= ' <a href="'.URL_BASE.'show_user.php?userid='.$user->id.'">'.$user->name.'</a>'; 442 435 if ($user->donated == 1) { 443 436 require_once("../project/donations.inc"); 444 437 $x .= DONATION_LINK; … … 455 448 $x = ""; 456 449 if ($user->has_profile) { 457 450 $img_url = URL_BASE."img/head_20.png"; 458 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title="View the profile of '.$user->name.'" align="top" src="'.$img_url.'" alt=" Profile"></a>';451 $x .= ' <a href="'.URL_BASE.'view_profile.php?userid='.$user->id.'"><img class="userimg" title="View the profile of '.$user->name.'" align="top" src="'.$img_url.'" alt="'.tra("Profile").'"></a>'; 459 452 } 460 $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>";453 $x .= ' <a href="'.URL_BASE.'show_user.php?userid='.$user->id.'">'.$user->name.'</a>'; 461 454 if ($user->donated == 1) { 462 455 require_once("../project/donations.inc"); 463 456 $x .= DONATION_LINK; … … 685 678 if ($generating_xml) { 686 679 xml_error(-183); 687 680 } else { 688 page_head( "Project down for maintenance");689 echo "This page requires database access.681 page_head(tra("Project down for maintenance")); 682 echo tra("This page requires database access. 690 683 Our database server is temporarily shut down for maintenance. 691 684 Please try again later. 692 " ;685 "); 693 686 page_tail(); 694 687 exit(); 695 688 } … … 705 698 check_web_stopped(); 706 699 $retval = db_init_aux($try_replica); 707 700 if ($retval == 1) { 708 echo "Unable to connect to database - please try again later\n";709 echo "Error:", mysql_errno(), mysql_error();701 echo tra("Unable to connect to database - please try again later")."\n"; 702 echo tra("Error:")." ", mysql_errno(), mysql_error(); 710 703 exit(); 711 704 } 712 705 if ($retval == 2) { 713 echo "Unable to select database - please try again later";706 echo tra("Unable to select database - please try again later"); 714 707 echo mysql_error(); 715 708 exit(); 716 709 }