Unverified Commit b6cb5e29 authored by David Anderson's avatar David Anderson Committed by GitHub

Merge pull request #3981 from BOINC/dpa_trans2

Web: make some strings translatable
parents 2a656c9d 62f25e40
......@@ -51,8 +51,9 @@ function toggle_passwd() {
}
}
</script>
<input type="checkbox" id="passwd_visible" onclick="toggle_passwd()"> <label for="passwd_visible"><small>Show password</small></label>
', $name
<input type="checkbox" id="passwd_visible" onclick="toggle_passwd()"> <label for="passwd_visible"><small>%s</small></label>
', $name,
tra("Show password")
);
}
......@@ -158,7 +159,7 @@ function login_form($next_url) {
array(array("stay_logged_in", "", true)),
'tabindex="3"'
);
form_submit("Log in", 'tabindex="4"');
form_submit(tra("Log in"), 'tabindex="4"');
form_end();
}
......
......@@ -89,9 +89,12 @@ function navbar_right($user) {
);
} else {
echo sprintf('
<li><a href="%ssignup.php">Join</a></li>
<li><a href="%slogin_form.php">Login</a></li>
', url_base(), url_base()
<li><a href="%ssignup.php">%s</a></li>
<li><a href="%slogin_form.php">%s</a></li>
', url_base(),
tra("Join"),
url_base(),
tra("Login")
);
}
}
......@@ -158,7 +161,7 @@ function sample_navbar(
$x[] = array(tra("Preferences"), $url_prefix."prefs.php?subset=project");
}
$x[] = array(tra("About %1", PROJECT), $url_prefix."about.php");
$x[] = array(tra("Help"), $url_prefix."help.php");
$x[] = array(tra("Help"), $url_prefix."welcome.php");
navbar_menu(tra("Project"), $x);
if (NO_COMPUTING) {
......
......@@ -66,6 +66,7 @@ function login_with_email($email_addr, $passwd, $next_url, $perm) {
}
// Intercept next_url if consent has not yet been given
//
$next_url = intercept_login($user, $perm, $next_url);
Header("Location: ".url_base()."$next_url");
}
......@@ -100,6 +101,7 @@ function login_via_link($id, $t, $h) {
}
// Intercept next_url if consent has not yet been given
//
$next_url = intercept_login($user, true, "home.php");
Header("Location: ".url_base()."$next_url");
}
......@@ -119,6 +121,7 @@ function login_with_auth($authenticator, $next_url, $perm) {
} else {
// Intercept next_url if consent has not yet been given
//
$next_url = intercept_login($user, $perm, $next_url);
Header("Location: ".url_base()."$next_url");
}
......@@ -142,6 +145,7 @@ function login_with_ldap($uid, $passwd, $next_url, $perm) {
error_page("Couldn't create user");
}
// Intercept next_url if consent has not yet been given
//
$next_url = intercept_login($user, $perm, $next_url);
Header("Location: ".url_base()."$next_url");
return;
......
......@@ -29,9 +29,12 @@ $next_url = urlencode($next_url);
$user = get_logged_in_user(false);
if ($user) {
page_head("Already logged in");
row2("You are logged in as $user->name",
". <a href=\"logout.php?".url_tokens($user->authenticator)."\">Log out</a>"
page_head(tra("Already logged in"));
row2(tra("You are logged in as %1.", $user->name),
sprintf(' <a href="logout.php?%s">%s</a>',
url_tokens($user->authenticator),
tra("Log out")
)
);
page_tail();
exit;
......@@ -53,7 +56,10 @@ $config = get_config();
if (!parse_bool($config, "disable_account_creation")
&& !parse_bool($config, "no_web_account_creation")
) {
echo tra("or %1 create an account %2.", "<a href=\"create_account_form.php?next_url=$next_url\">","</a>");
echo tra("or %1 create an account %2.",
"<a href=\"create_account_form.php?next_url=$next_url\">",
"</a>"
);
}
page_tail();
......
......@@ -96,7 +96,7 @@ function show_join_form() {
if ($recaptcha_public_key) {
form_general("", boinc_recaptcha_get_html($recaptcha_public_key));
}
form_submit("Join");
form_submit(tra("Join"));
form_end();
page_tail();
}
......
......@@ -19,7 +19,7 @@
require_once("../inc/util.inc");
function site_search_form($url) {
page_head("Site search");
page_head(tra("Site search"));
echo '
<form class="form-inline" method="get" action="https://google.com/search">
<input type=hidden name=domains value="'.$url.'">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment