Index: inc/team.inc
===================================================================
--- inc/team.inc	(Revision 20577)
+++ inc/team.inc	(Arbeitskopie)
@@ -261,7 +261,7 @@
 
     if ($offset > 0) {
         $new_offset = $offset - $n;
-        echo "<a href=team_members.php?teamid=$team->id&amp;sort_by=$sort_by&amp;offset=$new_offset>".tra('Last %1', $n)."</a> | ";
+        echo "<a href=team_members.php?teamid=$team->id&amp;sort_by=$sort_by&amp;offset=$new_offset>".tra('Previous %1', $n)."</a> | ";
     }
     if ($j == $offset + $n + 1) {
         $new_offset = $offset + $n;
@@ -358,7 +358,7 @@
     }
     echo "
         <th>".tra('Country')."</th>
-        <th>Type</th>
+        <th>".tra("Type")."</th>
         </tr>
     ";
 }
@@ -407,11 +407,8 @@
         echo "<input type=hidden name=teamid value=$team->id>\n";
     }
     if ($team->seti_id) {
-        echo "<p><span class=error>WARNING: this is a BOINC-wide team.
-            If you make changes here, they will soon be overwritten.
-            Edit the
-            <a href=http://boinc.berkeley.edu/teams/>BOINC-wide team</a>
-            instead.</span>
+        echo "<p><span class=error>".tra("WARNING: this is a BOINC-wide team. If you make changes here, they will soon be overwritten. Edit the %1BOINC-wide team%2 instead.", "<a href=http://boinc.berkeley.edu/teams/>", "</a>")
+        ."</span>
             <p>
         ";
     }
@@ -451,7 +448,7 @@
     
     echo "</select></td></tr>\n";
     $x = $team->joinable?"checked":"";
-    row2("Accept new members?", "<input type=checkbox name=joinable $x>");
+    row2(tra("Accept new members?"), "<input type=checkbox name=joinable $x>");
     row2("",
         "<input type=submit name=new value='$label'>"
     );
Index: user/team_admins.php
===================================================================
--- user/team_admins.php	(Revision 20577)
+++ user/team_admins.php	(Arbeitskopie)
@@ -29,40 +29,35 @@
         <td>$date</td>
         <td>
     ";
