summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-08-18 19:57:27 +0000
committerDries Buytaert <dries@buytaert.net>2004-08-18 19:57:27 +0000
commit83a739bd898094af5837d2b29863d8e988929e1b (patch)
tree957c07dd7b93fd1d074bb8609b22fe1e0c4f3992
parent0e36182c967685a55e02e48178f1d6cb64ad815e (diff)
downloadbrdo-83a739bd898094af5837d2b29863d8e988929e1b.tar.gz
brdo-83a739bd898094af5837d2b29863d8e988929e1b.tar.bz2
- Code improvements by Stefan: made all status messages consistent (and easier to translate).
-rw-r--r--includes/common.inc4
-rw-r--r--includes/database.pear.inc4
-rw-r--r--includes/file.inc18
-rw-r--r--includes/locale.inc50
-rw-r--r--modules/aggregator.module20
-rw-r--r--modules/aggregator/aggregator.module20
-rw-r--r--modules/blogapi.module4
-rw-r--r--modules/blogapi/blogapi.module4
-rw-r--r--modules/book.module2
-rw-r--r--modules/book/book.module2
-rw-r--r--modules/comment.module12
-rw-r--r--modules/comment/comment.module12
-rw-r--r--modules/drupal.module12
-rw-r--r--modules/drupal/drupal.module12
-rw-r--r--modules/filter.module4
-rw-r--r--modules/filter/filter.module4
-rw-r--r--modules/forum.module2
-rw-r--r--modules/forum/forum.module2
-rw-r--r--modules/locale.module10
-rw-r--r--modules/locale/locale.module10
-rw-r--r--modules/menu.module6
-rw-r--r--modules/menu/menu.module6
-rw-r--r--modules/node.module16
-rw-r--r--modules/node/node.module16
-rw-r--r--modules/path.module6
-rw-r--r--modules/path/path.module6
-rw-r--r--modules/ping.module8
-rw-r--r--modules/ping/ping.module8
-rw-r--r--modules/poll.module4
-rw-r--r--modules/poll/poll.module4
-rw-r--r--modules/profile.module4
-rw-r--r--modules/profile/profile.module4
-rw-r--r--modules/queue.module10
-rw-r--r--modules/search.module2
-rw-r--r--modules/search/search.module2
-rw-r--r--modules/story.module2
-rw-r--r--modules/story/story.module2
-rw-r--r--modules/taxonomy.module8
-rw-r--r--modules/taxonomy/taxonomy.module8
-rw-r--r--modules/throttle.module4
-rw-r--r--modules/throttle/throttle.module4
-rw-r--r--modules/user.module44
-rw-r--r--modules/user/user.module44
43 files changed, 213 insertions, 213 deletions
diff --git a/includes/common.inc b/includes/common.inc
index cda083867..f8e5654dd 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -237,7 +237,7 @@ function drupal_goto($path = '', $query = NULL, $fragment = NULL) {
*/
function drupal_not_found() {
header('HTTP/1.0 404 Not Found');
- watchdog('httpd', t('404 error: "%page" not found', array('%page' => check_query($_GET['q']))));
+ watchdog('httpd', t('404 error: %page not found.', array('%page' => '<em>'. check_query($_GET['q']) .'</em>')));
$path = drupal_get_normal_path(variable_get('site_404', ''));
$status = MENU_NOT_FOUND;
@@ -651,7 +651,7 @@ function valid_input_data($data) {
$match += preg_match("/<\s*(applet|script|object|style|embed|form|blink|meta|html|frame|iframe|layer|ilayer|head|frameset|xml)/i", $data);
if ($match) {
- watchdog('warning', t('terminated request because of suspicious input data: %data', array('%data' => drupal_specialchars($data))));
+ watchdog('warning', t('Terminated request because of suspicious input data: %data.', array('%data' => '<em>'. drupal_specialchars($data) .'</em>')));
return FALSE;
}
}
diff --git a/includes/database.pear.inc b/includes/database.pear.inc
index 529cb0afa..fc8da8f91 100644
--- a/includes/database.pear.inc
+++ b/includes/database.pear.inc
@@ -203,7 +203,7 @@ function db_next_id($name) {
$name = db_prefix_tables($name);
$result = $active_db->nextID($name);
if (DB::isError($result)) {
- watchdog('error', t('database: %db\nsequence table: %name', array('%db' => $result->getMessage(), '%name' => $name)));
+ watchdog('error', t('Database: %db sequence table: %name.', array('%db' => '<em>'. $result->getMessage() .'</em>', '%name' => "<em>$name</em>")));
}
else {
return $result;
@@ -271,7 +271,7 @@ function db_query_range($query) {
}
if (DB::isError($result)) {
- watchdog('error', t('database: %db\nquery: %query', array('%db' => $result->getMessage(), '%query' => htmlspecialchars($query))));
+ watchdog('error', t('Database: %db query: %query.', array('%db' => '<em>'. $result->getMessage() .'</em>', '%query' => '<em>'. htmlspecialchars($query) .'</em>')));
}
else {
return $result;
diff --git a/includes/file.inc b/includes/file.inc
index abbd16c90..6b8fbf7fb 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -61,11 +61,11 @@ function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
// Check if directory exists.
if (!is_dir($directory)) {
if (($mode & FILE_CREATE_DIRECTORY) && mkdir($directory, 0760)) {
- drupal_set_message(t("Created directory '%name'.", array('%name' => $directory)));
+ drupal_set_message(t('Created directory %directory.', array('%directory' => "<em>$directory</em>")));
}
else {
if ($form_item) {
- form_set_error($form_item, t("The directory '%name' does not exist.", array('%name' => $directory)));
+ form_set_error($form_item, t('The directory %directory does not exist.', array('%directory' => "<em>$directory</em>")));
}
return false;
}
@@ -74,10 +74,10 @@ function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
// Check to see if the directory is writable.
if (!is_writable($directory)) {
if (($mode & FILE_MODIFY_PERMISSIONS) && chmod($directory, 0760)) {
- drupal_set_message(t("Modified permissions on directory '%name'.", array('%name' => $directory)));
+ drupal_set_message(t('Modified permissions on directory %directory.', array('%directory' => "<em>$directory</em>")));
}
else {
- form_set_error($form_item, t("The directory '%name' is not writable.", array('%name' => $directory)));
+ form_set_error($form_item, t('The directory %directory is not writable.', array('%directory' => "<em>$directory</em>")));
return false;
}
}
@@ -314,7 +314,7 @@ function file_save_upload($source, $dest = 0, $replace = 0) {
if (!valid_input_data($file)) {
watchdog('error', t('Possible exploit abuse: invalid data.'));
- drupal_set_message(t("File upload failed: invalid data."), 'error');
+ drupal_set_message(t('File upload failed: invalid data.'), 'error');
return 0;
}
@@ -324,14 +324,14 @@ function file_save_upload($source, $dest = 0, $replace = 0) {
break;
case 1: // UPLOAD_ERR_INI_SIZE
case 2: // UPLOAD_ERR_FORM_SIZE
- drupal_set_message(t("File upload failed: file size too big."), 'error');
+ drupal_set_message(t('File upload failed: file size too big.'), 'error');
return 0;
case 3: // UPLOAD_ERR_PARTIAL
case 4: // UPLOAD_ERR_NO_FILE
- drupal_set_message(t("File upload failed: incomplete upload."), 'error');
+ drupal_set_message(t('File upload failed: incomplete upload.'), 'error');
return 0;
default: // Unknown error
- drupal_set_message(t("File upload failed: unknown error."), 'error');
+ drupal_set_message(t('File upload failed: unknown error.'), 'error');
return 0;
}
@@ -358,7 +358,7 @@ function file_save_upload($source, $dest = 0, $replace = 0) {
function file_save_data($data, $dest, $replace = 0) {
if (!valid_input_data($data)) {
watchdog('error', t('Possible exploit abuse: invalid data.'));
- drupal_set_message(t("File upload failed: invalid data."), 'error');
+ drupal_set_message(t('File upload failed: invalid data.'), 'error');
return 0;
}
diff --git a/includes/locale.inc b/includes/locale.inc
index 9f6c912f6..04c846444 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -24,14 +24,14 @@ function _locale_add_language($code, $name, $onlylanguage = TRUE) {
// the language addition, we need to inform the user on how to start
// a translation
if ($onlylanguage) {
- $message = t("'%locale' language added. You can now import a translation. See the <a href=\"%locale-help\">help screen</a> for more information.", array('%locale' => t($name), '%locale-help' => url("admin/help/locale")));
+ $message = t('%locale language added. You can now import a translation. See the <a href="%locale-help">help screen</a> for more information.', array('%locale' => '<em>'. t($name) .'</em>', '%locale-help' => url('admin/help/locale')));
}
else {
- $message = t("'%locale' language added.", array('%locale' => t($name)));
+ $message = t('%locale language added.', array('%locale' => '<em>'. t($name) .'</em>'));
}
drupal_set_message($message);
- watchdog('locale', t("'%locale' language added.", array('%locale' => $code)));
+ watchdog('locale', t('%locale language added.', array('%locale' => "<em>$code</em>")));
}
/**
@@ -122,13 +122,13 @@ function _locale_admin_import_screen() {
function _locale_import_po($file, $lang, $mode) {
// Check if we have the language already in the database
if (!db_fetch_object(db_query("SELECT locale FROM {locales_meta} WHERE locale = '%s'", $lang))) {
- drupal_set_message(t("Unsupported language selected for import."), 'error');
+ drupal_set_message(t('Unsupported language selected for import.'), 'error');
return FALSE;
}
// Check if we can get the strings from the file
if (!($strings = _locale_import_read_po($file))) {
- drupal_set_message(t("Translation file broken: Couldn't be read."), 'error');
+ drupal_set_message(t('Translation file broken: Could not be read.'), 'error');
return FALSE;
}
@@ -150,7 +150,7 @@ function _locale_import_po($file, $lang, $mode) {
}
}
else {
- drupal_set_message(t("Translation file broken: No header."), 'error');
+ drupal_set_message(t('Translation file broken: no header.'), 'error');
return FALSE;
}
@@ -221,8 +221,8 @@ function _locale_import_po($file, $lang, $mode) {
// Successfull import
cache_clear_all("locale:$lang");
- drupal_set_message(t("Translation successfully imported. %num translated strings added to language.", array('%num' => $fullstr)));
- watchdog('locale', strtr("Translation imported into '%locale', %num translated strings added to language.", array('%locale' => $lang, '%num' => $fullstr)));
+ drupal_set_message(t('Translation successfully imported. %number translated strings added to language.', array('%number' => $fullstr)));
+ watchdog('locale', t('Translation imported into %locale, %num translated strings added to language.', array('%locale' => "<em>$lang</em>", '%num' => $fullstr)));
return TRUE;
}
@@ -236,7 +236,7 @@ function _locale_import_read_po($path) {
$fd = fopen($path, "rb");
if (!$fd) {
- drupal_set_message(t("Translation import failed: File '%path' cannot be read.", array("%path" => $path)), 'error');
+ drupal_set_message(t('Translation import failed: file %filename cannot be read.', array('%filename' => "<em>$path</em>")), 'error');
return FALSE;
}
$info = fstat($fd);
@@ -268,19 +268,19 @@ function _locale_import_read_po($path) {
$context = "COMMENT";
}
else { // Parse error
- drupal_set_message(t("Translation file broken: Expected \"msgstr\" in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t("Translation file broken: expected 'msgstr' in line %line.", array('%line' => $lineno)), 'error');
return FALSE;
}
}
elseif (!strncmp("msgid_plural", $line, 12)) {
if ($context != "MSGID") { // Must be plural form for current entry
- drupal_set_message(t("Translation file broken: Unexpected \"msgid_plural\" in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t("Translation file broken: unexpected 'msgid_plural' in line %line.", array('%line' => $lineno)), 'error');
return FALSE;
}
$line = trim(substr($line, 12));
$quoted = _locale_import_parse_quoted($line);
if ($quoted === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
$current["msgid"] = $current["msgid"] ."\0". $quoted;
@@ -292,13 +292,13 @@ function _locale_import_read_po($path) {
$current = array();
}
elseif ($context == "MSGID") { // Already in this context? Parse error
- drupal_set_message(t("Translation file broken: Unexpected \"msgid\" in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t("Translation file broken: unexpected 'msgid' in line %line.", array('%line' => $lineno)), 'error');
return FALSE;
}
$line = trim(substr($line, 5));
$quoted = _locale_import_parse_quoted($line);
if ($quoted === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
$current["msgid"] = $quoted;
@@ -306,11 +306,11 @@ function _locale_import_read_po($path) {
}
elseif (!strncmp("msgstr[", $line, 7)) {
if (($context != "MSGID") && ($context != "MSGID_PLURAL") && ($context != "MSGSTR_ARR")) { // Must come after msgid, msgid_plural, or msgstr[]
- drupal_set_message(t("Translation file broken: Unexpected \"msgstr[]\" in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t("Translation file broken: unexpected 'msgstr[]' in line %line.", array('%line' => $lineno)), 'error');
return FALSE;
}
if (strpos($line, "]") === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
$frombracket = strstr($line, "[");
@@ -318,7 +318,7 @@ function _locale_import_read_po($path) {
$line = trim(strstr($line, " "));
$quoted = _locale_import_parse_quoted($line);
if ($quoted === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
$current["msgstr"][$plural] = $quoted;
@@ -326,13 +326,13 @@ function _locale_import_read_po($path) {
}
elseif (!strncmp("msgstr", $line, 6)) {
if ($context != "MSGID") { // Should come just after a msgid block
- drupal_set_message(t("Translation file broken: Unexpected \"msgstr\" in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t("Translation file broken: unexpected 'msgstr' in line %line.", array('%line' => $lineno)), 'error');
return FALSE;
}
$line = trim(substr($line, 6));
$quoted = _locale_import_parse_quoted($line);
if ($quoted === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
$current["msgstr"] = $quoted;
@@ -341,7 +341,7 @@ function _locale_import_read_po($path) {
elseif ($line != "") {
$quoted = _locale_import_parse_quoted($line);
if ($quoted === false) {
- drupal_set_message(t("Translation file broken: Syntax error in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: syntax error in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
if (($context == "MSGID") || ($context == "MSGID_PLURAL")) {
@@ -354,7 +354,7 @@ function _locale_import_read_po($path) {
$current["msgstr"][$plural] .= $quoted;
}
else {
- drupal_set_message(t("Translation file broken: Unexpected string in line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: unexpected string in line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
}
@@ -365,7 +365,7 @@ function _locale_import_read_po($path) {
$strings[$current["msgid"]] = $current;
}
elseif ($context != "COMMENT") {
- drupal_set_message(t("Translation file broken: Unexpected end file at line %lineno", array("%lineno" => $lineno)), 'error');
+ drupal_set_message(t('Translation file broken: unexpected end file at line %line.', array('%line' => $lineno)), 'error');
return FALSE;
}
@@ -429,7 +429,7 @@ function _locale_import_parse_plural_forms($pluralforms) {
return array($nplurals, $plural);
}
else {
- drupal_set_message(t("Translation file broken: Plural formula couldn't get parsed."), 'error');
+ drupal_set_message(t("Translation file broken: plural formula couldn't get parsed."), 'error');
return FALSE;
}
}
@@ -730,7 +730,7 @@ function _locale_export_po($language) {
$header .= "\"Plural-Forms: nplurals=". $meta->plurals ."; plural=". strtr($meta->formula, '$', '') .";\\n\"\n";
}
$header .= "\n";
- watchdog('locale', strtr("PO file for locale '%loc' downloaded.", array('%loc' => $meta->name)));
+ watchdog('locale', t('PO file for locale %locale downloaded.', array('%locale' => "<em>$meta->name</em>")));
}
// Generating Portable Object Template
@@ -751,7 +751,7 @@ function _locale_export_po($language) {
$header .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
$header .= "\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n\"\n";
$header .= "\n";
- watchdog('locale', 'POT file downloaded.');
+ watchdog('locale', t('POT file downloaded.'));
}
// Start download process
diff --git a/modules/aggregator.module b/modules/aggregator.module
index fb8c89b86..5a5d2ab71 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -266,7 +266,7 @@ function aggregator_remove($feed) {
}
db_query('DELETE FROM {aggregator_item} WHERE fid = %d', $feed['fid']);
db_query("UPDATE {aggregator_feed} SET checked = 0, etag = '', modified = 0 WHERE fid = %d", $feed['fid']);
- drupal_set_message(t('Removed news items from \'%site\'.', array('%site' => $feed['title'])));
+ drupal_set_message(t('Removed news items from %site.', array('%site' => '<em>'.$feed['title'] .'</em>')));
}
/**
@@ -346,11 +346,11 @@ function aggregator_refresh($feed) {
switch ($result->code) {
case 304:
db_query('UPDATE {aggregator_feed} SET checked = %d WHERE fid = %d', time(), $feed['fid']);
- drupal_set_message(t('No new syndicated content from "%site".', array('%site' => $feed['title'])));
+ drupal_set_message(t('No new syndicated content from %site.', array('%site' => '<em>'. $feed['title'] .'</em>')));
break;
case 301:
$feed['url'] = $result->redirect_url;
- watchdog('special', t('aggregator: updated URL for feed "%title" to %url', array('%title' => $feed[title], '%url' => $feed[url])));
+ watchdog('special', t('Aggregator: updated URL for feed %title to %url.', array('%title' => '<em>'. $feed[title] .'</em>', '%url' => '<em>'. $feed[url] .'</em>')));
case 200:
case 302:
case 307:
@@ -388,13 +388,13 @@ function aggregator_refresh($feed) {
cache_clear_all();
- watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title])));
- drupal_set_message(t('Syndicated content from "%site".', array('%site' => $feed['title'])));
+ watchdog('regular', t('Aggregator: syndicated content from %site.', array('%site' => '<em>'. $feed[title] .'</em>')));
+ drupal_set_message(t('Syndicated content from %site.', array('%site' => '<em>'. $feed['title'] .'</em>')));
}
break;
default:
- watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
- drupal_set_message(t('Failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
+ watchdog('error', t('Aggregator: failed to parse RSS feed %site: %error.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => "<em>$result->code $result->error</em>")));
+ drupal_set_message(t('Failed to parse RSS feed %site: %error.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => "<em>$result->code $result->error</em>")));
}
}
@@ -450,8 +450,8 @@ function aggregator_parse_feed(&$data, $feed) {
xml_set_character_data_handler($xml_parser, 'aggregator_element_data');
if (!xml_parse($xml_parser, $data, 1)) {
- watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
- drupal_set_message(t('Failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))), 'error');
+ watchdog('error', t('Aggregator: failed to parse RSS feed %site: %error at line %line.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
+ drupal_set_message(t('Failed to parse RSS feed %site: %error at line %line.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))), 'error');
return 0;
}
xml_parser_free($xml_parser);
@@ -542,7 +542,7 @@ function aggregator_parse_feed(&$data, $feed) {
}
if (!valid_input_data($item['DESCRIPTION'])) {
- drupal_set_message(t('Failed to parse entry from "%site" feed: suspicious input data.', array('%site' => $feed['title'])), 'error');
+ drupal_set_message(t('Failed to parse entry from %site feed: suspicious input data.', array('%site' => '<em>'. $feed['title'] .'</em>')), 'error');
}
else {
aggregator_save_item(array('iid' => $entry->iid, 'fid' => $feed['fid'], 'timestamp' => $timestamp, 'title' => $title, 'link' => $link, 'author' => $item['AUTHOR'], 'description' => $item['DESCRIPTION']));
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index fb8c89b86..5a5d2ab71 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -266,7 +266,7 @@ function aggregator_remove($feed) {
}
db_query('DELETE FROM {aggregator_item} WHERE fid = %d', $feed['fid']);
db_query("UPDATE {aggregator_feed} SET checked = 0, etag = '', modified = 0 WHERE fid = %d", $feed['fid']);
- drupal_set_message(t('Removed news items from \'%site\'.', array('%site' => $feed['title'])));
+ drupal_set_message(t('Removed news items from %site.', array('%site' => '<em>'.$feed['title'] .'</em>')));
}
/**
@@ -346,11 +346,11 @@ function aggregator_refresh($feed) {
switch ($result->code) {
case 304:
db_query('UPDATE {aggregator_feed} SET checked = %d WHERE fid = %d', time(), $feed['fid']);
- drupal_set_message(t('No new syndicated content from "%site".', array('%site' => $feed['title'])));
+ drupal_set_message(t('No new syndicated content from %site.', array('%site' => '<em>'. $feed['title'] .'</em>')));
break;
case 301:
$feed['url'] = $result->redirect_url;
- watchdog('special', t('aggregator: updated URL for feed "%title" to %url', array('%title' => $feed[title], '%url' => $feed[url])));
+ watchdog('special', t('Aggregator: updated URL for feed %title to %url.', array('%title' => '<em>'. $feed[title] .'</em>', '%url' => '<em>'. $feed[url] .'</em>')));
case 200:
case 302:
case 307:
@@ -388,13 +388,13 @@ function aggregator_refresh($feed) {
cache_clear_all();
- watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title])));
- drupal_set_message(t('Syndicated content from "%site".', array('%site' => $feed['title'])));
+ watchdog('regular', t('Aggregator: syndicated content from %site.', array('%site' => '<em>'. $feed[title] .'</em>')));
+ drupal_set_message(t('Syndicated content from %site.', array('%site' => '<em>'. $feed['title'] .'</em>')));
}
break;
default:
- watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
- drupal_set_message(t('Failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)));
+ watchdog('error', t('Aggregator: failed to parse RSS feed %site: %error.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => "<em>$result->code $result->error</em>")));
+ drupal_set_message(t('Failed to parse RSS feed %site: %error.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => "<em>$result->code $result->error</em>")));
}
}
@@ -450,8 +450,8 @@ function aggregator_parse_feed(&$data, $feed) {
xml_set_character_data_handler($xml_parser, 'aggregator_element_data');
if (!xml_parse($xml_parser, $data, 1)) {
- watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
- drupal_set_message(t('Failed to parse RSS feed "%site": %error at line %line.', array('%site' => $feed['title'], '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))), 'error');
+ watchdog('error', t('Aggregator: failed to parse RSS feed %site: %error at line %line.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))));
+ drupal_set_message(t('Failed to parse RSS feed %site: %error at line %line.', array('%site' => '<em>'. $feed['title'] .'</em>', '%error' => xml_error_string(xml_get_error_code($xml_parser)), '%line' => xml_get_current_line_number($xml_parser))), 'error');
return 0;
}
xml_parser_free($xml_parser);
@@ -542,7 +542,7 @@ function aggregator_parse_feed(&$data, $feed) {
}
if (!valid_input_data($item['DESCRIPTION'])) {
- drupal_set_message(t('Failed to parse entry from "%site" feed: suspicious input data.', array('%site' => $feed['title'])), 'error');
+ drupal_set_message(t('Failed to parse entry from %site feed: suspicious input data.', array('%site' => '<em>'. $feed['title'] .'</em>')), 'error');
}
else {
aggregator_save_item(array('iid' => $entry->iid, 'fid' => $feed['fid'], 'timestamp' => $timestamp, 'title' => $title, 'link' => $link, 'author' => $item['AUTHOR'], 'description' => $item['DESCRIPTION']));
diff --git a/modules/blogapi.module b/modules/blogapi.module
index 96bb04357..af20f89e2 100644
--- a/modules/blogapi.module
+++ b/modules/blogapi.module
@@ -144,7 +144,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node);
if ($nid) {
- watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
+ watchdog('special', t('%type: added %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string'));
}
@@ -204,7 +204,7 @@ function blogapi_edit_post($req_params) {
}
$nid = node_save($node);
if ($nid) {
- watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
+ watchdog('special', t('%type: updated %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
}
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 96bb04357..af20f89e2 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -144,7 +144,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node);
if ($nid) {
- watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
+ watchdog('special', t('%type: added %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string'));
}
@@ -204,7 +204,7 @@ function blogapi_edit_post($req_params) {
}
$nid = node_save($node);
if ($nid) {
- watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
+ watchdog('special', t('%type: updated %title using blog API.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
}
diff --git a/modules/book.module b/modules/book.module
index a2ce00b51..89e7c1438 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -714,7 +714,7 @@ function book_admin_save($nid, $edit = array()) {
}
}
- $message = t('updated book "%title"', array('%title' => $book->title));
+ $message = t('Updated book %title.', array('%title' => "<em>$book->title</em>"));
watchdog('special', $message);
return $message;
diff --git a/modules/book/book.module b/modules/book/book.module
index a2ce00b51..89e7c1438 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -714,7 +714,7 @@ function book_admin_save($nid, $edit = array()) {
}
}
- $message = t('updated book "%title"', array('%title' => $book->title));
+ $message = t('Updated book %title.', array('%title' => "<em>$book->title</em>"));
watchdog('special', $message);
return $message;
diff --git a/modules/comment.module b/modules/comment.module
index 2640394fa..96dfbb93b 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -549,7 +549,7 @@ function comment_post($edit) {
$duplicate = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'", $edit["pid"], $edit["nid"], $edit['subject'], $edit['comment']), 0);
if ($duplicate != 0) {
- watchdog('warning', t('comment: duplicate "%comment-subject"', array('%comment-subject' => $edit["subject"])));
+ watchdog('warning', t('Comment: duplicate %subject.', array('%subject' => '<em>'. $edit["subject"] .'</em>')));
}
if ($edit["cid"]) {
@@ -562,7 +562,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'update', $edit);
// Add entry to the watchdog log.
- watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+ watchdog('special', t('Comment: updated %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
}
else {
// Add the comment to database.
@@ -671,7 +671,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'insert', $edit);
// Add an entry to the watchdog log.
- watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+ watchdog('special', t('Comment: added %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
}
// Clear the cache so an anonymous user can see his comment being added.
@@ -692,7 +692,7 @@ function comment_post($edit) {
}
}
else {
- watchdog('error', t('comment: unauthorized comment submitted or comment submitted to a closed node "%comment-subject"', array('%comment-subject' => $edit['subject'])));
+ watchdog('error', t('Comment: unauthorized comment submitted or comment submitted to a closed node %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')));
}
}
@@ -1006,7 +1006,7 @@ function comment_delete($cid) {
function comment_save($id, $edit) {
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d WHERE cid = %d", $edit['subject'], $edit['comment'], $edit['status'], $id);
- watchdog('special', t('comment: modified "%comment-subject"', array('%comment-subject' => $edit['subject'])));
+ watchdog('special', t('Comment: modified %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')));
drupal_set_message(t('The comment has been saved.'));
}
@@ -1629,7 +1629,7 @@ function theme_comment_post_forbidden() {
function _comment_delete_thread($comment) {
// Delete the comment:
db_query('DELETE FROM {comments} WHERE cid = %d', $comment->cid);
- watchdog('special', t('comment: deleted "%comment-subject"', array('%comment-subject' => $comment->subject)));
+ watchdog('special', t('Comment: deleted %subject.', array('%subject' => "<em>$comment->subject</em>")));
// Delete the comment's replies:
$result = db_query('SELECT cid, subject FROM {comments} WHERE pid = %d', $comment->cid);
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 2640394fa..96dfbb93b 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -549,7 +549,7 @@ function comment_post($edit) {
$duplicate = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE pid = %d AND nid = %d AND subject = '%s' AND comment = '%s'", $edit["pid"], $edit["nid"], $edit['subject'], $edit['comment']), 0);
if ($duplicate != 0) {
- watchdog('warning', t('comment: duplicate "%comment-subject"', array('%comment-subject' => $edit["subject"])));
+ watchdog('warning', t('Comment: duplicate %subject.', array('%subject' => '<em>'. $edit["subject"] .'</em>')));
}
if ($edit["cid"]) {
@@ -562,7 +562,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'update', $edit);
// Add entry to the watchdog log.
- watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+ watchdog('special', t('Comment: updated %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
}
else {
// Add the comment to database.
@@ -671,7 +671,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'insert', $edit);
// Add an entry to the watchdog log.
- watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
+ watchdog('special', t('Comment: added %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
}
// Clear the cache so an anonymous user can see his comment being added.
@@ -692,7 +692,7 @@ function comment_post($edit) {
}
}
else {
- watchdog('error', t('comment: unauthorized comment submitted or comment submitted to a closed node "%comment-subject"', array('%comment-subject' => $edit['subject'])));
+ watchdog('error', t('Comment: unauthorized comment submitted or comment submitted to a closed node %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')));
}
}
@@ -1006,7 +1006,7 @@ function comment_delete($cid) {
function comment_save($id, $edit) {
db_query("UPDATE {comments} SET subject = '%s', comment = '%s', status = %d WHERE cid = %d", $edit['subject'], $edit['comment'], $edit['status'], $id);
- watchdog('special', t('comment: modified "%comment-subject"', array('%comment-subject' => $edit['subject'])));
+ watchdog('special', t('Comment: modified %subject.', array('%subject' => '<em>'. $edit['subject'] .'</em>')));
drupal_set_message(t('The comment has been saved.'));
}
@@ -1629,7 +1629,7 @@ function theme_comment_post_forbidden() {
function _comment_delete_thread($comment) {
// Delete the comment:
db_query('DELETE FROM {comments} WHERE cid = %d', $comment->cid);
- watchdog('special', t('comment: deleted "%comment-subject"', array('%comment-subject' => $comment->subject)));
+ watchdog('special', t('Comment: deleted %subject.', array('%subject' => "<em>$comment->subject</em>")));
// Delete the comment's replies:
$result = db_query('SELECT cid, subject FROM {comments} WHERE pid = %d', $comment->cid);
diff --git a/modules/drupal.module b/modules/drupal.module
index 05bdcf9df..bae7ebfbd 100644
--- a/modules/drupal.module
+++ b/modules/drupal.module
@@ -29,13 +29,13 @@ function drupal_help($section) {
function drupal_settings() {
// Check if all required fields are present for the Drupal directory
if ((variable_get('site_name', 'drupal') == 'drupal') || (variable_get('site_name', 'drupal') == ''))
- form_set_error('drupal_directory', t("You must set your site's name on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set the name of your site on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_mail', ini_get('sendmail_from')) == '')
- form_set_error('drupal_directory', t("You must set your site's e-mail address on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set an e-mail address for your site on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_slogan', '') == '')
- form_set_error('drupal_directory', t("You must set your site's slogan on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set your site slogan on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_mission', '') == '')
- form_set_error('drupal_directory', t("You must set your site's mission on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set your site mission on the <a href="%url">administer &raquo; settings</a> page.' , array('%url' => url('admin/settings'))));
$output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 55, 128, t('The URL of your root Drupal XML-RPC server.'));
$output .= form_radios(t('Drupal directory'), 'drupal_directory', variable_get('drupal_directory', 0), array(t('Disabled'), t('Enabled')), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"Drupal XML-RPC server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the <a href=\"%drupal-sites\">Drupal sites</a> page. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "http://www.drupal.org/sites/")));
@@ -90,7 +90,7 @@ function drupal_directory_ping($arguments) {
db_query("DELETE FROM {directory} WHERE link = '%s' OR mail = '%s'", $link, $mail);
db_query("INSERT INTO {directory} (link, name, mail, slogan, mission, timestamp) VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $link, $name, $mail, $slogan, $mission, time());
- watchdog('regular', t('directory: ping from "%name" (%link)', array('%name' => $name, '%link' => $link)));
+ watchdog('regular', t('Directory: ping from %name (%link).', array('%name' => "<em>$name</em>", '%link' => "<em>$link</em>")));
return new xmlrpcresp(new xmlrpcval(1, 'int'));
}
@@ -138,7 +138,7 @@ function drupal_notify($server) {
$result = $client->send($message, 5);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "%url" at "%path": %error', array('%url' => $url["host"], '%path' => $url["path"], '%error' => $result->faultString())));
+ watchdog('error', t('Failed to notify %url at %path: %error.', array('%url' => '<em>'. $url["host"] .'</em>', '%path' => '<em>'. $url["path"] .'</em>', '%error' => '<em>'. $result->faultString() .'</em>')));
}
}
diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module
index 05bdcf9df..bae7ebfbd 100644
--- a/modules/drupal/drupal.module
+++ b/modules/drupal/drupal.module
@@ -29,13 +29,13 @@ function drupal_help($section) {
function drupal_settings() {
// Check if all required fields are present for the Drupal directory
if ((variable_get('site_name', 'drupal') == 'drupal') || (variable_get('site_name', 'drupal') == ''))
- form_set_error('drupal_directory', t("You must set your site's name on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set the name of your site on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_mail', ini_get('sendmail_from')) == '')
- form_set_error('drupal_directory', t("You must set your site's e-mail address on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set an e-mail address for your site on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_slogan', '') == '')
- form_set_error('drupal_directory', t("You must set your site's slogan on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set your site slogan on the <a href="%url">administer &raquo; settings</a> page.', array('%url' => url('admin/settings'))));
else if (variable_get('site_mission', '') == '')
- form_set_error('drupal_directory', t("You must set your site's mission on the <a href=\"%url\">administer &raquo; settings</a> page.", array('%url' => url('admin/settings'))));
+ form_set_error('drupal_directory', t('You must set your site mission on the <a href="%url">administer &raquo; settings</a> page.' , array('%url' => url('admin/settings'))));
$output = form_textfield(t('Drupal XML-RPC server'), 'drupal_server', variable_get('drupal_server', 'http://www.drupal.org/xmlrpc.php'), 55, 128, t('The URL of your root Drupal XML-RPC server.'));
$output .= form_radios(t('Drupal directory'), 'drupal_directory', variable_get('drupal_directory', 0), array(t('Disabled'), t('Enabled')), t("If enabled, your Drupal site will make itself known to the Drupal directory at the specified Drupal XML-RPC server. For this to work properly, you must set your site's name, e-mail address, slogan and mission statement. When the \"Drupal XML-RPC server\" field is set to \"%drupal-xml-rpc\", your web site will get listed on the <a href=\"%drupal-sites\">Drupal sites</a> page. Requires the cron feature to be enabled.", array("%drupal-xml-rpc" => "http://www.drupal.org/xmlrpc.php", "%drupal-sites" => "http://www.drupal.org/sites/")));
@@ -90,7 +90,7 @@ function drupal_directory_ping($arguments) {
db_query("DELETE FROM {directory} WHERE link = '%s' OR mail = '%s'", $link, $mail);
db_query("INSERT INTO {directory} (link, name, mail, slogan, mission, timestamp) VALUES ('%s', '%s', '%s', '%s', '%s', %d)", $link, $name, $mail, $slogan, $mission, time());
- watchdog('regular', t('directory: ping from "%name" (%link)', array('%name' => $name, '%link' => $link)));
+ watchdog('regular', t('Directory: ping from %name (%link).', array('%name' => "<em>$name</em>", '%link' => "<em>$link</em>")));
return new xmlrpcresp(new xmlrpcval(1, 'int'));
}
@@ -138,7 +138,7 @@ function drupal_notify($server) {
$result = $client->send($message, 5);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "%url" at "%path": %error', array('%url' => $url["host"], '%path' => $url["path"], '%error' => $result->faultString())));
+ watchdog('error', t('Failed to notify %url at %path: %error.', array('%url' => '<em>'. $url["host"] .'</em>', '%path' => '<em>'. $url["path"] .'</em>', '%error' => '<em>'. $result->faultString() .'</em>')));
}
}
diff --git a/modules/filter.module b/modules/filter.module
index 558b6672b..20037a105 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -271,7 +271,7 @@ function filter_admin_add() {
db_query("INSERT INTO {filter_formats} (name) VALUES ('%s')", $name);
}
- drupal_set_message(t("Added input format '%format'", array('%format' => $edit['name'])));
+ drupal_set_message(t('Added input format %format.', array('%format' => '<em>'. $edit['name'] .'</em>')));
drupal_goto('admin/filters');
}
@@ -292,7 +292,7 @@ function filter_admin_delete() {
cache_clear_all('filter:'. $edit['format'], true);
- drupal_set_message(t("Deleted input format '%format'", array('%format' => $edit['name'])));
+ drupal_set_message(t('Deleted input format %format.', array('%format' => '<em>'. $edit['name'] .'</em>')));
}
drupal_goto('admin/filters');
}
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 558b6672b..20037a105 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -271,7 +271,7 @@ function filter_admin_add() {
db_query("INSERT INTO {filter_formats} (name) VALUES ('%s')", $name);
}
- drupal_set_message(t("Added input format '%format'", array('%format' => $edit['name'])));
+ drupal_set_message(t('Added input format %format.', array('%format' => '<em>'. $edit['name'] .'</em>')));
drupal_goto('admin/filters');
}
@@ -292,7 +292,7 @@ function filter_admin_delete() {
cache_clear_all('filter:'. $edit['format'], true);
- drupal_set_message(t("Deleted input format '%format'", array('%format' => $edit['name'])));
+ drupal_set_message(t('Deleted input format %format.', array('%format' => '<em>'. $edit['name'] .'</em>')));
}
drupal_goto('admin/filters');
}
diff --git a/modules/forum.module b/modules/forum.module
index 017e5e813..5d633de70 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -242,7 +242,7 @@ function forum_validate(&$node) {
if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) {
if (in_array($term, $containers)) {
$term = taxonomy_get_term($term);
- form_set_error('taxonomy', t('The item \'%forum\' is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name)));
+ form_set_error('taxonomy', t('The item %forum is only a container for forums. Please select one of the forums below it.', array('%forum' => "<em>$term->name</em>")));
}
else {
$node->tid = $term;
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 017e5e813..5d633de70 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -242,7 +242,7 @@ function forum_validate(&$node) {
if (db_result(db_query('SELECT COUNT(*) FROM {term_data} WHERE tid = %d AND vid = %d', $term, $vocabulary))) {
if (in_array($term, $containers)) {
$term = taxonomy_get_term($term);
- form_set_error('taxonomy', t('The item \'%forum\' is only a container for forums. Please select one of the forums below it.', array('%forum' => $term->name)));
+ form_set_error('taxonomy', t('The item %forum is only a container for forums. Please select one of the forums below it.', array('%forum' => "<em>$term->name</em>")));
}
else {
$node->tid = $term;
diff --git a/modules/locale.module b/modules/locale.module
index b7271481b..ee1458249 100644
--- a/modules/locale.module
+++ b/modules/locale.module
@@ -299,8 +299,8 @@ function locale_admin_manage() {
if (isset($languages['name'][$edit['langcode']])) {
db_query("DELETE FROM {locales_meta} WHERE locale = '%s'", $edit['langcode']);
db_query("DELETE FROM {locales_target} WHERE locale = '%s'", $edit['langcode']);
- drupal_set_message(t("'%locale' language removed.", array('%locale' => t($languages['name'][$edit['langcode']]))));
- watchdog('locale', t("'%locale' language removed.", array('%locale' => $edit['langcode'])));
+ drupal_set_message(t('%locale language removed.', array('%locale' => '<em>'. t($languages['name'][$edit['langcode']]) .'</em>')));
+ watchdog('locale', t('%locale language removed.', array('%locale' => '<em>'. $edit['langcode'] .'</em>')));
}
break;
}
@@ -358,7 +358,7 @@ function locale_admin_manage_add() {
drupal_set_message(t('You need to specify both the language code and the English name of the new language.'), 'error');
}
else {
- drupal_set_message(t("The language '%language' (%code) is already set up.", array('%language' => $edit['langname'], '%code' => $edit['langcode'])), 'error');
+ drupal_set_message(t('The language %language (%code) is already set up.', array('%language' => '<em>'. $edit['langname'] .'</em>', '%code' => '<em>'. $edit['langcode'] .'</em>')), 'error');
}
break;
}
@@ -387,8 +387,8 @@ function locale_admin_import() {
// Now import strings into the language
$file = file_check_upload('file');
if ($ret = _locale_import_po($file->path, $edit['langcode'], $edit['mode']) == FALSE) {
- watchdog('error', 'Translation import failed.');
- watchdog('locale', 'Translation import failed.');
+ watchdog('error', t('Translation import failed.'));
+ watchdog('locale', t('Translation import failed.'));
}
drupal_goto('admin/locale');
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index b7271481b..ee1458249 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -299,8 +299,8 @@ function locale_admin_manage() {
if (isset($languages['name'][$edit['langcode']])) {
db_query("DELETE FROM {locales_meta} WHERE locale = '%s'", $edit['langcode']);
db_query("DELETE FROM {locales_target} WHERE locale = '%s'", $edit['langcode']);
- drupal_set_message(t("'%locale' language removed.", array('%locale' => t($languages['name'][$edit['langcode']]))));
- watchdog('locale', t("'%locale' language removed.", array('%locale' => $edit['langcode'])));
+ drupal_set_message(t('%locale language removed.', array('%locale' => '<em>'. t($languages['name'][$edit['langcode']]) .'</em>')));
+ watchdog('locale', t('%locale language removed.', array('%locale' => '<em>'. $edit['langcode'] .'</em>')));
}
break;
}
@@ -358,7 +358,7 @@ function locale_admin_manage_add() {
drupal_set_message(t('You need to specify both the language code and the English name of the new language.'), 'error');
}
else {
- drupal_set_message(t("The language '%language' (%code) is already set up.", array('%language' => $edit['langname'], '%code' => $edit['langcode'])), 'error');
+ drupal_set_message(t('The language %language (%code) is already set up.', array('%language' => '<em>'. $edit['langname'] .'</em>', '%code' => '<em>'. $edit['langcode'] .'</em>')), 'error');
}
break;
}
@@ -387,8 +387,8 @@ function locale_admin_import() {
// Now import strings into the language
$file = file_check_upload('file');
if ($ret = _locale_import_po($file->path, $edit['langcode'], $edit['mode']) == FALSE) {
- watchdog('error', 'Translation import failed.');
- watchdog('locale', 'Translation import failed.');
+ watchdog('error', t('Translation import failed.'));
+ watchdog('locale', t('Translation import failed.'));
}
drupal_goto('admin/locale');
diff --git a/modules/menu.module b/modules/menu.module
index 260f087be..cfc0b211d 100644
--- a/modules/menu.module
+++ b/modules/menu.module
@@ -317,16 +317,16 @@ function menu_edit_item_save($edit) {
if ($edit['mid']) {
db_query("UPDATE {menu} SET pid = %d, path = '%s', title = '%s', description = '%s', weight = %d, type = %d WHERE mid = %d", $edit['pid'], $edit['path'], $edit['title'], $edit['description'], $edit['weight'], $edit['type'] | MENU_MODIFIED_BY_ADMIN, $edit['mid']);
- drupal_set_message(t('Updated menu item "%title".', array('%title' => $edit['title'])));
+ drupal_set_message(t('Updated menu item %title.', array('%title' => '<em>'. $edit['title'] .'</em>')));
}
else {
$mid = db_next_id('{menu}_mid');
db_query("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) VALUES (%d, %d, '%s', '%s', '%s', %d, %d)", $mid, $edit['pid'], $edit['path'], $edit['title'], $edit['description'], $edit['weight'], $edit['type'] | MENU_MODIFIED_BY_ADMIN);
- drupal_set_message(t('Created new menu item "%title".', array('%title' => $edit['title'])));
+ drupal_set_message(t('Created new menu item %title.', array('%title' => '<em>'. $edit['title'] .'</em>')));
if (array_key_exists($edit['path'], $menu['path index'])) {
$old_mid = $menu['path index'][$edit['path']];
$old_item = $menu['items'][$old_mid];
- drupal_set_message(t('Since a menu item "%old" already exists for "%path", this new menu item was created as a shortcut to that location.', array('%old' => l($old_item['title'], 'admin/menu/item/edit/'. $old_mid), '%path' => $edit['path'])));
+ drupal_set_message(t('Since a menu item %old already exists for %path, this new menu item was created as a shortcut to that location.', array('%old' => l('<em>'. $old_item['title'] .'</em>', 'admin/menu/item/edit/'. $old_mid), '%path' => '<em>'. $edit['path'] .'</em>')));
}
}
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index 260f087be..cfc0b211d 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -317,16 +317,16 @@ function menu_edit_item_save($edit) {
if ($edit['mid']) {
db_query("UPDATE {menu} SET pid = %d, path = '%s', title = '%s', description = '%s', weight = %d, type = %d WHERE mid = %d", $edit['pid'], $edit['path'], $edit['title'], $edit['description'], $edit['weight'], $edit['type'] | MENU_MODIFIED_BY_ADMIN, $edit['mid']);
- drupal_set_message(t('Updated menu item "%title".', array('%title' => $edit['title'])));
+ drupal_set_message(t('Updated menu item %title.', array('%title' => '<em>'. $edit['title'] .'</em>')));
}
else {
$mid = db_next_id('{menu}_mid');
db_query("INSERT INTO {menu} (mid, pid, path, title, description, weight, type) VALUES (%d, %d, '%s', '%s', '%s', %d, %d)", $mid, $edit['pid'], $edit['path'], $edit['title'], $edit['description'], $edit['weight'], $edit['type'] | MENU_MODIFIED_BY_ADMIN);
- drupal_set_message(t('Created new menu item "%title".', array('%title' => $edit['title'])));
+ drupal_set_message(t('Created new menu item %title.', array('%title' => '<em>'. $edit['title'] .'</em>')));
if (array_key_exists($edit['path'], $menu['path index'])) {
$old_mid = $menu['path index'][$edit['path']];
$old_item = $menu['items'][$old_mid];
- drupal_set_message(t('Since a menu item "%old" already exists for "%path", this new menu item was created as a shortcut to that location.', array('%old' => l($old_item['title'], 'admin/menu/item/edit/'. $old_mid), '%path' => $edit['path'])));
+ drupal_set_message(t('Since a menu item %old already exists for %path, this new menu item was created as a shortcut to that location.', array('%old' => l('<em>'. $old_item['title'] .'</em>', 'admin/menu/item/edit/'. $old_mid), '%path' => '<em>'. $edit['path'] .'</em>')));
}
}
diff --git a/modules/node.module b/modules/node.module
index cd20529cf..1d5fbbae4 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -901,7 +901,7 @@ function node_revision_rollback($nid, $revision) {
node_save($rev, $filter);
- drupal_set_message(t('Rolled back to revision #%revision of "%title"', array('%revision' => $revision, '%title' => $node->title)));
+ drupal_set_message(t('Rolled back to revision %revision of %title', array('%revision' => "<em>#$revision</em>", '%title' => "<em>$node->title</em>")));
drupal_goto('node/'. $nid .'/revisions');
}
}
@@ -917,7 +917,7 @@ function node_revision_delete($nid, $revision) {
node_save($node, array('nid', 'revisions'));
- drupal_set_message(t('Deleted revision #%revision of "%title"', array('%revision' => $revision, '%title' => $node->title)));
+ drupal_set_message(t('Deleted revision %revision of %title', array('%revision' => "<em>#$revision</em>", '%title' => "<em>$node->title</em>")));
drupal_goto('node/'. $nid . (count($node->revisions) ? '/revisions' : ''));
}
}
@@ -1066,7 +1066,7 @@ function node_validate($node) {
$node->uid = $account->uid;
}
else {
- form_set_error('name', t("The name '%u' does not exist.", array ('%u' => $node->name)));
+ form_set_error('name', t('The name %name does not exist.', array ('%name' => "<em>$node->name</em>")));
}
// Validate the "authored on" field.
@@ -1348,8 +1348,8 @@ function node_submit($node) {
// perform this operation:
if (node_access('update', $node)) {
$node->nid = node_save($node);
- watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view'), 'node/'. $node->nid));
- $msg = t('The %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
+ watchdog('special', t('%type: updated %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), 'node/'. $node->nid));
+ $msg = t('The %post was updated.', array ('%post' => node_invoke($node, 'node_name')));
}
}
else {
@@ -1357,8 +1357,8 @@ function node_submit($node) {
// perform this operation:
if (node_access('create', $node)) {
$node->nid = node_save($node);
- watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$node->nid"));
- $msg = t('Your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
+ watchdog('special', t('%type: added %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$node->nid"));
+ $msg = t('Your %post was created.', array ('%post' => node_invoke($node, 'node_name')));
}
}
@@ -1387,7 +1387,7 @@ function node_delete($edit) {
// Clear the cache so an anonymous poster can see the node being deleted.
cache_clear_all();
- watchdog('special', t('%node-type: deleted "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)));
+ watchdog('special', t('%type: deleted %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")));
$output = t('The node has been deleted.');
}
else {
diff --git a/modules/node/node.module b/modules/node/node.module
index cd20529cf..1d5fbbae4 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -901,7 +901,7 @@ function node_revision_rollback($nid, $revision) {
node_save($rev, $filter);
- drupal_set_message(t('Rolled back to revision #%revision of "%title"', array('%revision' => $revision, '%title' => $node->title)));
+ drupal_set_message(t('Rolled back to revision %revision of %title', array('%revision' => "<em>#$revision</em>", '%title' => "<em>$node->title</em>")));
drupal_goto('node/'. $nid .'/revisions');
}
}
@@ -917,7 +917,7 @@ function node_revision_delete($nid, $revision) {
node_save($node, array('nid', 'revisions'));
- drupal_set_message(t('Deleted revision #%revision of "%title"', array('%revision' => $revision, '%title' => $node->title)));
+ drupal_set_message(t('Deleted revision %revision of %title', array('%revision' => "<em>#$revision</em>", '%title' => "<em>$node->title</em>")));
drupal_goto('node/'. $nid . (count($node->revisions) ? '/revisions' : ''));
}
}
@@ -1066,7 +1066,7 @@ function node_validate($node) {
$node->uid = $account->uid;
}
else {
- form_set_error('name', t("The name '%u' does not exist.", array ('%u' => $node->name)));
+ form_set_error('name', t('The name %name does not exist.', array ('%name' => "<em>$node->name</em>")));
}
// Validate the "authored on" field.
@@ -1348,8 +1348,8 @@ function node_submit($node) {
// perform this operation:
if (node_access('update', $node)) {
$node->nid = node_save($node);
- watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view'), 'node/'. $node->nid));
- $msg = t('The %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
+ watchdog('special', t('%type: updated %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), 'node/'. $node->nid));
+ $msg = t('The %post was updated.', array ('%post' => node_invoke($node, 'node_name')));
}
}
else {
@@ -1357,8 +1357,8 @@ function node_submit($node) {
// perform this operation:
if (node_access('create', $node)) {
$node->nid = node_save($node);
- watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$node->nid"));
- $msg = t('Your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
+ watchdog('special', t('%type: added %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")), l(t('view'), "node/$node->nid"));
+ $msg = t('Your %post was created.', array ('%post' => node_invoke($node, 'node_name')));
}
}
@@ -1387,7 +1387,7 @@ function node_delete($edit) {
// Clear the cache so an anonymous poster can see the node being deleted.
cache_clear_all();
- watchdog('special', t('%node-type: deleted "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)));
+ watchdog('special', t('%type: deleted %title.', array('%type' => '<em>'. t($node->type) .'</em>', '%title' => "<em>$node->title</em>")));
$output = t('The node has been deleted.');
}
else {
diff --git a/modules/path.module b/modules/path.module
index b5699f21f..cee8385fb 100644
--- a/modules/path.module
+++ b/modules/path.module
@@ -290,15 +290,15 @@ function path_save($edit) {
$pid = $edit['pid'];
if (!valid_url($src)) {
- form_set_error('src', t('The system path "%src" is invalid.', array('%src' => $src)));
+ form_set_error('src', t('The system path %path is invalid.', array('%path' => "<em>$src</em>")));
}
if (!valid_url($dst)) {
- form_set_error('dst', t('The alias "%dst" is invalid.', array('%dst' => $dst)));
+ form_set_error('dst', t('The alias %alias is invalid.', array('%alias' => "<em>$dst</em>")));
}
if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s'", $pid, $dst))) {
- form_set_error('dst', t('The alias "%dst" is already in use.', array('%dst' => $dst)));
+ form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => "<em>$dst</em>")));
}
if (form_get_errors()) {
diff --git a/modules/path/path.module b/modules/path/path.module
index b5699f21f..cee8385fb 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -290,15 +290,15 @@ function path_save($edit) {
$pid = $edit['pid'];
if (!valid_url($src)) {
- form_set_error('src', t('The system path "%src" is invalid.', array('%src' => $src)));
+ form_set_error('src', t('The system path %path is invalid.', array('%path' => "<em>$src</em>")));
}
if (!valid_url($dst)) {
- form_set_error('dst', t('The alias "%dst" is invalid.', array('%dst' => $dst)));
+ form_set_error('dst', t('The alias %alias is invalid.', array('%alias' => "<em>$dst</em>")));
}
if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s'", $pid, $dst))) {
- form_set_error('dst', t('The alias "%dst" is already in use.', array('%dst' => $dst)));
+ form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => "<em>$dst</em>")));
}
if (form_get_errors()) {
diff --git a/modules/ping.module b/modules/ping.module
index 96a6d576d..ed0538def 100644
--- a/modules/ping.module
+++ b/modules/ping.module
@@ -64,7 +64,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "weblogs.com" (site)'));
+ watchdog('error', t('Failed to notify weblogs.com (site).'));
}
unset($client);
@@ -76,7 +76,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "weblogs.com" (RSS)'));
+ watchdog('error', t('Failed to notify weblogs.com (RSS).'));
}
unset($client);
@@ -88,7 +88,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "blo.gs"'));
+ watchdog('error', t('Failed to notify blo.gs.'));
}
unset($client);
@@ -100,7 +100,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "technorati.com"'));
+ watchdog('error', t('Failed to notify technorati.com.'));
}
}
?>
diff --git a/modules/ping/ping.module b/modules/ping/ping.module
index 96a6d576d..ed0538def 100644
--- a/modules/ping/ping.module
+++ b/modules/ping/ping.module
@@ -64,7 +64,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "weblogs.com" (site)'));
+ watchdog('error', t('Failed to notify weblogs.com (site).'));
}
unset($client);
@@ -76,7 +76,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "weblogs.com" (RSS)'));
+ watchdog('error', t('Failed to notify weblogs.com (RSS).'));
}
unset($client);
@@ -88,7 +88,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "blo.gs"'));
+ watchdog('error', t('Failed to notify blo.gs.'));
}
unset($client);
@@ -100,7 +100,7 @@ function ping_ping($name = '', $url = '') {
$result = $client->send($message);
if (!$result || $result->faultCode()) {
- watchdog('error', t('failed to notify "technorati.com"'));
+ watchdog('error', t('Failed to notify technorati.com.'));
}
}
?>
diff --git a/modules/poll.module b/modules/poll.module
index fb364b309..bb0f2df79 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -94,12 +94,12 @@ function poll_validate(&$node) {
}
if ($choice['chvotes'] < 0) {
- form_set_error("choice][$i][chvotes", t("Negative values are not allowed."));
+ form_set_error("choice][$i][chvotes", t('Negative values are not allowed.'));
}
}
if ($realchoices < 2) {
- form_set_error("choice][$realchoices][chtext", t("You must fill in at least two choices."));
+ form_set_error("choice][$realchoices][chtext", t('You must fill in at least two choices.'));
}
}
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index fb364b309..bb0f2df79 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -94,12 +94,12 @@ function poll_validate(&$node) {
}
if ($choice['chvotes'] < 0) {
- form_set_error("choice][$i][chvotes", t("Negative values are not allowed."));
+ form_set_error("choice][$i][chvotes", t('Negative values are not allowed.'));
}
}
if ($realchoices < 2) {
- form_set_error("choice][$realchoices][chtext", t("You must fill in at least two choices."));
+ form_set_error("choice][$realchoices][chtext", t('You must fill in at least two choices.'));
}
}
diff --git a/modules/profile.module b/modules/profile.module
index 802daca6c..73f5ef8a2 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -327,12 +327,12 @@ function profile_validate_profile($edit, $category) {
if ($edit[$field->name]) {
if ($field->type == 'url') {
if (!valid_url($edit[$field->name], true)) {
- form_set_error($field->name, t('The value provided for "%field" is not a valid URL.', array('%field' => $field->title)));
+ form_set_error($field->name, t('The value provided for %field is not a valid URL.', array('%field' => "<em>$field->title</em>")));
}
}
}
else if ($field->required && !user_access('administer users')) {
- form_set_error($field->name, t('The field "%field" is required.', array('%field' => $field->title)));
+ form_set_error($field->name, t('The field %field is required.', array('%field' => "<em>$field->title</em>")));
}
}
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 802daca6c..73f5ef8a2 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -327,12 +327,12 @@ function profile_validate_profile($edit, $category) {
if ($edit[$field->name]) {
if ($field->type == 'url') {
if (!valid_url($edit[$field->name], true)) {
- form_set_error($field->name, t('The value provided for "%field" is not a valid URL.', array('%field' => $field->title)));
+ form_set_error($field->name, t('The value provided for %field is not a valid URL.', array('%field' => "<em>$field->title</em>")));
}
}
}
else if ($field->required && !user_access('administer users')) {
- form_set_error($field->name, t('The field "%field" is required.', array('%field' => $field->title)));
+ form_set_error($field->name, t('The field %field is required.', array('%field' => "<em>$field->title</em>")));
}
}
diff --git a/modules/queue.module b/modules/queue.module
index 3d395ad27..658827ca3 100644
--- a/modules/queue.module
+++ b/modules/queue.module
@@ -73,34 +73,34 @@ function queue_vote($node, $vote) {
$node->moderate = 0;
$node->promote = 1;
node_save($node);
- watchdog('special', t('moderation: approved "%node-title"', array('%node-title' => $node->title)));
+ watchdog('special', t('Moderation: approved %title.', array('%title' => "<em>$node->title</em>")));
drupal_set_message(t('The post is promoted.'));
}
else if (variable_get('queue_threshold_dump', -2) >= $node->score) {
if ($node->revisions) {
node_revision_rollback($node, end(node_revision_list($node)));
- watchdog('special', t('moderation: declined "%node-title" (rollback)', array('%node-title' => $node->title)));
+ watchdog('special', t('Moderation: declined %title (rollback).', array('%title' => "<em>$node->title</em>")));
drupal_set_message(t('The post has been declined and the previous version has been restored.'));
}
else {
$node->moderate = 0;
$node->status = 0;
node_save($node);
- watchdog('special', t('moderation: declined "%node-title"', array('%node-title' => $node->title)));
+ watchdog('special', t('Moderation: declined %title.', array('%title' => "<em>$node->title</em>")));
drupal_set_message(t('The post has been declined.'));
}
}
else if (variable_get('queue_threshold_expire', 8) <= $node->votes) {
if ($node->revisions) {
node_revision_rollback($node, end(node_revision_list($node)));
- watchdog('special', t('moderation: expired "%node-title" (rollback)', array('%node-title' => $node->title)));
+ watchdog('special', t('Moderation: expired %title (rollback).', array('%title' => "<em>$node->title</em>")));
drupal_set_message(t('The post has expired and the previous version has been restored.'));
}
else {
$node->moderate = 0;
$node->status = 0;
node_save($node);
- watchdog('special', t('moderation: expired "%node-title"', array('%node-title' => $node->title)));
+ watchdog('special', t('Moderation: expired %title.', array('%title' => "<em>$node->title</em>")));
drupal_set_message(t('The post has expired.'));
}
}
diff --git a/modules/search.module b/modules/search.module
index ef71e9493..68262ff63 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -367,7 +367,7 @@ function search_view() {
// Only perform search if there is non-whitespace search term:
if (trim($keys)) {
// Log the search keys:
- watchdog('search', t('search: "%keys"', array('%keys' => $keys)), l('view results', 'search', NULL, 'keys='. urlencode($keys)));
+ watchdog('search', t('Search: %keys.', array('%keys' => "<em>$keys</em>")), l(t('view results'), 'search', NULL, 'keys='. urlencode($keys)));
// Collect the search results:
$results = search_data($keys);
diff --git a/modules/search/search.module b/modules/search/search.module
index ef71e9493..68262ff63 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -367,7 +367,7 @@ function search_view() {
// Only perform search if there is non-whitespace search term:
if (trim($keys)) {
// Log the search keys:
- watchdog('search', t('search: "%keys"', array('%keys' => $keys)), l('view results', 'search', NULL, 'keys='. urlencode($keys)));
+ watchdog('search', t('Search: %keys.', array('%keys' => "<em>$keys</em>")), l(t('view results'), 'search', NULL, 'keys='. urlencode($keys)));
// Collect the search results:
$results = search_data($keys);
diff --git a/modules/story.module b/modules/story.module
index a29e2efc8..8000ed6c2 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -99,7 +99,7 @@ function story_menu() {
*/
function story_validate(&$node) {
if (isset($node->body) && count(explode(' ', $node->body)) < variable_get('minimum_story_size', 0)) {
- form_set_error('body', t('The body of your story is too short. You need at least %word_count words to submit your story.', array('%word_count' => variable_get('minimum_story_size', 0))));
+ form_set_error('body', t('The body of your story is too short. You need at least %words words to submit your story.', array('%words' => variable_get('minimum_story_size', 0))));
}
}
diff --git a/modules/story/story.module b/modules/story/story.module
index a29e2efc8..8000ed6c2 100644
--- a/modules/story/story.module
+++ b/modules/story/story.module
@@ -99,7 +99,7 @@ function story_menu() {
*/
function story_validate(&$node) {
if (isset($node->body) && count(explode(' ', $node->body)) < variable_get('minimum_story_size', 0)) {
- form_set_error('body', t('The body of your story is too short. You need at least %word_count words to submit your story.', array('%word_count' => variable_get('minimum_story_size', 0))));
+ form_set_error('body', t('The body of your story is too short. You need at least %words words to submit your story.', array('%words' => variable_get('minimum_story_size', 0))));
}
}
diff --git a/modules/taxonomy.module b/modules/taxonomy.module
index 1e7e61f4f..546ca6e4e 100644
--- a/modules/taxonomy.module
+++ b/modules/taxonomy.module
@@ -117,7 +117,7 @@ function taxonomy_save_vocabulary($edit) {
if ($edit['vid'] && $edit['name']) {
db_query('UPDATE {vocabulary} SET '. _taxonomy_prepare_update($data) .' WHERE vid = %d', $edit['vid']);
module_invoke_all('taxonomy', 'update', 'vocabulary', $edit);
- $message = t('Updated vocabulary "%name".', array('%name' => $edit['name']));
+ $message = t('Updated vocabulary %name.', array('%name' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['vid']) {
$message = taxonomy_del_vocabulary($edit['vid']);
@@ -126,7 +126,7 @@ function taxonomy_save_vocabulary($edit) {
$data['vid'] = $edit['vid'] = db_next_id('{vocabulary}_vid');
db_query('INSERT INTO {vocabulary} '. _taxonomy_prepare_insert($data, 1) .' VALUES '. _taxonomy_prepare_insert($data, 2));
module_invoke_all('taxonomy', 'insert', 'vocabulary', $edit);
- $message = t('Created new vocabulary "%name".', array('%name' => $edit['name']));
+ $message = t('Created new vocabulary %name.', array('%name' => '<em>'. $edit['name'] .'</em>'));
}
cache_clear_all();
@@ -212,7 +212,7 @@ function taxonomy_save_term($edit) {
db_query('UPDATE {term_data} SET '. _taxonomy_prepare_update($data) .' WHERE tid = %d', $edit['tid']);
module_invoke_all('taxonomy', 'update', 'term', $edit);
- $message = t('The term "%a" has been updated.', array('%a' => $edit['name']));
+ $message = t('The term %term has been updated.', array('%term' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['tid']) {
return taxonomy_del_term($edit['tid']);
@@ -222,7 +222,7 @@ function taxonomy_save_term($edit) {
$data = array('tid' => $edit['tid'], 'name' => $edit['name'], 'description' => $edit['description'], 'vid' => $edit['vid'], 'weight' => $edit['weight']);
db_query('INSERT INTO {term_data} '. _taxonomy_prepare_insert($data, 1) .' VALUES '. _taxonomy_prepare_insert($data, 2));
module_invoke_all('taxonomy', 'insert', 'term', $edit);
- $message = t('Created new term "%name".', array('%name' => $edit['name']));
+ $message = t('Created new term %term.', array('%term' => '<em>'. $edit['name'] .'</em>'));
}
db_query('DELETE FROM {term_relation} WHERE tid1 = %d OR tid2 = %d', $edit['tid'], $edit['tid']);
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 1e7e61f4f..546ca6e4e 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -117,7 +117,7 @@ function taxonomy_save_vocabulary($edit) {
if ($edit['vid'] && $edit['name']) {
db_query('UPDATE {vocabulary} SET '. _taxonomy_prepare_update($data) .' WHERE vid = %d', $edit['vid']);
module_invoke_all('taxonomy', 'update', 'vocabulary', $edit);
- $message = t('Updated vocabulary "%name".', array('%name' => $edit['name']));
+ $message = t('Updated vocabulary %name.', array('%name' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['vid']) {
$message = taxonomy_del_vocabulary($edit['vid']);
@@ -126,7 +126,7 @@ function taxonomy_save_vocabulary($edit) {
$data['vid'] = $edit['vid'] = db_next_id('{vocabulary}_vid');
db_query('INSERT INTO {vocabulary} '. _taxonomy_prepare_insert($data, 1) .' VALUES '. _taxonomy_prepare_insert($data, 2));
module_invoke_all('taxonomy', 'insert', 'vocabulary', $edit);
- $message = t('Created new vocabulary "%name".', array('%name' => $edit['name']));
+ $message = t('Created new vocabulary %name.', array('%name' => '<em>'. $edit['name'] .'</em>'));
}
cache_clear_all();
@@ -212,7 +212,7 @@ function taxonomy_save_term($edit) {
db_query('UPDATE {term_data} SET '. _taxonomy_prepare_update($data) .' WHERE tid = %d', $edit['tid']);
module_invoke_all('taxonomy', 'update', 'term', $edit);
- $message = t('The term "%a" has been updated.', array('%a' => $edit['name']));
+ $message = t('The term %term has been updated.', array('%term' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['tid']) {
return taxonomy_del_term($edit['tid']);
@@ -222,7 +222,7 @@ function taxonomy_save_term($edit) {
$data = array('tid' => $edit['tid'], 'name' => $edit['name'], 'description' => $edit['description'], 'vid' => $edit['vid'], 'weight' => $edit['weight']);
db_query('INSERT INTO {term_data} '. _taxonomy_prepare_insert($data, 1) .' VALUES '. _taxonomy_prepare_insert($data, 2));
module_invoke_all('taxonomy', 'insert', 'term', $edit);
- $message = t('Created new term "%name".', array('%name' => $edit['name']));
+ $message = t('Created new term %term.', array('%term' => '<em>'. $edit['name'] .'</em>'));
}
db_query('DELETE FROM {term_relation} WHERE tid1 = %d OR tid2 = %d', $edit['tid'], $edit['tid']);
diff --git a/modules/throttle.module b/modules/throttle.module
index 90424a0ad..c093857d9 100644
--- a/modules/throttle.module
+++ b/modules/throttle.module
@@ -175,11 +175,11 @@ function _throttle_update($hits) {
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog($type, t('throttle: %hits hits in past minute; throttle decreased to level %level', array('%hits' => $hits, '%level' => ($throttle - 1))));
+ watchdog($type, t('Throttle: %hits hits in past minute; throttle decreased to level %level.', array('%hits' => "<em>$hits</em>", '%level' => '<em>'. ($throttle - 1) .'</em>')));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog($type, t('throttle: %hits hits in past minute; throttle increased to level %level', array('%hits' => $hits, '%level' => ($throttle + 1))));
+ watchdog($type, t('Throttle: %hits hits in past minute; throttle increased to level %level.', array('%hits' => "<em>$hits</em>", '%level' => '<em>'. ($throttle + 1) .'</em>')));
}
}
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index 90424a0ad..c093857d9 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -175,11 +175,11 @@ function _throttle_update($hits) {
// log the change
if ($throttle_new < $throttle) {
variable_set('throttle_level', $throttle - 1);
- watchdog($type, t('throttle: %hits hits in past minute; throttle decreased to level %level', array('%hits' => $hits, '%level' => ($throttle - 1))));
+ watchdog($type, t('Throttle: %hits hits in past minute; throttle decreased to level %level.', array('%hits' => "<em>$hits</em>", '%level' => '<em>'. ($throttle - 1) .'</em>')));
}
if ($throttle_new > $throttle) {
variable_set('throttle_level', $throttle + 1);
- watchdog($type, t('throttle: %hits hits in past minute; throttle increased to level %level', array('%hits' => $hits, '%level' => ($throttle + 1))));
+ watchdog($type, t('Throttle: %hits hits in past minute; throttle increased to level %level.', array('%hits' => "<em>$hits</em>", '%level' => '<em>'. ($throttle + 1) .'</em>')));
}
}
diff --git a/modules/user.module b/modules/user.module
index ee8d41512..7b6b858a6 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -190,16 +190,16 @@ function user_validate_picture($file, &$edit, $user) {
form_set_error('picture', t('The uploaded file was not an image.'));
}
else if ($file->size > (variable_get('user_picture_file_size', '30') * 1000)) {
- form_set_error('picture', t('The uploaded image is too large; the maximum file size is %a kB.', array('%a' => variable_get('user_picture_file_size', '30'))));
+ form_set_error('picture', t('The uploaded image is too large; the maximum file size is %size kB.', array('%size' => variable_get('user_picture_file_size', '30'))));
}
else if ($size[0] > $maxwidth || $size[1] > $maxheight) {
- form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %a pixels.', array('%a' => variable_get('user_picture_dimensions', '85x85'))));
+ form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'))));
}
else if ($file = file_save_upload('picture', variable_get('user_picture_path', 'pictures') . FILE_SEPARATOR .'picture-'. $user->uid . $extension, 1)) {
$edit['picture'] = $file->path;
}
else {
- form_set_error('picture', t('Failed to upload the picture image; the "%directory" directory doesn\'t exist.', array('%directory' => variable_get('user_picture_path', 'pictures'))));
+ form_set_error('picture', t("Failed to upload the picture image; the %directory directory doesn't exist.", array('%directory' => '<em>'. variable_get('user_picture_path', 'pictures') .'</em>')));
}
}
@@ -723,7 +723,7 @@ function user_login($edit = array(), $msg = '') {
}
if (user_deny('user', $edit['name'])) {
- $error = t('The name "%s" has been denied access.', array('%s' => $edit['name']));
+ $error = t('The name %s has been denied access.', array('%s' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['name'] && $edit['pass']) {
@@ -732,7 +732,7 @@ function user_login($edit = array(), $msg = '') {
}
if ($user->uid) {
- watchdog('user', t('session opened for "%user".', array('%user' => $user->name)));
+ watchdog('user', t('Session opened for %name.', array('%name' => "<em>$user->name</em>")));
// Update the user table timestamp noting user has logged in.
db_query("UPDATE {users} SET changed = '%d' WHERE uid = '%s'", time(), $user->uid);
@@ -751,7 +751,7 @@ function user_login($edit = array(), $msg = '') {
if (!$error) {
$error = t('Sorry. Unrecognized username or password.') .' '. l(t('Have you forgotten your password?'), 'user/password');
}
- watchdog('user', t('login attempt failed for %user: "%error"', array('%user' => $server ? ($name .'@'. $server) : $name, '%error' => $error)));
+ watchdog('user', t('Login attempt failed for %name: %error.', array('%user' => '<em>'. $server ? ($name .'@'. $server) : $name .'</em>', '%error' => "<em>$error</em>")));
}
}
@@ -807,7 +807,7 @@ function user_authenticate($name, $pass) {
if (!$user->uid && $server && $result = user_get_authmaps("$name@$server")) {
if (module_invoke(key($result), 'auth', $name, $pass, $server)) {
$user = user_external_load("$name@$server");
- watchdog('user', t('external load by %user using module "%module".', array('%user' => $name .'@'. $server, '%module' => key($result))));
+ watchdog('user', t('External load by %user using module %module.', array('%user' => "<em>$name@$server</em>", '%module' => '<em>'. key($result) .'</em>')));
}
else {
$error = t('Invalid password for %s.', array('%s' => "<em>$name@$server</em>"));
@@ -825,7 +825,7 @@ function user_authenticate($name, $pass) {
if (!$account->uid) { // Register this new user.
print "gonna register using $module and $name";
$user = user_save('', array('name' => "$name@$server", 'pass' => user_password(), 'init' => "$name@$server", 'status' => 1, "authname_$module" => "$name@$server", 'roles' => array(_user_authenticated_id())));
- watchdog('user', t('new external user: %user using module "%module".', array('%user' => $name .'@'. $server, '%module' => $module)), l(t('edit'), 'user/'. $user->uid .'/edit'));
+ watchdog('user', t('New external user: %user using module %module.', array('%user' => "<em>$name@$server</em>", '%module' => "<em>$module</em>")), l(t('edit'), 'user/'. $user->uid .'/edit'));
break;
}
}
@@ -847,7 +847,7 @@ function user_logout() {
global $user;
if ($user->uid) {
- watchdog('user', t('session closed for "%user".', array('%user' => $user->name)));
+ watchdog('user', t('Session closed for %name.', array('%name' => "<em>$user->name</em>")));
// Destroy the current session:
session_destroy();
@@ -863,11 +863,11 @@ function user_pass($edit = array()) {
if ($edit['name']) {
$account = user_load(array('name' => $edit['name'], 'status' => 1));
- if (!$account) form_set_error('name', t('Sorry. The username "<em>%s</em>" is not recognized.', array('%s' => $edit['name'])));
+ if (!$account) form_set_error('name', t('Sorry. The username %name is not recognized.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
else if ($edit['mail']) {
$account = user_load(array('mail' => $edit['mail'], 'status' => 1));
- if (!$account) form_set_error('name', t('Sorry. The e-mail address "<em>%s</em>" is not recognized.', array('%s' => $edit['mail'])));
+ if (!$account) form_set_error('name', t('Sorry. The e-mail address %e-mail is not recognized.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
if ($account) {
@@ -885,11 +885,11 @@ function user_pass($edit = array()) {
$mail_success = user_mail($account->mail, $subject, $body, $headers);
if ($mail_success) {
- watchdog('user', t('password mailed to %user at %address.', array('%user' => $account->name, '%address' => $account->mail)));
+ watchdog('user', t('Password mailed to %name at %e-mail.', array('%name' => "<em>$account->name</em>" , '%e-mail' => "<em>$account->mail</em>")));
return t('Your password and further instructions have been sent to your e-mail address.');
}
else {
- watchdog('error', t('error mailing password to %user at %address.', array('%user' => $account->name, '%address' => $account->mail)));
+ watchdog('error', t('Error mailing password to %name at %e-mail.', array('%name' => "<em>$account->name</em>", '%e-mail' => "<em>$account->mail</em>")));
return t('Unable to send mail. Please contact the site admin.');
}
}
@@ -928,7 +928,7 @@ function user_register($edit = array()) {
// TODO: Is this necessary? Won't session_write() replicate this?
unset($edit['session']);
$account = user_save('', array('name' => $edit['name'], 'pass' => $pass, 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => (variable_get('user_register', 1) == 1 ? 1 : 0)));
- watchdog('user', t('new user: "%user" &lt;%address&gt;.', array('%user' => $edit['name'], '%address' => $edit['mail'])), l(t('edit'), 'user/'. $account->uid .'/edit'));
+ watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em>&lt;'. $edit['mail'] .'&gt;</em>')), l(t('edit'), 'user/'. $account->uid .'/edit'));
$variables = array('%username' => $edit['name'], '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen('http://')), '%mailto' => $edit['mail'], '%date' => format_date(time()), '%login_uri' => url('user/login', NULL, NULL, TRUE), '%edit_uri' => url('user/edit', NULL, NULL, TRUE));
@@ -1014,10 +1014,10 @@ function user_edit_validate($uid, &$edit) {
form_set_error('name', $error);
}
else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
- form_set_error('name', t('The name "%s" is already taken.', array('%s' => $edit['name'])));
+ form_set_error('name', t('The name %name is already taken.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
else if (user_deny('user', $edit['name'])) {
- form_set_error('name', t('The name "%s" has been denied access.', array('%s' => $edit['name'])));
+ form_set_error('name', t('The name %name has been denied access.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
// Validate the e-mail address:
@@ -1025,10 +1025,10 @@ function user_edit_validate($uid, &$edit) {
form_set_error('mail', $error);
}
else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
- form_set_error('mail', t('The e-mail address "%s" is already taken.', array('%s' => $edit['mail'])));
+ form_set_error('mail', t('The e-mail address %e-mail is already taken.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
else if (user_deny('mail', $edit['mail'])) {
- form_set_error('mail', t('The e-mail address "%s" has been denied access.', array('%s' => $edit['mail'])));
+ form_set_error('mail', t('The e-mail address %e-mail has been denied access.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
// If required, validate the uploaded picture.
@@ -1063,7 +1063,7 @@ function user_edit($category = 'account') {
if (!form_get_errors()) {
// Validate input to ensure that non-privileged users can't alter protected data.
if (!user_access('administer users') && array_intersect(array_keys($edit), array('uid', 'roles', 'init', 'session'))) {
- watchdog('warning', t('detected malicious attempt to alter a protected database field.'));
+ watchdog('warning', t('Detected malicious attempt to alter a protected database field.'));
}
else {
user_save($account, $edit, $category);
@@ -1249,7 +1249,7 @@ function user_admin_create($edit = array()) {
user_module_invoke('validate', $edit, $edit, 'account');
if (!form_get_errors()) {
- watchdog('user', t('new user: "%user" &lt;%address&gt;.', array('%user' => $edit['name'], '%address' => $edit['mail'])));
+ watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em>&lt;'. $edit['mail'] .'&gt;</em>')));
user_save('', array('name' => $edit['name'], 'pass' => $edit['pass'], 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => 1));
@@ -1286,10 +1286,10 @@ function user_admin_access($edit = array()) {
}
else if ($op == t('Check')) {
if (user_deny($type, $edit['test'])) {
- drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => ucfirst($edit['test']))));
+ drupal_set_message(t('%test is not allowed.', array('%test' => '<em>' .$edit['test'] .'</em>')));
}
else {
- drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => ucfirst($edit['test']))));
+ drupal_set_message(t('%test is allowed.', array('%test' => '<em>'. $edit['test'] .'</em>')));
}
}
else if ($id) {
diff --git a/modules/user/user.module b/modules/user/user.module
index ee8d41512..7b6b858a6 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -190,16 +190,16 @@ function user_validate_picture($file, &$edit, $user) {
form_set_error('picture', t('The uploaded file was not an image.'));
}
else if ($file->size > (variable_get('user_picture_file_size', '30') * 1000)) {
- form_set_error('picture', t('The uploaded image is too large; the maximum file size is %a kB.', array('%a' => variable_get('user_picture_file_size', '30'))));
+ form_set_error('picture', t('The uploaded image is too large; the maximum file size is %size kB.', array('%size' => variable_get('user_picture_file_size', '30'))));
}
else if ($size[0] > $maxwidth || $size[1] > $maxheight) {
- form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %a pixels.', array('%a' => variable_get('user_picture_dimensions', '85x85'))));
+ form_set_error('picture', t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'))));
}
else if ($file = file_save_upload('picture', variable_get('user_picture_path', 'pictures') . FILE_SEPARATOR .'picture-'. $user->uid . $extension, 1)) {
$edit['picture'] = $file->path;
}
else {
- form_set_error('picture', t('Failed to upload the picture image; the "%directory" directory doesn\'t exist.', array('%directory' => variable_get('user_picture_path', 'pictures'))));
+ form_set_error('picture', t("Failed to upload the picture image; the %directory directory doesn't exist.", array('%directory' => '<em>'. variable_get('user_picture_path', 'pictures') .'</em>')));
}
}
@@ -723,7 +723,7 @@ function user_login($edit = array(), $msg = '') {
}
if (user_deny('user', $edit['name'])) {
- $error = t('The name "%s" has been denied access.', array('%s' => $edit['name']));
+ $error = t('The name %s has been denied access.', array('%s' => '<em>'. $edit['name'] .'</em>'));
}
else if ($edit['name'] && $edit['pass']) {
@@ -732,7 +732,7 @@ function user_login($edit = array(), $msg = '') {
}
if ($user->uid) {
- watchdog('user', t('session opened for "%user".', array('%user' => $user->name)));
+ watchdog('user', t('Session opened for %name.', array('%name' => "<em>$user->name</em>")));
// Update the user table timestamp noting user has logged in.
db_query("UPDATE {users} SET changed = '%d' WHERE uid = '%s'", time(), $user->uid);
@@ -751,7 +751,7 @@ function user_login($edit = array(), $msg = '') {
if (!$error) {
$error = t('Sorry. Unrecognized username or password.') .' '. l(t('Have you forgotten your password?'), 'user/password');
}
- watchdog('user', t('login attempt failed for %user: "%error"', array('%user' => $server ? ($name .'@'. $server) : $name, '%error' => $error)));
+ watchdog('user', t('Login attempt failed for %name: %error.', array('%user' => '<em>'. $server ? ($name .'@'. $server) : $name .'</em>', '%error' => "<em>$error</em>")));
}
}
@@ -807,7 +807,7 @@ function user_authenticate($name, $pass) {
if (!$user->uid && $server && $result = user_get_authmaps("$name@$server")) {
if (module_invoke(key($result), 'auth', $name, $pass, $server)) {
$user = user_external_load("$name@$server");
- watchdog('user', t('external load by %user using module "%module".', array('%user' => $name .'@'. $server, '%module' => key($result))));
+ watchdog('user', t('External load by %user using module %module.', array('%user' => "<em>$name@$server</em>", '%module' => '<em>'. key($result) .'</em>')));
}
else {
$error = t('Invalid password for %s.', array('%s' => "<em>$name@$server</em>"));
@@ -825,7 +825,7 @@ function user_authenticate($name, $pass) {
if (!$account->uid) { // Register this new user.
print "gonna register using $module and $name";
$user = user_save('', array('name' => "$name@$server", 'pass' => user_password(), 'init' => "$name@$server", 'status' => 1, "authname_$module" => "$name@$server", 'roles' => array(_user_authenticated_id())));
- watchdog('user', t('new external user: %user using module "%module".', array('%user' => $name .'@'. $server, '%module' => $module)), l(t('edit'), 'user/'. $user->uid .'/edit'));
+ watchdog('user', t('New external user: %user using module %module.', array('%user' => "<em>$name@$server</em>", '%module' => "<em>$module</em>")), l(t('edit'), 'user/'. $user->uid .'/edit'));
break;
}
}
@@ -847,7 +847,7 @@ function user_logout() {
global $user;
if ($user->uid) {
- watchdog('user', t('session closed for "%user".', array('%user' => $user->name)));
+ watchdog('user', t('Session closed for %name.', array('%name' => "<em>$user->name</em>")));
// Destroy the current session:
session_destroy();
@@ -863,11 +863,11 @@ function user_pass($edit = array()) {
if ($edit['name']) {
$account = user_load(array('name' => $edit['name'], 'status' => 1));
- if (!$account) form_set_error('name', t('Sorry. The username "<em>%s</em>" is not recognized.', array('%s' => $edit['name'])));
+ if (!$account) form_set_error('name', t('Sorry. The username %name is not recognized.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
else if ($edit['mail']) {
$account = user_load(array('mail' => $edit['mail'], 'status' => 1));
- if (!$account) form_set_error('name', t('Sorry. The e-mail address "<em>%s</em>" is not recognized.', array('%s' => $edit['mail'])));
+ if (!$account) form_set_error('name', t('Sorry. The e-mail address %e-mail is not recognized.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
if ($account) {
@@ -885,11 +885,11 @@ function user_pass($edit = array()) {
$mail_success = user_mail($account->mail, $subject, $body, $headers);
if ($mail_success) {
- watchdog('user', t('password mailed to %user at %address.', array('%user' => $account->name, '%address' => $account->mail)));
+ watchdog('user', t('Password mailed to %name at %e-mail.', array('%name' => "<em>$account->name</em>" , '%e-mail' => "<em>$account->mail</em>")));
return t('Your password and further instructions have been sent to your e-mail address.');
}
else {
- watchdog('error', t('error mailing password to %user at %address.', array('%user' => $account->name, '%address' => $account->mail)));
+ watchdog('error', t('Error mailing password to %name at %e-mail.', array('%name' => "<em>$account->name</em>", '%e-mail' => "<em>$account->mail</em>")));
return t('Unable to send mail. Please contact the site admin.');
}
}
@@ -928,7 +928,7 @@ function user_register($edit = array()) {
// TODO: Is this necessary? Won't session_write() replicate this?
unset($edit['session']);
$account = user_save('', array('name' => $edit['name'], 'pass' => $pass, 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => (variable_get('user_register', 1) == 1 ? 1 : 0)));
- watchdog('user', t('new user: "%user" &lt;%address&gt;.', array('%user' => $edit['name'], '%address' => $edit['mail'])), l(t('edit'), 'user/'. $account->uid .'/edit'));
+ watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em>&lt;'. $edit['mail'] .'&gt;</em>')), l(t('edit'), 'user/'. $account->uid .'/edit'));
$variables = array('%username' => $edit['name'], '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen('http://')), '%mailto' => $edit['mail'], '%date' => format_date(time()), '%login_uri' => url('user/login', NULL, NULL, TRUE), '%edit_uri' => url('user/edit', NULL, NULL, TRUE));
@@ -1014,10 +1014,10 @@ function user_edit_validate($uid, &$edit) {
form_set_error('name', $error);
}
else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
- form_set_error('name', t('The name "%s" is already taken.', array('%s' => $edit['name'])));
+ form_set_error('name', t('The name %name is already taken.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
else if (user_deny('user', $edit['name'])) {
- form_set_error('name', t('The name "%s" has been denied access.', array('%s' => $edit['name'])));
+ form_set_error('name', t('The name %name has been denied access.', array('%name' => '<em>'. $edit['name'] .'</em>')));
}
// Validate the e-mail address:
@@ -1025,10 +1025,10 @@ function user_edit_validate($uid, &$edit) {
form_set_error('mail', $error);
}
else if (db_num_rows(db_query("SELECT uid FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
- form_set_error('mail', t('The e-mail address "%s" is already taken.', array('%s' => $edit['mail'])));
+ form_set_error('mail', t('The e-mail address %e-mail is already taken.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
else if (user_deny('mail', $edit['mail'])) {
- form_set_error('mail', t('The e-mail address "%s" has been denied access.', array('%s' => $edit['mail'])));
+ form_set_error('mail', t('The e-mail address %e-mail has been denied access.', array('%e-mail' => '<em>'. $edit['mail'] .'</em>')));
}
// If required, validate the uploaded picture.
@@ -1063,7 +1063,7 @@ function user_edit($category = 'account') {
if (!form_get_errors()) {
// Validate input to ensure that non-privileged users can't alter protected data.
if (!user_access('administer users') && array_intersect(array_keys($edit), array('uid', 'roles', 'init', 'session'))) {
- watchdog('warning', t('detected malicious attempt to alter a protected database field.'));
+ watchdog('warning', t('Detected malicious attempt to alter a protected database field.'));
}
else {
user_save($account, $edit, $category);
@@ -1249,7 +1249,7 @@ function user_admin_create($edit = array()) {
user_module_invoke('validate', $edit, $edit, 'account');
if (!form_get_errors()) {
- watchdog('user', t('new user: "%user" &lt;%address&gt;.', array('%user' => $edit['name'], '%address' => $edit['mail'])));
+ watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em>&lt;'. $edit['mail'] .'&gt;</em>')));
user_save('', array('name' => $edit['name'], 'pass' => $edit['pass'], 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => 1));
@@ -1286,10 +1286,10 @@ function user_admin_access($edit = array()) {
}
else if ($op == t('Check')) {
if (user_deny($type, $edit['test'])) {
- drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => ucfirst($edit['test']))));
+ drupal_set_message(t('%test is not allowed.', array('%test' => '<em>' .$edit['test'] .'</em>')));
}
else {
- drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => ucfirst($edit['test']))));
+ drupal_set_message(t('%test is allowed.', array('%test' => '<em>'. $edit['test'] .'</em>')));
}
}
else if ($id) {