Commit 908cb554 authored by Dries's avatar Dries

- Applied Stefan's t()-function patches.
parent 211d65b9
......@@ -44,52 +44,52 @@ function system_view_options() {
global $conf, $cmodes, $corder;
// general settings:
$output .= "<h3>General settings</h3>\n";
$output .= form_textfield("Name", "site_name", variable_get("site_name", "drupal"), 55, 55, "The name of this website.");
$output .= form_textfield("E-mail address", "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, "A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.");
$output .= form_textfield("Slogan", "site_slogan", variable_get("site_slogan", ""), 55, 128, "The slogan of this website. Some themes display a slogan when available.");
$output .= form_textarea("Mission", "site_mission", variable_get("site_mission", ""), 55, 5, "Your site's mission statement or focus.");
$output .= form_textarea("Footer message", "site_footer", variable_get("site_footer", ""), 55, 5, "This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.");
$output .= form_textfield("Anonymous user", "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, "The name used to indicate anonymous users.");
$output .= "<h3>" . t("General settings") . "</h3>\n";
$output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 55, 55, t("The name of this website."));
$output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
$output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 55, 128, t("The slogan of this website. Some themes display a slogan when available."));
$output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 55, 5, t("Your site's mission statement or focus."));
$output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 55, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
$output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, t("The name used to indicate anonymous users."));
foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; }
$output .= form_select("Default front page", "site_frontpage", variable_get("site_frontpage", "node"), $pages, "The home page displays content from this module (usually <b>node</b>).");
$output .= form_select(t("Default front page"), "site_frontpage", variable_get("site_frontpage", "node"), $pages, t("The home page displays content from this module (usually node)."));
$output .= "<hr />\n";
// caching:
$output .= "<h3>Cache settings</h3>\n";
$output .= "<h3>" . t("Cache settings") . "</h3>\n";
$period = array(10 => format_interval(10), 20 => format_interval(20), 30 => format_interval(30), 40 => format_interval(40), 50 => format_interval(50), 50 => format_interval(50), 60 => format_interval(60), 90 => format_interval(90), 120 => format_interval(120), 150 => format_interval(150), 180 => format_interval(180), 210 => format_interval(210), 240 => format_interval(240), 270 => format_interval(270), 300 => format_interval(300), 360 => format_interval(360), 420 => format_interval(420), 480 => format_interval(480), 540 => format_interval(540), 600 => format_interval(600), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200));
$output .= form_select("Cache support", "cache", variable_get("cache", 0), array("Disabled", "Enabled"), "Enable or disable the caching of pages.");
$output .= form_select("Discard cached pages older than", "cache_clear", variable_get("cache_clear", 30), $period, "The time cached pages should be kept. Older pages are automatically refreshed.");
$output .= form_select(t("Cache support"), "cache", variable_get("cache", 0), array(t("Disabled"), t("Enabled")), t("Enable or disable the caching of pages."));
$output .= form_select(t("Discard cached pages older than"), "cache_clear", variable_get("cache_clear", 30), $period, t("The time cached pages should be kept. Older pages are automatically refreshed."));
$output .= "<hr />\n";
// submission settings:
$output .= "<h3>Submission settings</h3>\n";
$output .= "<h3>" . t("Submission settings") . "</h3>\n";
$rate = array(1 => "Maximum 1 every second", 5 => "Maximum 1 every 5 seconds", 15 => "Maximum 1 every 15 seconds", 30 => "Maximum 1 every 30 seconds", 60 => "Maximum 1 every minute", 300 => "Maximum 1 every 5 minutes", 900 => "Maximum 1 every 15 minutes", 1800 => "Maximum 1 every 30 minutes", 3600 => "Maximum 1 every hour", 21600 => "Maximum 1 every 6 hours", 43200 => "Maximum 1 every 12 hours");
$output .= form_select("Maximum node rate", "max_node_rate", variable_get("max_node_rate", 900), $rate, "The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.");
$output .= form_select("Maximum comment rate", "max_comment_rate", variable_get("max_comment_rate", 120), $rate, "The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.");
$output .= form_select(t("Maximum node rate"), "max_node_rate", variable_get("max_node_rate", 900), $rate, t("The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks."));
$output .= form_select(t("Maximum comment rate"), "max_comment_rate", variable_get("max_comment_rate", 120), $rate, t("The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks."));
$output .= "<hr />\n";
// date settings:
$output .= "<h3>Date format setting</h3>\n";
$output .= form_select("Date format", "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), "The format in which dates are displayed");
$output .= "<h3>" . t("Date format setting") . "</h3>\n";
$output .= form_select(t("Date format"), "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), t("The format in which dates are displayed"));
$output .= "<hr />\n";
// layout settings:
$output .= "<h3>Layout settings</h3>\n";
$output .= "<h3>" . t("Layout settings") . "</h3>\n";
foreach (theme_list() as $key => $value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
$output .= form_item("Default theme", "<select name=\"edit[theme_default]\">$options</select>", "The default theme as seen by visitors or anonymous users.");
$output .= form_item(t("Default theme"), "<select name=\"edit[theme_default]\">$options</select>", t("The default theme as seen by visitors or anonymous users."));
$output .= "<hr />\n";
// development settings:
$output .= "<h3>Development settings</h3>\n";
$output .= form_select("Display timer information", "dev_timer", variable_get("dev_timer", 0), array("Disabled", "Enabled"), "Display the time it took to generate a page. For Drupal development only.");
$output .= form_select("Display query log", "dev_query", variable_get("dev_query", 0), array("Disabled", "Enabled"), "Display a log of the database queries needed to generate the current page.");
$output .= "<h3>" . t("Development settings") . "</h3>\n";
$output .= form_select(t("Display timer information"), "dev_timer", variable_get("dev_timer", 0), array(t("Disabled"), t("Enabled")), t("Display the time it took to generate a page. For Drupal development only."));
$output .= form_select(t("Display query log"), "dev_query", variable_get("dev_query", 0), array(t("Disabled"), t("Enabled")), t("Display a log of the database queries needed to generate the current page."));
$output .= "<hr />\n";
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$output .= "<h3><a name=\"$name\">". ucfirst($name) ." settings</a></h3>". module_invoke($name, "conf_options") ."<hr />\n";
$output .= "<h3><a name=\"$name\">". ucfirst(t("$name")) ." " . t("settings") . "</a></h3>". module_invoke($name, "conf_options") ."<hr />\n";
}
}
return $output;
......@@ -106,12 +106,12 @@ function system_view_filters() {
function system_save($edit = array()) {
foreach ($edit as $name => $value) variable_set($name, $value);
return "the configuration options have been saved.";
return t("The configuration options have been saved.");
}
function system_default($edit = array()) {
foreach ($edit as $name => $value) variable_del($name);
return "the configuration options have been reset to their default values.";
return t("The configuration options have been reset to their default values.");
}
function system_view($type) {
......@@ -123,7 +123,7 @@ function system_view($type) {
default:
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
$links[] = la(t("$name"), array("mod" => "system"), $name);
}
}
......@@ -131,8 +131,8 @@ function system_view($type) {
$form = system_view_options();
}
$form .= form_submit("Save configuration");
$form .= form_submit("Reset to defaults");
$form .= form_submit(t("Save configuration"));
$form .= form_submit(t("Reset to defaults"));
return $output . form($form);
}
......@@ -177,7 +177,7 @@ function system_listing($type, $directory, $required = array()) {
ksort($files);
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>name</th><th>description</th><th>enabled</th></tr>\n";
$output .= "<tr><th>" . t("name") . "</th><th>" . t("description") . "</th><th>" . t("enabled") . "</th></tr>\n";
foreach ($files as $filename => $file) {
include_once($filename);
......@@ -204,11 +204,11 @@ function system_listing($type, $directory, $required = array()) {
$output .= "<tr>";
$output .= "<td>$info->name</td>";
$output .= "<td>$info->description</td>";
$output .= "<td align=\"center\">". (in_array($filename, $required) ? form_hidden("status][$filename", 1) ."required" : form_checkbox("", "status][$filename", 1, $file->status)) ."</td>";
$output .= "<td align=\"center\">". (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)) ."</td>";
$output .= "</tr>\n";
}
$output .= "</table><br />\n";
$output .= form_submit("Save $type settings");
$output .= form_submit(t("Save $type settings"));
return form($output);
}
......@@ -233,7 +233,7 @@ function system_admin() {
case "help":
print system_help();
break;
case "Save module settings":
case t("Save module settings"):
db_query("UPDATE system SET status = '0' WHERE type = 'module'");
foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
......@@ -243,7 +243,7 @@ function system_admin() {
$required = array("modules/user.module", "modules/system.module", "modules/watchdog.module");
print system_listing("module", "modules", $required);
break;
case "Save theme settings":
case t("Save theme settings"):
db_query("UPDATE system SET status = '0' WHERE type = 'theme'");
foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
......@@ -251,11 +251,11 @@ function system_admin() {
case "themes":
print system_listing("theme", "themes");
break;
case "Reset to defaults":
case t("Reset to defaults"):
print status(system_default($edit));
print system_view($type);
break;
case "Save configuration":
case t("Save configuration"):
print status(system_save($edit));
print system_view($type);
break;
......
......@@ -44,52 +44,52 @@ function system_view_options() {
global $conf, $cmodes, $corder;
// general settings:
$output .= "<h3>General settings</h3>\n";
$output .= form_textfield("Name", "site_name", variable_get("site_name", "drupal"), 55, 55, "The name of this website.");
$output .= form_textfield("E-mail address", "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, "A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc.");
$output .= form_textfield("Slogan", "site_slogan", variable_get("site_slogan", ""), 55, 128, "The slogan of this website. Some themes display a slogan when available.");
$output .= form_textarea("Mission", "site_mission", variable_get("site_mission", ""), 55, 5, "Your site's mission statement or focus.");
$output .= form_textarea("Footer message", "site_footer", variable_get("site_footer", ""), 55, 5, "This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages.");
$output .= form_textfield("Anonymous user", "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, "The name used to indicate anonymous users.");
$output .= "<h3>" . t("General settings") . "</h3>\n";
$output .= form_textfield(t("Name"), "site_name", variable_get("site_name", "drupal"), 55, 55, t("The name of this website."));
$output .= form_textfield(t("E-mail address"), "site_mail", variable_get("site_mail", ini_get("sendmail_from")), 55, 128, t("A valid e-mail address for this website, used by the auto-mailer during registration, new password requests, notifications, etc."));
$output .= form_textfield(t("Slogan"), "site_slogan", variable_get("site_slogan", ""), 55, 128, t("The slogan of this website. Some themes display a slogan when available."));
$output .= form_textarea(t("Mission"), "site_mission", variable_get("site_mission", ""), 55, 5, t("Your site's mission statement or focus."));
$output .= form_textarea(t("Footer message"), "site_footer", variable_get("site_footer", ""), 55, 5, t("This text will be displayed at the bottom of each page. Useful for adding a copyright notice to your pages."));
$output .= form_textfield(t("Anonymous user"), "anonymous", variable_get("anonymous", "Anonymous"), 55, 55, t("The name used to indicate anonymous users."));
foreach (module_list() as $name) { if (module_hook($name, "page")) $pages[$name] = $name; }
$output .= form_select("Default front page", "site_frontpage", variable_get("site_frontpage", "node"), $pages, "The home page displays content from this module (usually <b>node</b>).");
$output .= form_select(t("Default front page"), "site_frontpage", variable_get("site_frontpage", "node"), $pages, t("The home page displays content from this module (usually node)."));
$output .= "<hr />\n";
// caching:
$output .= "<h3>Cache settings</h3>\n";
$output .= "<h3>" . t("Cache settings") . "</h3>\n";
$period = array(10 => format_interval(10), 20 => format_interval(20), 30 => format_interval(30), 40 => format_interval(40), 50 => format_interval(50), 50 => format_interval(50), 60 => format_interval(60), 90 => format_interval(90), 120 => format_interval(120), 150 => format_interval(150), 180 => format_interval(180), 210 => format_interval(210), 240 => format_interval(240), 270 => format_interval(270), 300 => format_interval(300), 360 => format_interval(360), 420 => format_interval(420), 480 => format_interval(480), 540 => format_interval(540), 600 => format_interval(600), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200));
$output .= form_select("Cache support", "cache", variable_get("cache", 0), array("Disabled", "Enabled"), "Enable or disable the caching of pages.");
$output .= form_select("Discard cached pages older than", "cache_clear", variable_get("cache_clear", 30), $period, "The time cached pages should be kept. Older pages are automatically refreshed.");
$output .= form_select(t("Cache support"), "cache", variable_get("cache", 0), array(t("Disabled"), t("Enabled")), t("Enable or disable the caching of pages."));
$output .= form_select(t("Discard cached pages older than"), "cache_clear", variable_get("cache_clear", 30), $period, t("The time cached pages should be kept. Older pages are automatically refreshed."));
$output .= "<hr />\n";
// submission settings:
$output .= "<h3>Submission settings</h3>\n";
$output .= "<h3>" . t("Submission settings") . "</h3>\n";
$rate = array(1 => "Maximum 1 every second", 5 => "Maximum 1 every 5 seconds", 15 => "Maximum 1 every 15 seconds", 30 => "Maximum 1 every 30 seconds", 60 => "Maximum 1 every minute", 300 => "Maximum 1 every 5 minutes", 900 => "Maximum 1 every 15 minutes", 1800 => "Maximum 1 every 30 minutes", 3600 => "Maximum 1 every hour", 21600 => "Maximum 1 every 6 hours", 43200 => "Maximum 1 every 12 hours");
$output .= form_select("Maximum node rate", "max_node_rate", variable_get("max_node_rate", 900), $rate, "The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks.");
$output .= form_select("Maximum comment rate", "max_comment_rate", variable_get("max_comment_rate", 120), $rate, "The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks.");
$output .= form_select(t("Maximum node rate"), "max_node_rate", variable_get("max_node_rate", 900), $rate, t("The maximum submission rate for nodes. Its purpose is to stop potential abuse or denial of service attacks."));
$output .= form_select(t("Maximum comment rate"), "max_comment_rate", variable_get("max_comment_rate", 120), $rate, t("The maximum submission rate for comments. Its purpose is to stop potential abuse or denial of service attacks."));
$output .= "<hr />\n";
// date settings:
$output .= "<h3>Date format setting</h3>\n";
$output .= form_select("Date format", "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), "The format in which dates are displayed");
$output .= "<h3>" . t("Date format setting") . "</h3>\n";
$output .= form_select(t("Date format"), "date_format", variable_get("date_format", "m/d/Y - H:i"), array("m/d/Y - H:i" => "m/d/Y - H:i", "d/m/Y - H:i" => "d/m/Y - H:i", "Y/m/d - H:i" => "Y/m/d - H:i"), t("The format in which dates are displayed"));
$output .= "<hr />\n";
// layout settings:
$output .= "<h3>Layout settings</h3>\n";
$output .= "<h3>" . t("Layout settings") . "</h3>\n";
foreach (theme_list() as $key => $value) $options .= "<option value=\"$key\"". (variable_get("theme_default", 0) == $key ? " selected=\"selected\"" : "") .">$key</option>\n";
$output .= form_item("Default theme", "<select name=\"edit[theme_default]\">$options</select>", "The default theme as seen by visitors or anonymous users.");
$output .= form_item(t("Default theme"), "<select name=\"edit[theme_default]\">$options</select>", t("The default theme as seen by visitors or anonymous users."));
$output .= "<hr />\n";
// development settings:
$output .= "<h3>Development settings</h3>\n";
$output .= form_select("Display timer information", "dev_timer", variable_get("dev_timer", 0), array("Disabled", "Enabled"), "Display the time it took to generate a page. For Drupal development only.");
$output .= form_select("Display query log", "dev_query", variable_get("dev_query", 0), array("Disabled", "Enabled"), "Display a log of the database queries needed to generate the current page.");
$output .= "<h3>" . t("Development settings") . "</h3>\n";
$output .= form_select(t("Display timer information"), "dev_timer", variable_get("dev_timer", 0), array(t("Disabled"), t("Enabled")), t("Display the time it took to generate a page. For Drupal development only."));
$output .= form_select(t("Display query log"), "dev_query", variable_get("dev_query", 0), array(t("Disabled"), t("Enabled")), t("Display a log of the database queries needed to generate the current page."));
$output .= "<hr />\n";
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$output .= "<h3><a name=\"$name\">". ucfirst($name) ." settings</a></h3>". module_invoke($name, "conf_options") ."<hr />\n";
$output .= "<h3><a name=\"$name\">". ucfirst(t("$name")) ." " . t("settings") . "</a></h3>". module_invoke($name, "conf_options") ."<hr />\n";
}
}
return $output;
......@@ -106,12 +106,12 @@ function system_view_filters() {
function system_save($edit = array()) {
foreach ($edit as $name => $value) variable_set($name, $value);
return "the configuration options have been saved.";
return t("The configuration options have been saved.");
}
function system_default($edit = array()) {
foreach ($edit as $name => $value) variable_del($name);
return "the configuration options have been reset to their default values.";
return t("The configuration options have been reset to their default values.");
}
function system_view($type) {
......@@ -123,7 +123,7 @@ function system_view($type) {
default:
foreach (module_list() as $name) {
if (module_hook($name, "conf_options")) {
$links[] = la($name, array("mod" => "system"), $name);
$links[] = la(t("$name"), array("mod" => "system"), $name);
}
}
......@@ -131,8 +131,8 @@ function system_view($type) {
$form = system_view_options();
}
$form .= form_submit("Save configuration");
$form .= form_submit("Reset to defaults");
$form .= form_submit(t("Save configuration"));
$form .= form_submit(t("Reset to defaults"));
return $output . form($form);
}
......@@ -177,7 +177,7 @@ function system_listing($type, $directory, $required = array()) {
ksort($files);
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>name</th><th>description</th><th>enabled</th></tr>\n";
$output .= "<tr><th>" . t("name") . "</th><th>" . t("description") . "</th><th>" . t("enabled") . "</th></tr>\n";
foreach ($files as $filename => $file) {
include_once($filename);
......@@ -204,11 +204,11 @@ function system_listing($type, $directory, $required = array()) {
$output .= "<tr>";
$output .= "<td>$info->name</td>";
$output .= "<td>$info->description</td>";
$output .= "<td align=\"center\">". (in_array($filename, $required) ? form_hidden("status][$filename", 1) ."required" : form_checkbox("", "status][$filename", 1, $file->status)) ."</td>";
$output .= "<td align=\"center\">". (in_array($filename, $required) ? form_hidden("status][$filename", 1) . t("required") : form_checkbox("", "status][$filename", 1, $file->status)) ."</td>";
$output .= "</tr>\n";
}
$output .= "</table><br />\n";
$output .= form_submit("Save $type settings");
$output .= form_submit(t("Save $type settings"));
return form($output);
}
......@@ -233,7 +233,7 @@ function system_admin() {
case "help":
print system_help();
break;
case "Save module settings":
case t("Save module settings"):
db_query("UPDATE system SET status = '0' WHERE type = 'module'");
foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
......@@ -243,7 +243,7 @@ function system_admin() {
$required = array("modules/user.module", "modules/system.module", "modules/watchdog.module");
print system_listing("module", "modules", $required);
break;
case "Save theme settings":
case t("Save theme settings"):
db_query("UPDATE system SET status = '0' WHERE type = 'theme'");
foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
......@@ -251,11 +251,11 @@ function system_admin() {
case "themes":
print system_listing("theme", "themes");
break;
case "Reset to defaults":
case t("Reset to defaults"):
print status(system_default($edit));
print system_view($type);
break;
case "Save configuration":
case t("Save configuration"):
print status(system_save($edit));
print system_view($type);
break;
......
......@@ -1071,13 +1071,13 @@ function user_page() {
/*** Administrative features ***********************************************/
function user_conf_options() {
$output .= form_select("Public registrations", "user_register", variable_get("user_register", 1), array("Only site administrators can create new user accounts.", "Visitors can create accounts and no administrator approval is required.", "Visitors can create accounts but administrator approval is required."));
$output .= form_textfield("Password words", "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, "A comma separated list of short words that can be concatenated to generate human-readable passwords.");
$output .= form_select("Remember logged user", "user_remember", variable_get("user_remember", 0), array(t("User option (checkbox)"), t("Next time user visits he'll already be logged in"), t("Log user out as soon as he quits the browser")));
$output .= form_textfield("Welcome e-mail subject", "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", t("User account details for %username at %site")), 80, 180, "Customize the subject of your welcome e-mail, which is sent to new members upon registering. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea("Welcome e-mail body", "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, "Customize the body of the welcome e-mail, which is sent to new members upon registering. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield("Forgotten password e-mail subject", "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 80, 180, "Customize the Subject of your forgotten password e-mail. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea("Forgotten password e-mail body", "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, "Customize the body of the forgotten password e-mail. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_select(t("Public registrations"), "user_register", variable_get("user_register", 1), array(t("Only site administrators can create new user accounts."), t("Visitors can create accounts and no administrator approval is required."), t("Visitors can create accounts but administrator approval is required.")));
$output .= form_textfield(t("Password words"), "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, t("A comma separated list of short words that can be concatenated to generate human-readable passwords."));
$output .= form_select(t("Remember authenticated users"), "user_remember", variable_get("user_remember", 0), array(t("Let the user decide whether he should be logged out when leaving the site."), t("Authenticated users are not logged out upon leaving the site."), t("Authenticated users are logged out upon leaving the site.")));
$output .= form_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 80, 180, t("Customize the subject of your welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of welcome e-mail"), "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield(t("Subject of password recovery e-mail"), "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 80, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of password recovery e-mail"), "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
return $output;
}
......@@ -1329,9 +1329,9 @@ function user_admin_role($edit = array()) {
$result = db_query("SELECT * FROM role ORDER BY name");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>name</th><th>operations</th></tr>";
$output .= " <tr><th>" . t("name") . "</th><th>" . t("operations") . "</th></tr>";
while ($role = db_fetch_object($result)) {
$output .= "<tr><td>". check_output($role->name) ."</td><td>". la(t("edit role"), array("mod" => "user", "op" => "role", "id" => $role->rid)) ."</td></tr>";
$output .= "<tr><td>". check_output($role->name) ."</td><td align=\"center\">". la(t("edit role"), array("mod" => "user", "op" => "role", "id" => $role->rid)) ."</td></tr>";
}
$output .= " <tr><td><input size=\"32\" maxlength=\"64\" name=\"edit[name]\" /></td><td><input type=\"submit\" name=\"op\" value=\"" . t("Add role") . "\" /></td></tr>";
$output .= "</table>";
......@@ -1432,7 +1432,7 @@ function user_admin_edit($edit = array()) {
$output .= form_select(t("Timezone"), "timezone", $account->timezone, $zones, t("Select what time you currently have and your timezone settings will be set appropriate."));
$output .= form_select(t("Language"), "language", $account->language, $languages, t("Selecting a different language will change the language of the site."));
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter a new password twice if you want to change the current password for this user or leave it blank if you are happy with the current password."));
$output .= form_select(t("Status"), "status", $account->status, array("blocked", "active"));
$output .= form_select(t("Status"), "status", $account->status, array(t("Blocked"), t("Active")));
$output .= form_select(t("Role"), "rid", $account->rid, user_roles(1));
$output .= form_submit(t("Save account"));
......@@ -1442,7 +1442,7 @@ function user_admin_edit($edit = array()) {
}
else {
$output = t("no such user");
$output = t("No such user");
}
return $output;
......@@ -1451,7 +1451,7 @@ function user_admin_edit($edit = array()) {
function user_admin_account() {
global $query;
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY u.uid DESC", "new users"), array("WHERE status = 0 ORDER BY u.uid DESC", "blocked users"));
$queries = array(array("ORDER BY timestamp DESC", t("active users")), array("ORDER BY u.uid DESC", t("new users")), array("WHERE status = 0 ORDER BY u.uid DESC", t("blocked users")));
foreach (user_roles(1) as $key => $value) {
$queries[] = array("WHERE r.name = '$value' ORDER BY u.uid DESC", $value . "s");
}
......
......@@ -1071,13 +1071,13 @@ function user_page() {
/*** Administrative features ***********************************************/
function user_conf_options() {
$output .= form_select("Public registrations", "user_register", variable_get("user_register", 1), array("Only site administrators can create new user accounts.", "Visitors can create accounts and no administrator approval is required.", "Visitors can create accounts but administrator approval is required."));
$output .= form_textfield("Password words", "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, "A comma separated list of short words that can be concatenated to generate human-readable passwords.");
$output .= form_select("Remember logged user", "user_remember", variable_get("user_remember", 0), array(t("User option (checkbox)"), t("Next time user visits he'll already be logged in"), t("Log user out as soon as he quits the browser")));
$output .= form_textfield("Welcome e-mail subject", "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", t("User account details for %username at %site")), 80, 180, "Customize the subject of your welcome e-mail, which is sent to new members upon registering. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea("Welcome e-mail body", "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, "Customize the body of the welcome e-mail, which is sent to new members upon registering. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield("Forgotten password e-mail subject", "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 80, 180, "Customize the Subject of your forgotten password e-mail. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea("Forgotten password e-mail body", "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, "Customize the body of the forgotten password e-mail. Available variables are: %username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_select(t("Public registrations"), "user_register", variable_get("user_register", 1), array(t("Only site administrators can create new user accounts."), t("Visitors can create accounts and no administrator approval is required."), t("Visitors can create accounts but administrator approval is required.")));
$output .= form_textfield(t("Password words"), "user_password", variable_get("user_password", "foo,bar,guy,neo,tux,moo,sun,asm,dot,god,axe,geek,nerd,fish,hack,star,mice,warp,moon,hero,cola,girl,fish,java,perl,boss,dark,sith,jedi,drop,mojo"), 55, 256, t("A comma separated list of short words that can be concatenated to generate human-readable passwords."));
$output .= form_select(t("Remember authenticated users"), "user_remember", variable_get("user_remember", 0), array(t("Let the user decide whether he should be logged out when leaving the site."), t("Authenticated users are not logged out upon leaving the site."), t("Authenticated users are logged out upon leaving the site.")));
$output .= form_textfield(t("Subject of welcome e-mail"), "user_mail_welcome_subject", variable_get("user_mail_welcome_subject", "User account details for %username at %site"), 80, 180, t("Customize the subject of your welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of welcome e-mail"), "user_mail_welcome_body", variable_get("user_mail_welcome_body", t("%username,\n\nThank you for registering at %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the welcome e-mail, which is sent to new members upon registering.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
$output .= form_textfield(t("Subject of password recovery e-mail"), "user_mail_pass_subject", variable_get("user_mail_pass_subject", t("Replacement login information for %username at %site")), 80, 180, t("Customize the Subject of your forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto, %date");
$output .= form_textarea(t("Body of password recovery e-mail"), "user_mail_pass_body", variable_get("user_mail_pass_body", t("%username,\n\nHere is your new password for %site. You may now login to %uri". drupal_url(array("mod" => "user", "op" => "login"), "module") ." using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %uri". drupal_url(array("mod" => "user", "op" => "edit"), "module") ."\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n-- %site team")), 70, 10, t("Customize the body of the forgotten password e-mail.") . " " . t("Available variables are:") . " " . "%username, %site, %password, %uri, %uri_brief, %mailto");
return $output;
}
......@@ -1329,9 +1329,9 @@ function user_admin_role($edit = array()) {
$result = db_query("SELECT * FROM role ORDER BY name");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>name</th><th>operations</th></tr>";
$output .= " <tr><th>" . t("name") . "</th><th>" . t("operations") . "</th></tr>";
while ($role = db_fetch_object($result)) {
$output .= "<tr><td>". check_output($role->name) ."</td><td>". la(t("edit role"), array("mod" => "user", "op" => "role", "id" => $role->rid)) ."</td></tr>";
$output .= "<tr><td>". check_output($role->name) ."</td><td align=\"center\">". la(t("edit role"), array("mod" => "user", "op" => "role", "id" => $role->rid)) ."</td></tr>";
}
$output .= " <tr><td><input size=\"32\" maxlength=\"64\" name=\"edit[name]\" /></td><td><input type=\"submit\" name=\"op\" value=\"" . t("Add role") . "\" /></td></tr>";
$output .= "</table>";
......@@ -1432,7 +1432,7 @@ function user_admin_edit($edit = array()) {
$output .= form_select(t("Timezone"), "timezone", $account->timezone, $zones, t("Select what time you currently have and your timezone settings will be set appropriate."));
$output .= form_select(t("Language"), "language", $account->language, $languages, t("Selecting a different language will change the language of the site."));
$output .= form_item(t("Password"), "<input type=\"password\" name=\"edit[pass1]\" size=\"12\" maxlength=\"24\" /> <input type=\"password\" name=\"edit[pass2]\" size=\"12\" maxlength=\"24\" />", t("Enter a new password twice if you want to change the current password for this user or leave it blank if you are happy with the current password."));
$output .= form_select(t("Status"), "status", $account->status, array("blocked", "active"));
$output .= form_select(t("Status"), "status", $account->status, array(t("Blocked"), t("Active")));
$output .= form_select(t("Role"), "rid", $account->rid, user_roles(1));
$output .= form_submit(t("Save account"));
......@@ -1442,7 +1442,7 @@ function user_admin_edit($edit = array()) {
}
else {
$output = t("no such user");
$output = t("No such user");
}
return $output;
......@@ -1451,7 +1451,7 @@ function user_admin_edit($edit = array()) {
function user_admin_account() {
global $query;
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY u.uid DESC", "new users"), array("WHERE status = 0 ORDER BY u.uid DESC", "blocked users"));
$queries = array(array("ORDER BY timestamp DESC", t("active users")), array("ORDER BY u.uid DESC", t("new users")), array("WHERE status = 0 ORDER BY u.uid DESC", t("blocked users")));
foreach (user_roles(1) as $key => $value) {
$queries[] = array("WHERE r.name = '$value' ORDER BY u.uid DESC", $value . "s");
}
......
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