-    show_button("team_admins.php?teamid=$admin->teamid&action=remove&userid=$admin_user->id".$tokens, "Remove", "Remove Team Admin status from this member");
+    show_button("team_admins.php?teamid=$admin->teamid&action=remove&userid=$admin_user->id".$tokens, tra("Remove"), tra("Remove Team Admin status from this member"));
     echo "</td></tr>
     ";
 }
 
 function show_admins($user, $teamid) {
-    page_head("Add or remove Team Admins");
-    echo "
-        You can select team members as 'Team Admins'.
-        Team Admins can:
+    page_head(tra("Add or remove Team Admins"));
+    echo tra("You can select team members as 'Team Admins'. Team Admins can:")."
         <ul>
-        <li> Edit team information (name, URL, description, country).
-        <li> View the team's join/quit history.
-        <li> Moderate the team forum, if any (admins get emails notification
-            of moderation events and red X reports).
+        <li>".tra("Edit team information (name, URL, description, country)")."
+        <li>".tra("View the team's join/quit history")."
+        <li>".tra("Moderate the team forum, if any (admins get email notification of moderation events and red X reports)")."
         </ul>
-        Team Admins cannot:
+        ".tra("Team Admins cannot:")."
         <ul>
-        <li> Change the team founder.
-        <li> Remove members.
-        <li> Add or remove Team Admins.
+        <li>".tra("Change the team founder")."
+        <li>".tra("Remove members")."
+        <li>".tra("Add or remove Team Admins")."
         </ul>
-        If a Team Admin quits the team, they cease to be a Team Admin.
-        <p>
-        We recommend that you select only people
-        you know and trust very well as Team Admins.
-    ";
+        ".tra("If a Team Admin quits the team, they cease to be a Team Admin.")."
+        <br /><br />".tra("We recommend that you select only people you know and trust very well as Team Admins.")
+    ;
     $admins = BoincTeamAdmin::enum("teamid=$teamid");
     start_table();
     if (count($admins)==0) {
-        row1("There are currently no Team Admins");
+        row1(tra("There are currently no Team Admins"));
     } else {
-        row1("Current Team Admins", 3);
-        table_header("Name", "Became Team Admin on", "");
+        row1(tra("Current Team Admins"), 3);
+        table_header(tra("Name"), tra("Became Team Admin on"), "");
         foreach ($admins as $admin) {
             show_admin($user, $admin);
         }
@@ -77,9 +72,9 @@
     ";
     echo form_tokens($user->authenticator);
     start_table();
-    row1("Add Team Admin");
-    row2("Email address of team member:", "<input name=email_addr>");
-    row2("", "<input type=submit action value=\"Add\">");
+    row1(tra("Add Team Admin"));
+    row2(tra("Email address of team member:"), "<input name=email_addr>");
+    row2("", "<input type=submit action value=\"".tra("Add")."\">");
     end_table();
     echo "</form>";
 
@@ -90,27 +85,27 @@
     $userid = get_int('userid');
     $ret = BoincTeamAdmin::delete("teamid=$team->id and userid=$userid");
     if (!$ret) {
-        error_page("failed to remove admin");
+        error_page(tra("failed to remove admin"));
     }
 }
 
 function add_admin($team) {
     $email_addr = get_str('email_addr');
     $user = BoincUser::lookup("email_addr='$email_addr'");
-    if (!$user) error_page("no such user");
-    if ($user->teamid != $team->id) error_page("User is not member of team");
+    if (!$user) error_page(tra("no such user"));
+    if ($user->teamid != $team->id) error_page(tra("User is not member of team"));
     if (is_team_admin($user, $team)) {
-        error_page("$email_addr is already an admin of $team->name");
+        error_page(tra("%1 is already an admin of %2", $email_addr, $team->name));
     }
     $now = time();
     $ret = BoincTeamAdmin::insert("(teamid, userid, create_time) values ($team->id, $user->id, $now)");
-    if (!$ret) error_page("Couldn't add admin");
+    if (!$ret) error_page(tra("Couldn't add admin"));
 }
 
 $user = get_logged_in_user();
 $teamid = get_int('teamid');
 $team = BoincTeam::lookup_id($teamid);
-if (!$team) error_page("No such team");
+if (!$team) error_page(tra("No such team"));
 require_founder_login($user, $team);
 
 $action = get_str('action', true);
Index: user/team_change_founder_action.php
===================================================================
--- user/team_change_founder_action.php	(Revision 20577)
+++ user/team_change_founder_action.php	(Arbeitskopie)
@@ -25,7 +25,7 @@
 $teamid = post_int("teamid");
 $team = BoincTeam::lookup_id($teamid);
 if (!$team) {
-    error_page("No such team");
+    error_page(tra("no such team"));
 }
 require_founder_login($user, $team);
 check_tokens($user->authenticator);
@@ -33,12 +33,12 @@
 $userid = post_int("userid");
 $new_founder = BoincUser::lookup_id($userid);
 if (!$new_founder || $new_founder->teamid != $team->id) {
-    error_page( "User is not a member of $team->name");
+    error_page(tra("User is not a member of %1", $team->name));
 }
 
-page_head("Changing founder of $team->name");
+page_head(tra("Changing founder of %1", $team->name));
 $team->update("userid=$userid, ping_user=0");
-echo "$new_founder->name is now founder of $team->name";
+echo tra("%1 is now founder of %2", $new_founder->name, $team->name);
 page_tail();
 
 ?>
Index: user/team_change_founder_form.php
===================================================================
--- user/team_change_founder_form.php	(Revision 20577)
+++ user/team_change_founder_form.php	(Arbeitskopie)
@@ -28,64 +28,53 @@
 $teamid = get_int("teamid");
 $team = BoincTeam::lookup_id($teamid);
 if (!$team) {
-    error_page("no such team");
+    error_page(tra("no such team"));
 }
 require_founder_login($user, $team);
 
-page_head("Change founder of $team->name");
+page_head(tra("Change founder of %1", $team->name));
 
 if ($team->ping_user != 0) {
     if ($team->ping_user < 0) {
         $ping_user = BoincUser::lookup_id(-$team->ping_user);
         $x = date_str($team->ping_time);
-        echo "<p>Team member ".user_links($ping_user)." requested this
-            team's foundership on $x, but left the team, thus canceling the request.
-        ";
+        echo "<p>".tra("Team member %1 requested this team's foundership on %2, but left the team, thus canceling the request.", user_links($ping_user), $x)
+        ."</p>";
         $team->update("ping_user=0, ping_time=0");
     } else {
         $ping_user = BoincUser::lookup_id($team->ping_user);
         $x = date_str(transfer_ok_time($team));
-        echo "<p>Team member ".user_links($ping_user)." has requested this
-            team's foundership.
-            This may be because you left the team or haven't had contact
-            with the team for a long time.
-        ";
+        echo "<p>".tra("Team member %1 has requested this team's foundership. This may be because you left the team or haven't had contact with the team for a long time.", user_links($ping_user))
+        ."</p>";
         echo "<p>
             <form method=\"post\" action=\"team_founder_transfer_action.php\">
             <input type=\"hidden\" name=\"action\" value=\"decline\">
             <input type=\"hidden\" name=\"teamid\" value=\"".$team->id."\">
-            To decline the request, <input type=\"submit\" value=\"click here\">
+            <input type=\"submit\" value=\"".tra("decline request")."\">
             </form>
             <p>
-            If you don't decline the request by $x,
-            $ping_user->name will have the option of
-            assuming team foundership.
-            <p>
-            To accept the request, assign foundership to $ping_user->name
-            using the form below.
-            <p>
+            ".tra("If you don't decline the request by %1, %2 will have the option of assuming team foundership.<br /><br />
+                  To accept the request, assign foundership to %3 using the form below.", $x, $ping_user->name, $ping_user->name)."
+            </p>
             <hr>
             <p>
         ";
     }
 } else {
-    echo "No transfer request is pending.<p>";
+    echo tra("No transfer request is pending.")."<br /><br />";
 }
 
-echo "
-    To assign foundership of this team to another member,
-    check the box next to member name and click <b>Change founder</b> below.
-    <form method=post action=team_change_founder_action.php>
-    <input type=hidden name=teamid value=$team->id>
-";
+echo tra("To assign foundership of this team to another member, check the box next to member name and click <strong>Change founder</strong> below.")
+    ."<form method=post action=team_change_founder_action.php>
+    <input type=hidden name=teamid value=$team->id>";
 echo form_tokens($user->authenticator);
 
 start_table();
 echo "<tr>
-    <th>New founder?</th>
-    <th>Name</th>
-    <th>Total credit</th>
-    <th>Recent average credit</th>
+    <th>".tra("New founder?")."</th>
+    <th>".tra("Name")."</th>
+    <th>".tra("Total credit")."</th>
+    <th>".tra("Recent average credit")."</th>
     </tr>
 ";
 
@@ -111,10 +100,10 @@
 if ($navailable_users > 0) {
     echo "<input type=hidden name=navailable_users value=$navailable_users>";
     end_table();
-    echo "<input type=submit value=\"Change founder\">";
+    echo "<input type=submit value=\"".tra("Change founder")."\">";
 } else {
     echo '<tr>
-        <td colspan="4">There are no users to transfer team to.</td>
+        <td colspan="4">".tra("There are no users to transfer team to.")."</td>
         </tr>
     ';
     end_table();
Index: user/team_delta.php
===================================================================
--- user/team_delta.php	(Revision 20577)
+++ user/team_delta.php	(Arbeitskopie)
@@ -61,20 +61,20 @@
     if ($xml) {
         xml_error("-1", "Not founder or admin");
     } else {
-        error_page("Not founder or admin");
+        error_page(tra("Not founder or admin"));
     }
 }
 
 if ($xml) {
     echo "<actions>\n";
 } else {
-    page_head("Team history for $team->name");
+    page_head(tra("Team history for %1", $team->name));
     start_table();
     echo "<tr>
-        <th>When</th>
-        <th>User</th>
-        <th>Action</th>
-        <th>Total credit at time of action</th>
+        <th>".tra("When")."</th>
+        <th>".tra("User")."</th>
+        <th>".tra("Action")."</th>
+        <th>".tra("Total credit at time of action")."</th>
         </tr>
     ";
 }
Index: user/team_display.php
===================================================================
--- user/team_display.php	(Revision 20577)
+++ user/team_display.php	(Arbeitskopie)
@@ -64,7 +64,7 @@
 }
 
 if (!$team) {
-    error_page("No such team");
+    error_page(tra("no such team"));
 }
 
 display_team_page($team, $user);
