some i18n: pref-prefs

This commit is contained in:
Andrew Dolgov 2007-03-05 14:52:16 +01:00
parent 5e6f933a32
commit 7990ac735d

View file

@ -17,17 +17,17 @@
$con_pw = $_POST["CONFIRM_PASSWORD"]; $con_pw = $_POST["CONFIRM_PASSWORD"];
if ($old_pw == "") { if ($old_pw == "") {
print "ERROR: Old password cannot be blank."; print "ERROR: ".__("Old password cannot be blank.");
return; return;
} }
if ($new_pw == "") { if ($new_pw == "") {
print "ERROR: New password cannot be blank."; print "ERROR: ".__("New password cannot be blank.");
return; return;
} }
if ($new_pw != $con_pw) { if ($new_pw != $con_pw) {
print "ERROR: Entered passwords do not match."; print "ERROR: ".__("Entered passwords do not match.");
return; return;
} }
@ -48,9 +48,9 @@
db_query($link, "UPDATE ttrss_users SET pwd_hash = '$new_pw_hash' db_query($link, "UPDATE ttrss_users SET pwd_hash = '$new_pw_hash'
WHERE id = '$active_uid'"); WHERE id = '$active_uid'");
print "Password has been changed."; print __("Password has been changed.");
} else { } else {
print "ERROR: Old password is incorrect."; print "ERROR: ".__('Old password is incorrect.');
} }
} }
@ -180,8 +180,8 @@
pwd_hash = 'SHA1:".sha1("password")."')"); pwd_hash = 'SHA1:".sha1("password")."')");
if (db_num_rows($result) != 0) { if (db_num_rows($result) != 0) {
print format_warning("Your password is at default value, print format_warning(__("Your password is at default value,
please change it.", "default_pass_warning"); please change it."), "default_pass_warning");
} }
/* if ($_SESSION["pwd_change_result"] == "failed") { /* if ($_SESSION["pwd_change_result"] == "failed") {
@ -195,11 +195,11 @@
$_SESSION["pwd_change_result"] = ""; */ $_SESSION["pwd_change_result"] = ""; */
if ($_SESSION["prefs_op_result"] == "reset-to-defaults") { if ($_SESSION["prefs_op_result"] == "reset-to-defaults") {
print format_notice("The configuration was reset to defaults."); print format_notice(__("The configuration was reset to defaults."));
} }
if ($_SESSION["prefs_op_result"] == "save-config") { if ($_SESSION["prefs_op_result"] == "save-config") {
print format_notice("The configuration was saved."); print format_notice(__("The configuration was saved."));
} }
$_SESSION["prefs_op_result"] = ""; $_SESSION["prefs_op_result"] = "";
@ -207,7 +207,7 @@
print "<form onsubmit='return false' id='change_email_form'>"; print "<form onsubmit='return false' id='change_email_form'>";
print "<table width=\"100%\" class=\"prefPrefsList\">"; print "<table width=\"100%\" class=\"prefPrefsList\">";
print "<tr><td colspan='3'><h3>Personal data</h3></tr></td>"; print "<tr><td colspan='3'><h3>".__("Personal data")."</h3></tr></td>";
$result = db_query($link, "SELECT email FROM ttrss_users $result = db_query($link, "SELECT email FROM ttrss_users
WHERE id = ".$_SESSION["uid"]); WHERE id = ".$_SESSION["uid"]);
@ -227,26 +227,26 @@
print "</form>"; print "</form>";
print "<p><input class=\"button\" type=\"submit\" print "<p><input class=\"button\" type=\"submit\"
onclick=\"return changeUserEmail()\" value=\"Change e-mail\">"; onclick=\"return changeUserEmail()\" value=\"".__("Change e-mail")."\">";
print "<form onsubmit=\"return false\" print "<form onsubmit=\"return false\"
name=\"change_pass_form\" id=\"change_pass_form\">"; name=\"change_pass_form\" id=\"change_pass_form\">";
print "<table width=\"100%\" class=\"prefPrefsList\">"; print "<table width=\"100%\" class=\"prefPrefsList\">";
print "<tr><td colspan='3'><h3>Authentication</h3></tr></td>"; print "<tr><td colspan='3'><h3>".__("Authentication")."</h3></tr></td>";
print "<tr><td width=\"40%\">Old password</td>"; print "<tr><td width=\"40%\">".__("Old password")."</td>";
print "<td><input class=\"editbox\" type=\"password\" print "<td><input class=\"editbox\" type=\"password\"
onkeypress=\"return filterCR(event, changeUserPassword)\" onkeypress=\"return filterCR(event, changeUserPassword)\"
name=\"OLD_PASSWORD\"></td></tr>"; name=\"OLD_PASSWORD\"></td></tr>";
print "<tr><td width=\"40%\">New password</td>"; print "<tr><td width=\"40%\">".__("New password")."</td>";
print "<td><input class=\"editbox\" type=\"password\" print "<td><input class=\"editbox\" type=\"password\"
onkeypress=\"return filterCR(event, changeUserPassword)\" onkeypress=\"return filterCR(event, changeUserPassword)\"
name=\"NEW_PASSWORD\"></td></tr>"; name=\"NEW_PASSWORD\"></td></tr>";
print "<tr><td width=\"40%\">Confirm password</td>"; print "<tr><td width=\"40%\">".__("Confirm password")."</td>";
print "<td><input class=\"editbox\" type=\"password\" print "<td><input class=\"editbox\" type=\"password\"
onkeypress=\"return filterCR(event, changeUserPassword)\" onkeypress=\"return filterCR(event, changeUserPassword)\"
@ -261,7 +261,7 @@
print "<p><input class=\"button\" type=\"submit\" print "<p><input class=\"button\" type=\"submit\"
onclick=\"return changeUserPassword()\" onclick=\"return changeUserPassword()\"
value=\"Change password\">"; value=\"".__("Change password")."\">";
} }
@ -277,8 +277,8 @@
print "<form action=\"backend.php\" method=\"POST\">"; print "<form action=\"backend.php\" method=\"POST\">";
print "<table width=\"100%\" class=\"prefPrefsList\">"; print "<table width=\"100%\" class=\"prefPrefsList\">";
print "<tr><td colspan='3'><h3>Themes</h3></tr></td>"; print "<tr><td colspan='3'><h3>".__("Themes")."</h3></tr></td>";
print "<tr><td width=\"40%\">Select theme</td>"; print "<tr><td width=\"40%\">".__("Select theme")."</td>";
print "<td><select name=\"theme\">"; print "<td><select name=\"theme\">";
print "<option>Default</option>"; print "<option>Default</option>";
print "<option disabled>--------</option>"; print "<option disabled>--------</option>";