diff options
Diffstat (limited to 'modules')
39 files changed, 175 insertions, 175 deletions
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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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 » 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" <%address>.', 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><'. $edit['mail'] .'></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" <%address>.', array('%user' => $edit['name'], '%address' => $edit['mail']))); + watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em><'. $edit['mail'] .'></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" <%address>.', 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><'. $edit['mail'] .'></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" <%address>.', array('%user' => $edit['name'], '%address' => $edit['mail']))); + watchdog('user', t('New user: %name %e-mail.', array('%name' => '<em>'. $edit['name'] .'</em>', '%e-mail' => '<em><'. $edit['mail'] .'></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) { |