Index: user/team_edit_action.php
===================================================================
--- user/team_edit_action.php	(Revision 20577)
+++ user/team_edit_action.php	(Arbeitskopie)
@@ -25,7 +25,7 @@
 $teamid = post_int("teamid");
 $team = BoincTeam::lookup_id($teamid);
 
-if (!$team) error_page("no such team");
+if (!$team) error_page(tra("no such team"));
 require_admin($user, $team);
 
 $team_url = BoincDb::escape_string(strip_tags(post_str("url", true)));
@@ -48,16 +48,16 @@
     $country = "International";
 }
 if (!is_valid_country($country)) {
-    error_page("bad country");
+    error_page(tra("bad country"));
 }
 $joinable = post_str('joinable', true)?1:0;
 
 $t = BoincTeam::lookup("name='$team_name'");
 if ($t && $t->id != $teamid) {
-    error_page("The name '$team_name' is being used by another team.");
+    error_page(tra("The name '%1' is being used by another team.", $team_name));
 }
 if (strlen($team_name) == 0) {
-    error_page("Must specify team name");
+    error_page(tra("Must specify team name"));
     // Should be caught up with the post_str("name"),
     // but you can never be too safe.
 }
@@ -85,7 +85,7 @@
 if ($ret) {
     Header("Location: team_display.php?teamid=$team->id");
 } else {
-    error_page("Could not update team - please try later.");
+    error_page(tra("Could not update team - please try again later."));
 }
 
 ?>
Index: user/team_edit_form.php
===================================================================
--- user/team_edit_form.php	(Revision 20577)
+++ user/team_edit_form.php	(Arbeitskopie)
@@ -24,12 +24,12 @@
 
 $teamid = get_int("teamid");
 $team = BoincTeam::lookup_id($teamid);
-if (!$team) error_page("no such team");
+if (!$team) error_page(tra("no such team"));
 require_admin($user, $team);
 
 $team_name = strtr($team->name, '"', "'");
-page_head("Edit ".$team_name);
-team_edit_form($team, "Update team info", "team_edit_action.php");
+page_head(tra("Edit %1", $team_name));
+team_edit_form($team, tra("Update team info"), "team_edit_action.php");
 page_tail();
 
 ?>
Index: user/team_email_list.php
===================================================================
--- user/team_email_list.php	(Revision 20577)
+++ user/team_email_list.php	(Arbeitskopie)
@@ -49,16 +49,16 @@
 $teamid = get_int("teamid");
 $plain = get_int("plain", true);
 $team = BoincTeam::lookup_id($teamid);
-if (!$team) error_page("no such team");
+if (!$team) error_page(tra("no such team"));
 require_founder_login($user, $team);
 
 if ($plain) {
     header("Content-type: text/plain");
 } else {
-    page_head("$team->name Email List");
+    page_head(tra("%1 Email List", $team->name));
     start_table();
-    table_header(array("Member list of ".$team->name, "colspan=\"6\""));
-    table_header("Name", "Email address", "Total credit", "Recent average credit", "Country");
+    table_header(array(tra("Member list of %1", $team->name), "colspan=\"6\""));
+    table_header(tra("Name"), tra("Email address"), tra("Total credit"), tra("Recent average credit"), tra("Country"));
 }
 $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
 foreach($users as $user) {
@@ -72,7 +72,7 @@
 } 
 if (!$plain) {
     end_table();
-    echo "<p><a href=\"team_email_list.php?teamid=".$teamid."&amp;plain=1\">Show as plain text</a></p>";
+    echo "<p><a href=\"team_email_list.php?teamid=".$teamid."&amp;plain=1\">".tra("Show as plain text")."</a></p>";
     page_tail();
 }
 
Index: user/team_forum.php
===================================================================
--- user/team_forum.php	(Revision 20577)
+++ user/team_forum.php	(Arbeitskopie)
@@ -23,20 +23,19 @@
 require_once("../inc/forum_db.inc");
 
 function create_confirm($user, $team) {
-    page_head("Create Message Board");
-    echo "
-        You may create a Message Board for use by $team->name.
+    page_head(tra("Create Message Board"));
+    echo tra("You may create a message board for use by %1.", $team->name)."
         <ul>
-        <li> Only team members will be able to post.
-        <li> At your option, only members will be able to read.
-        <li> You and your Team Admins will have moderator privileges.
+        <li>".tra("Only team members will be able to post.")."
+        <li>".tra("At your option, only members will be able to read.")."
+        <li>".tra("You and your Team Admins will have moderator privileges.")."
         </ul>
     ";
     $tokens = url_tokens($user->authenticator);
     show_button(
         "team_forum.php?teamid=$team->id&cmd=create$tokens",
-        "Create Message Board",
-        "Create a Message Board for $team->name"
+        tra("Create Message Board"),
+        tra("Create a message board for %1", $team->name)
     );
     page_tail();
 }
@@ -44,18 +43,18 @@
 function create_forum($user, $team) {
     $f = BoincForum::lookup("parent_type=1 and category=$team->id");
     if ($f) {
-        error_page("Team already has a forum");
+        error_page(tra("Team already has a message board"));
     }
     $id = BoincForum::insert("(category, parent_type) values ($team->id, 1)");
     $forum = BoincForum::lookup_id($id);
     if (!$forum) {
-        error_page("couldn't create forum");
+        error_page(tra("couldn't create message board"));
     }
     edit_form($user, $team, $forum, true);
 }
 
 function edit_form($user, $team, $forum, $first) {
-    page_head("Team forum");
+    page_head(tra("Team Message Board"));
     echo "
         <form action=team_forum.php method=post>
         <input type=hidden name=teamid value=$team->id>
@@ -64,19 +63,19 @@
     echo form_tokens($user->authenticator);
     start_table();
     if (!strlen($forum->title)) $forum->title = $team->name;
-    if (!strlen($forum->description)) $forum->description = "Discussion among members of $team->name";
-    row2("Title", "<input name=title value=\"$forum->title\">");
-    row2("Description", "<textarea name=description>$forum->description</textarea>");
-    row2("Minimum time between posts (seconds)",
+    if (!strlen($forum->description)) $forum->description = tra("Discussion among members of %1", $team->name);
+    row2(tra("Title"), "<input name=title value=\"$forum->title\">");
+    row2(tra("Description"), "<textarea name=description>$forum->description</textarea>");
+    row2(tra("Minimum time between posts (seconds)"),
         "<input name=post_min_interval value=$forum->post_min_interval>"
     );
-    row2("Minimum total credit to post",
+    row2(tra("Minimum total credit to post"),
         "<input name=post_min_total_credit value=$forum->post_min_total_credit>"
     );
-    row2("Minimum average credit to post",
+    row2(tra("Minimum average credit to post"),
         "<input name=post_min_expavg_credit value=$forum->post_min_expavg_credit>"
     );
-    row2("", "<input type=submit value=OK>");
+    row2("", "<input type=submit value=".tra("Submit").">");
     end_table();
     echo "
         </form>
@@ -85,7 +84,7 @@
         echo "
             <p>
             <a href=team_forum.php?teamid=$team->id&cmd=remove_confirm$tokens>
-            Remove your team's message board.</a>
+            ".tra("Remove your team's message board.")."</a>
         ";
     }
     page_tail();
@@ -93,20 +92,17 @@
 
 function remove_confirm($user, $team) {
     $tokens = url_tokens($user->authenticator);
-    page_head("Really remove message board?");
-    echo "
-        Are you sure you want to remove your team's message board?
-        All threads and posts will be permanently removed.
-        (You may, however, create a new message board later).
-        <p>
-        <a href=team_forum.php?teamid=$team->id&cmd=remove>Yes - remove message board</a>
+    page_head(tra("Really remove message board?"));
+    echo tra("Are you sure you want to remove your team's message board? All threads and posts will be permanently removed. (You may, however, create a new message board later).")
+        ."<br /><br />
+        <a href=team_forum.php?teamid=$team->id&cmd=remove>".tra("Yes - remove message board")."</a>
     ";
     page_tail();
 }
 
 function remove($team) {
     $forum = BoincForum::lookup("parent_type=1 and category=$team->id");
-    if (!$forum) error_page("not found");
+    if (!$forum) error_page(tra("message board not found"));
     
     // delete threads and posts
     //
@@ -120,7 +116,9 @@
     }
     $forum->delete();
 
-    page_head("Message board removed");
+    page_head(tra("Message board removed"));
+    echo tra("<p>".tra("Your teams message board has been removed. You may now %1create a new one%2."), "<a href=team_forum.php?teamid=$team->id&cmd=manage>", "</a>")
+        ."</p>";
     page_tail();
 }
 
@@ -134,18 +132,18 @@
     $post_min_expavg_credit = post_int('post_min_expavg_credit');
     $ret = $forum->update("title='$title', description='$description', post_min_interval=$post_min_interval, post_min_total_credit=$post_min_total_credit, post_min_expavg_credit=$post_min_expavg_credit");
     if ($ret) {
-        page_head("Team Message Board Updated");
-        echo "Update successful";
+        page_head(tra("Team Message Board Updated"));
+        echo tra("Update successful");
         page_tail();
     } else {
-        error_page("update failed");
+        error_page(tra("Update failed"));
     }
 }
 
 function show_forum($team) {
     $forum = BoincForum::lookup("parent_type=1 and category=$team->id");
     if (!$forum) {
-        error_page("team has no forum");
+        error_page(tra("team has no forum"));
     }
     Header("Location: forum_forum.php?id=$forum->id");
 }
@@ -155,7 +153,7 @@
 
 $team = BoincTeam::lookup_id($teamid);
 if (!$team) {
-    error_page("no such team");
+    error_page(tra("no such team"));
 }
 
 $cmd = get_str('cmd', true);
@@ -180,7 +178,7 @@
     require_founder_login($user, $team);
     check_tokens($user->authenticator);
     $forum = BoincForum::lookup("parent_type=1 and category=$teamid");
-    if (!$forum) error_page("no forum");
+    if (!$forum) error_page(tra("no such forum"));
     edit_action($forum);
 } else if ($cmd == "remove_confirm") {
     $user = get_logged_in_user();
@@ -191,7 +189,7 @@
     require_founder_login($user, $team);
     remove($team);
 } else if ($cmd != "") {
-    error_page("unknown command $cmd");
+    error_page(tra("unknown command %1", $cmd));
 } else {
     show_forum($team);
 }
Index: user/team_founder_transfer_action.php
===================================================================
--- user/team_founder_transfer_action.php	(Revision 20577)
+++ user/team_founder_transfer_action.php	(Arbeitskopie)
@@ -16,8 +16,10 @@
 // You should have received a copy of the GNU Lesser General Public License
 // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
-// action = 'transfer':
-//    handle a user's request to initiate a foundership transfer 
+// action = 'initiate_transfer':
+//    handle a user's request to initiate a foundership transfer
+// action = 'finalize_transfer':
+//    handle a user's request to finalize a foundership transfer 
 // action = 'decline':
 //    handle the current founder's declining of the request
 
@@ -29,7 +31,7 @@
 
 $user = get_logged_in_user();
 if (!$user->teamid) {
-    error_page("You must be a member of a team to access this page.");
+    error_page(tra("You must be a member of a team to access this page."));
 }
 
 function send_founder_transfer_email($team, $user) {
@@ -83,7 +85,7 @@
     $team = BoincTeam::lookup_id($user->teamid);
     $now = time();
     if (new_transfer_request_ok($team, $now)) {
-        page_head("Requesting foundership of ".$team->name);
+        page_head(tra("Requesting foundership of %1", $team->name));
         $success = send_founder_transfer_email($team, $user);
 
         // Go ahead with the transfer even if the email send fails.
@@ -91,56 +93,46 @@
         // whose founder email is invalid
         //
         $team->update("ping_user=$user->id, ping_time=$now");
-        echo "<p>
-            The current founder has been notified of your request by email
-            and private message.
-            <p>
-            If the founder does not respond within 60 days you will be
-            allowed to become the founder.
-            <p>
-        ";
+        echo "<p>".tra("The current founder has been notified of your request by email and private message.<br /><br />
+                       If the founder does not respond within 60 days you will be allowed to become the founder.")
+        ."</p>\n";
     } else {
-        error_page("Foundership request not allowed now");
+        error_page(tra("Foundership request not allowed now"));
     }
     break;
 case "finalize_transfer":
     $team = BoincTeam::lookup_id($user->teamid);
     $now = time();
     if ($user->id == $team->ping_user && transfer_ok($team, $now)) {
-        page_head("Assumed foundership of ".$team->name);
+        page_head(tra("Assumed foundership of %1", $team->name));
         $team->update("userid=$user->id, ping_user=0, ping_time=0");
-        echo "
-            Congratulations, you are now the founder of team ".$team->name."
-            Go to <a href=\"".URL_BASE."home.php\">Your Account page</a>
-            to find the Team Admin options.
-        ";
+        echo tra("Congratulations, you are now the founder of team %1. Go to %2Your Account page%3 to find the Team Admin options.", $team->name, "<a href=\"".URL_BASE."home.php\">", "</a>");
     } else {
-        error_page("Foundership request not allowed now");
+        error_page(tra("Foundership request not allowed now"));
     }
     break;
 case "decline":
     $teamid = post_int("teamid");
     $team = lookup_team($teamid);
     require_founder_login($user, $team);
-    page_head("Decline founder change request");
+    page_head(tra("Decline founder change request"));
     
     if ($team->ping_user) {
         $ping_user = BoincUser::lookup_id($team->ping_user);
         
         $team->update("ping_user=0");
         send_founder_transfer_decline_email($team, $ping_user);
-        echo "<p>The foundership request from ".user_links($ping_user)
-            ." has been declined.
-        ";
+        echo "<p>".tra("The foundership request from %1 has been declined.", user_links($ping_user))
+        ."</p>";
     } else {
-        echo "<p>There were no foundership requests.";
+        echo "<p>".tra("There were no foundership requests.")."</p>";
     }
     break;
 default:
-    error_page("undefined action $action");
+    error_page(tra("undefined action %1", $action));
 }
 
-echo "<a href='team_display.php?teamid=$team->id'>Return to team page</a>";
+echo "<a href='team_display.php?teamid=$team->id'>".tra("Return to team page")."</a>";
 
 page_tail();
 
Index: user/team_founder_transfer_form.php
===================================================================
--- user/team_founder_transfer_form.php	(Revision 20577)
+++ user/team_founder_transfer_form.php	(Arbeitskopie)
@@ -23,58 +23,44 @@
 $user = get_logged_in_user();
 $team = BoincTeam::lookup_id($user->teamid);
 if (!$team) {
-    error_page("You need to be a member of a team to access this page.");
+    error_page(tra("You need to be a member of a team to access this page."));
 }
 
-page_head("Request foundership of $team->name");
+page_head(tra("Request foundership of %1", $team->name));
 $now = time();
 
 // it should never happen, but just in case
 //
 if (!$team->userid) {
     $team->update("userid=$user->id, ping_user=0, ping_time=0");
-    echo "You are now founder of team $team->name.";
+    echo tra("You are now founder of team %1.", $team->name);
     page_tail();
     exit;
 }
 
 if ($user->id == $team->ping_user) {
-    echo "<p>You requested the foundership of $team->name
-        on ".date_str($team->ping_time).".
-    ";
+    echo "<p>".tra("You requested the foundership of %1 on %2.", $team->name, date_str($team->ping_time))."
+    </p>";
     if (transfer_ok($team, $now)) {
-        echo "
-            60 days have elapsed since your request,
-            and the founder has not responded.
-            You may now assume foundership by clicking here:
-            <form method=\"post\" action=\"team_founder_transfer_action.php\">
+        echo tra("60 days have elapsed since your request, and the founder has not responded. You may now assume foundership by clicking here:")
+            ."<form method=\"post\" action=\"team_founder_transfer_action.php\">
             <input type=\"hidden\" name=\"action\" value=\"finalize_transfer\">
-            <input type=\"submit\" value=\"Assume foundership\">
+            <input type=\"submit\" value=\"".tra("Assume foundership")."\">
             </form>
         ";
     } else {
-        echo "<p>
-            The founder was notified of your request.
-            If he/she does not respond by ".date_str(transfer_ok_time($team))."
-            you will be given an option to become founder.
-        ";
+        echo "<p>".tra("The founder was notified of your request. If he/she does not respond by %1 you will be given an option to become founder.", date_str(transfer_ok_time($team)))
+        ."</p>";
     }
 } else {
     if (new_transfer_request_ok($team, $now)) {
         echo "<form method=\"post\" action=\"team_founder_transfer_action.php\">";
-        echo "<p>If the team founder is not active and you want to assume
-            the role of founder, click the button below.
-            The current founder will be sent an email detailing your request,
-            and will be able to transfer foundership to you
-            or to decline your request.
-            If the founder does not respond in 60 days,
-            you will be allowed to become the founder.
-            <p>
-            Are you sure you want to request foundership?
-        ";
+        echo "<p>".tra("If the team founder is not active and you want to assume the role of founder, click the button below. The current founder will be sent an email detailing your request, and will be able to transfer foundership to you or to decline your request. If the founder does not respond in 60 days, you will be allowed to become the founder.<br /><br />
+                       Are you sure you want to request foundership?")
+        ."</p>";
 
         echo "<input type=\"hidden\" name=\"action\" value=\"initiate_transfer\">
-            <input type=\"submit\" value=\"Request foundership\">
+            <input type=\"submit\" value=\"".tra("Request foundership")."\">
             </form>
         ";
     } else {
@@ -83,19 +69,16 @@
                 $team->ping_user = -$team->ping_user;
             }
             $ping_user = BoincUser::lookup_id($team->ping_user);
-            echo "<p>Founder change has already been requested by ".
-                user_links($ping_user)." on ".date_str($team->ping_time).".
-            ";
+            echo "<p>".tra("Founder change has already been requested by %1 on %2.", user_links($ping_user), date_str($team->ping_time))
+            ."</p>";
         } else {
-            echo "<p>A foundership change was requested during the last 90 days,
-                 so new requests are not allowed.
-                 Please try again later.
-            ";
+            echo "<p>".tra("A foundership change was requested during the last 90 days, so new requests are not allowed. Please try again later.")
+            ."</p>";
         }
     }
 }
 
-echo "<p><a href=\"team_display.php?teamid=".$team->id."\">Return to team page</a>";
+echo "<p><a href=\"team_display.php?teamid=".$team->id."\">".tra("Return to team page")."</a>";
 
 page_tail();
 
Index: user/team_join_action.php
===================================================================
--- user/team_join_action.php	(Revision 20577)
+++ user/team_join_action.php	(Arbeitskopie)
@@ -27,20 +27,18 @@
 $team = BoincTeam::lookup_id($teamid);
 require_team($team);
 if (!$team->joinable) {
-    error_page("The team is not joinable.");
+    error_page(tra("The team %1 is not joinable.", $team->name));
 }
 if ($user->teamid == $team->id) {
-    page_head("Unable to add $user->name");
-    echo "You are already a member of $team->name.";
+    page_head(tra("Already a member"));
+    echo tra("You are already a member of %1.", $team->name);
 } else {
     $success = user_join_team($team, $user);
     if ($success) {
-        page_head("Joined $team->name");
-        echo "You have joined
-            <a href=team_display.php?teamid=$team->id>$team->name</a>.
-        ";
+        page_head(tra("Joined %1", $team->name));
+        echo tra("You have joined %1.", "<a href=team_display.php?teamid=$team->id>$team->name</a>");
     } else {
-        error_page("Couldn't join team - please try later.");
+        error_page(tra("Couldn't join team - please try again later."));
     }
 }
 
Index: user/team_join_form.php
===================================================================
--- user/team_join_form.php	(Revision 20577)
+++ user/team_join_form.php	(Arbeitskopie)
@@ -26,21 +26,21 @@
 
 $team = lookup_team($teamid);
 if (!$team->joinable) {
-    error_page("The team is not joinable.");
+    error_page(tra("The team %1 is not joinable.", $team->name));
 }
 $team_name = $team->name;
-page_head("Join $team_name");
-echo " <p><b>Please note:</b>
+page_head(tra("Join %1", $team_name));
+echo " <p><b>".tra("Please note:")."</b>
     <ul>
-    <li> Joining a team gives its founder access to your email address.
-    <li> Joining a team does not affect your account's credit.
+    <li>".tra("Joining a team gives its founder access to your email address.")."
+    <li>".tra("Joining a team does not affect your account's credit.")."
     </ul>
     <hr>
     <form method=\"post\" action=\"team_join_action.php\">";
 echo form_tokens($user->authenticator);
 echo "
     <input type=\"hidden\" name=\"teamid\" value=\"$teamid\">
-    <input type=\"submit\" value=\"Join team\">
+    <input type=\"submit\" value=\"".tra("Join team")."\">
     </form>
 ";
 page_tail();
Index: user/team_join.php
===================================================================
--- user/team_join.php	(Revision 20577)
+++ user/team_join.php	(Arbeitskopie)
@@ -27,17 +27,17 @@
 $team = BoincTeam::lookup_id($teamid);
 require_team($team);
 if (!$team->joinable) {
-    error_page("The team is not joinable.");
+    error_page(tra("The team %1 is not joinable.", $team->name));
 }
 if ($user->teamid == $team->id) {
-    page_head("Already a member");
-    echo "You are already a member of $team->name.";
+    page_head(tra("Already a member"));
+    echo tra("You are already a member of %1.", $team->name);
 } else {
     $success = user_join_team($team, $user);
     if ($success) {
         Header("Location: home.php");
     } else {
-        error_page("Couldn't join team - please try later.");
+        error_page(tra("Couldn't join team - please try again later."));
     }
 }
 
Index: user/team_lookup.php
===================================================================
--- user/team_lookup.php	(Revision 20577)
+++ user/team_lookup.php	(Arbeitskopie)
@@ -59,11 +59,11 @@
     exit();
 }
 
-page_head("Search Results");
+page_head(tra("Search Results"));
 if (count($teams)) {
-    echo "<h2>Search results for '".strip_tags($team_name)."'</h2>";
+    echo "<h2>".tra("Search results for '%1'", strip_tags($team_name))."</h2>";
     echo "<p>";
-    echo "You may view these teams' members, statistics, and information.";
+    echo tra("You may view these teams' members, statistics, and information.");
     echo "<ul>";
     foreach($teams as $team) {
         echo "<li>";
@@ -72,15 +72,12 @@
     }
     echo "</ul>";
     if (count($teams)==100) {
-        echo "
-            More than 100 teams match your search.
-            The first 100 are shown.<br>
-        ";
+        echo tra("More than 100 teams match your search. The first 100 are shown.")
+        ."<br>\n";
     }
 }
-echo "End of results<br>";
-echo "If you cannot find the team you are looking for, you may create a team ";
-echo "by clicking <a href=team_create_form.php>here</a>.";
+echo tra("End of results<br>
+         If you cannot find the team you are looking for, you may %1create a team%2 by yourself.", "<a href=team_create_form.php>", "</a>");
 page_tail();
 
 ?>
Index: user/team_manage.php
===================================================================
--- user/team_manage.php	(Revision 20577)
+++ user/team_manage.php	(Arbeitskopie)
@@ -21,20 +21,20 @@
 require_once("../inc/team.inc");
 
 function show_admin_page($user, $team) {
-    page_head("Team administration for $team->name");
+    page_head(tra("Team administration for %1", $team->name));
     echo "
         <ul>
-        <li><a href=team_edit_form.php?teamid=$team->id>Edit team info</a>
-            <br><span class=note>Change team name, URL, description, type, or country</span>
+        <li><a href=team_edit_form.php?teamid=$team->id>".tra("Edit team info")."</a>
+            <br><span class=note>".tra("Change team name, URL, description, type, or country")."</span>
         <li>
-            Member list:
-        <a href=team_email_list.php?teamid=$team->id>HTML</a>
-        | <a href=team_email_list.php?teamid=$team->id&plain=1>text</a>
-            <br><span class=note> View member names and email addresses </span>
-        <li>View change history:
-            <a href=team_delta.php?teamid=$team->id>HTML</a>
-            | <a href=team_delta.php?teamid=$team->id&xml=1>XML</a>
-            <br><span class=note>See when members joined or quit this team</span>
+            ".tra("Member list:")."
+        <a href=team_email_list.php?teamid=$team->id>".tra("HTML")."</a>
+        | <a href=team_email_list.php?teamid=$team->id&plain=1>".tra("text")."</a>
+            <br><span class=note>".tra("View member names and email addresses")."</span>
+        <li>".tra("View change history:")."
+            <a href=team_delta.php?teamid=$team->id>".tra("HTML")."</a>
+            | <a href=team_delta.php?teamid=$team->id&xml=1>".tra("XML")."</a>
+            <br><span class=note>".tra("See when members joined or quit this team")."</span>
     ";
 
     // founder-only stuff follows
@@ -45,37 +45,32 @@
             $user2 = BoincUser::lookup_id($team->ping_user);
             $deadline = date_str(transfer_ok_time($team));
             echo "<li>
-                <a href=team_change_founder_form.php?teamid=$team->id><font color=red><b>Respond to foundership request</b></font></a>.  If you don't respond by $deadline, $user2->name may assume foundership of this team.
-            ";
+                <a href=team_change_founder_form.php?teamid=$team->id><font color=red><strong>".tra("Respond to foundership request.")."</strong></font></a>  ".tra("If you don't respond by %1, %2 may assume foundership of this team.", $deadline, $user2->name)
+                ;
         }
         echo "
-            <li><a href=team_remove_inactive_form.php?teamid=$team->id>Remove members</a>
-                <br><span class=note>Remove inactive or unwanted members from this team</span>
-            <li><a href=team_change_founder_form.php?teamid=$team->id>Change founder</a>
-                <br><span class=note>Transfer foundership to another member</span>
-            <li><a href=team_admins.php?teamid=$team->id>Add/remove Team Admins</a>
-                <br><span class=note>Give selected team members Team Admin privileges</span>
+            <li><a href=team_remove_inactive_form.php?teamid=$team->id>".tra("Remove members")."</a>
+                <br><span class=note>".tra("Remove inactive or unwanted members from this team")."</span>
+            <li><a href=team_change_founder_form.php?teamid=$team->id>".tra("Change founder")."</a>
+                <br><span class=note>".tra("Transfer foundership to another member")."</span>
+            <li><a href=team_admins.php?teamid=$team->id>".tra("Add/remove Team Admins")."</a>
+                <br><span class=note>".tra("Give selected team members Team Admin privileges")."</span>
 
-            <li><a href=team_manage.php?teamid=$team->id&action=delete&$tokens>Remove team</a>
-                <br><span class=note>Allowed only if team has no members</a>
-            <li><a href=team_forum.php?teamid=$team->id&cmd=manage>Message board</a>
-                <br><span class=note>Create or manage team message board</span>
+            <li><a href=team_manage.php?teamid=$team->id&action=delete&$tokens>".tra("Remove team")."</a>
+                <br><span class=note>".tra("Allowed only if team has no members")."</a>
+            <li><a href=team_forum.php?teamid=$team->id&cmd=manage>".tra("Message board")."</a>
+                <br><span class=note>".tra("Create or manage a team message board")."</span>
         ";
     }
     echo "
 
         <p>
         <li>
-            To have this team created on all BOINC projects
-            (current and future) you can make it into a
-            <a href=http://boinc.berkeley.edu/teams/>BOINC-wide team</a>.
+            ".tra("To have this team created on all BOINC projects (current and future) you can make it into a %1BOINC-wide team%2.", "<a href=http://boinc.berkeley.edu/teams/>", "</a>")."
         <li>
-            Team admins are encouraged to join and participate in the Google
-            <a href=http://groups.google.com/group/boinc-team-founders>boinc-team-founders</a> group.
+            ".tra("Team admins are encouraged to join and participate in the Google %1boinc-team-founders%2 group.", "<a href=http://groups.google.com/group/boinc-team-founders>", "</a>")."
         <li>
-            Other resources for BOINC team admins
-            are available from a third-party site,
-            <a href=http://www.boincteams.com>www.boincteams.com</a>.
+            ".tra("Other resources for BOINC team admins are available from a third-party site, %1www.boincteams.com%2.", "<a href=http://www.boincteams.com>", "</a>")."
     </ul>
     ";
 
@@ -85,17 +80,17 @@
 $user = get_logged_in_user(true);
 $teamid = get_int('teamid');
 $team = BoincTeam::lookup_id($teamid);
-if (!$team) error_page("no such team");
+if (!$team) error_page(tra("no such team"));
 
 $action = get_str('action', true);
 if ($action == 'delete') {
     require_founder_login($user, $team);
     if (team_count_members($team->id) > 0) {
-        error_page("Can't delete non-empty team");
+        error_page(tra("Can't delete non-empty team"));
     }
     check_tokens($user->authenticator);
     $team->delete();
-    page_head("Team $team->name deleted");
+    page_head(tra("Team %1 deleted", $team->name));
     page_tail();
 } else {
     require_admin($user, $team);
Index: user/team_members.php
===================================================================
--- user/team_members.php	(Revision 20577)
+++ user/team_members.php	(Arbeitskopie)
@@ -30,7 +30,7 @@
 if (!$offset) $offset=0;
 
 if ($offset > 1000) {
-    error_page("Limit exceeded:  Can only display the first 1000 members.");
+    error_page(tra("Limit exceeded:  Can only display the first 1000 members."));
 }
 
 $teamid = get_int("teamid");
@@ -40,7 +40,7 @@
 
 $team = BoincTeam::lookup_id($teamid);
 
-page_head("Members of <a href=team_display.php?teamid=$teamid>$team->name</a>");
+page_head(tra("Members of %1", "<a href=team_display.php?teamid=$teamid>$team->name</a>"));
 display_team_members($team, $offset, $sort_by);
 page_tail();
 
Index: user/team_quit_action.php
===================================================================
--- user/team_quit_action.php	(Revision 20577)
+++ user/team_quit_action.php	(Arbeitskopie)
@@ -29,8 +29,8 @@
     user_quit_team($user);
     Header("Location: home.php");
 } else {
-    page_head("Unable to quit team");
-    echo "Team doesn't exist, or you don't belong to it.\n";
+    page_head(tra("Unable to quit team"));
+    echo tra("Team doesn't exist, or you don't belong to it.");
 }
 
 page_tail();
Index: user/team_quit_form.php
===================================================================
--- user/team_quit_form.php	(Revision 20577)
+++ user/team_quit_form.php	(Arbeitskopie)
@@ -25,23 +25,19 @@
 
 $team = lookup_team($user->teamid);
 if (!$team) {
-    error_page("No such team");
+    error_page(tra("No such team"));
 }
 
-page_head("Quit $team->name");
-echo "
-    <b>Please note before quitting a team:</b>
-    <ul>
-    <li>If you quit a team, you may rejoin later,
-    or join any other team you desire
-    <li>Quitting a team does not affect your personal credit
-    statistics in any way.
-    </ul>
-    </p>
-    <form method=\"post\" action=\"team_quit_action.php\">";
+page_head(tra("Quit %1", $team->name));
+echo tra("<strong>Please note before quitting a team:</strong>
+         <ul>
+         <li>If you quit a team, you may rejoin later, or join any other team you desire
+         <li>Quitting a team does not affect your personal credit statistics in any way.
+         </ul>")
+    ."<form method=\"post\" action=\"team_quit_action.php\">";
 echo form_tokens($user->authenticator);
 echo "<input type=\"hidden\" name=\"id\" value=\"$team->id\">
-    <input type=\"submit\" value=\"Quit Team\">
+    <input type=\"submit\" value=\"".tra("Quit Team")."\">
     </form>
 ";
 page_tail();
Index: user/team_remove_inactive_action.php
===================================================================
--- user/team_remove_inactive_action.php	(Revision 20577)
+++ user/team_remove_inactive_action.php	(Arbeitskopie)
@@ -23,10 +23,10 @@
 $user = get_logged_in_user();
 $teamid = post_int("id");
 $team = BoincTeam::lookup_id($teamid);
-if (!$team) error_page("No such team");
+if (!$team) error_page(tra("No such team"));
 require_founder_login($user, $team);
 
-page_head("Removing users from $team->name");
+page_head(tra("Removing users from %1", $team->name));
 $ndel = 0;
 for ($i=0; $i<$_POST["ninactive_users"]; $i++) {
     $userid = post_int("remove_$i", true);
@@ -34,10 +34,10 @@
     $user = BoincUser::lookup_id($userid);
     if (!$user) continue;
     if ($user->teamid != $team->id) {
-        echo "<br>$user->name is not a member of $team->name";
+        echo "<br />".tra("%1 is not a member of %2", $user->name, $team->name);
     } else {
         user_quit_team($user);
-        echo "<br>$user->name has been removed";
+        echo "<br />".tra("%1 has been removed", $user->name);
         $ndel++;
     }
 }
Index: user/team_remove_inactive_form.php
===================================================================
--- user/team_remove_inactive_form.php	(Revision 20577)
+++ user/team_remove_inactive_form.php	(Arbeitskopie)
@@ -27,17 +27,17 @@
 $team = BoincTeam::lookup_id($teamid);
 if (!$team) error_page("no such team");
 require_admin($logged_in_user, $team);
-page_head("Remove members from $team->name");
+page_head(tra("Remove members from %1", $team->name));
 echo "
     <form method=\"post\" action=\"team_remove_inactive_action.php\">
     <input type=\"hidden\" name=\"id\" value=\"".$team->id."\">
 ";
 start_table();
 echo "<tr>
-    <th>Remove?</th>
-    <th>Name (ID)</th>
-    <th>Total credit</th>
-    <th>Recent average credit</th>
+    <th>".tra("Remove?")."</th>
+    <th>".tra("Name (ID)")."</th>
+    <th>".tra("Total credit")."</th>
+    <th>".tra("Recent average credit")."</th>
     </tr>
 ";
 
@@ -60,10 +60,10 @@
 }
 end_table();
 if ($ninactive_users == 0) {
-    echo "<p>No members are eligible for removal.";
+    echo "<p>".tra("No members are eligible for removal.")."</p>";
 } else {
     echo "<input type=hidden name=ninactive_users value=$ninactive_users>";
-    echo "<input type=submit value=\"Remove users\">";
+    echo "<input type=submit value=\"".tra("Remove users")."\">";
 }
 echo "</form>";
 page_tail();
Index: user/team_search.php
===================================================================
--- user/team_search.php	(Revision 20577)
+++ user/team_search.php	(Arbeitskopie)
@@ -62,11 +62,11 @@
     start_table();
     echo "
         <tr>
-        <th>Team name</th>
-        <th>Description</th>
-        <th>Average credit</th>
-        <th>Type</th>
-        <th>Country</th>
+        <th>".tra("Team name")."</th>
+        <th>".tra("Description")."</th>
+        <th>".tra("Average credit")."</th>
+        <th>".tra("Type")."</th>
+        <th>".tra("Country")."</th>
         </tr>
     ";
     $i = 0;
@@ -124,24 +124,20 @@
     }
 
     if (sizeof($list) == 0) {
-        echo "
-            No teams were found matching your criteria.
-            Try another search.
-            <p>
-            Or you can <a href=team_create_form.php>create a new team</a>.
-            <p>
-        ";
+        echo tra("No teams were found matching your criteria. Try another search.")
+            ."<p>"
+            .tra("Or you can %1create a new team%2.", "<a href=team_create_form.php>", "</a>")
+            ."</p>\n";
         team_search_form($params);
     } else {
-        echo "
-            The following teams match one or more of your search criteria.
+        echo tra("The following teams match one or more of your search criteria.
             To join a team, click its name to go to the team page,
-               then click <b>Join this team</b>.
-            <p>
+               then click %1Join this team%2.", "<strong>", "</strong>")
+            ."<p>
         ";
         sort_list($list);
         show_list($list);
-        echo "<h2>Change your search</h2>";
+        echo "<h2>".tra("Change your search")."</h2>";
         team_search_form($params);
     }
 }
@@ -153,24 +149,18 @@
     $params->country = $_GET['country'];
     $params->type = $_GET['type'];
     $params->active = get_str('active', true);
-    page_head("Team search results");
+    page_head(tra("Team search results"));
     search($params);
 } else {
-    page_head("Find a team", 'document.form.keywords.focus()');
-    echo "
-        You can team up with other people with similar interests,
-        or from the same country, company, or school.
-        <p>
-        Use this form to find teams that might be right for you.
-        <p>
-    ";
+    page_head(tra("Find a team"), 'document.form.keywords.focus()');
+    echo tra("You can team up with other people with similar interests, or from the same country, company, or school.")
+        ."<p>"
+        .tra("Use this form to find teams that might be right for you.")
+        ."</p>\n";
     team_search_form($params);
     if (isset($_COOKIE['init'])) {
-        echo "
-            <p>
-            <a href=home.php>Click here</a>
-            if you're not interested in joining a team right now.
-        ";
+        echo "<p>
+            ".tra("%1I'm not interested%2 in joining a team right now.", "<a href=home.php>", "</a>");
     }
 }
 page_tail();
