From 2f33b939c5dc73364a0e2073ea9410516d66242f Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Mon, 16 Aug 2004 18:02:48 +0000 Subject: [PATCH] - Patch #9983 by Stefan: usability improvement: made sure all status messages start with a capital letter. --- includes/file.inc | 20 ++++++++++---------- includes/locale.inc | 4 ++-- modules/aggregator.module | 15 ++++++--------- modules/aggregator/aggregator.module | 15 ++++++--------- modules/block.module | 6 +++--- modules/block/block.module | 6 +++--- modules/book.module | 6 +++--- modules/book/book.module | 6 +++--- modules/comment.module | 24 ++++++++++++------------ modules/comment/comment.module | 24 ++++++++++++------------ modules/menu.module | 8 ++++---- modules/menu/menu.module | 8 ++++---- modules/node.module | 14 +++++++------- modules/node/node.module | 14 +++++++------- modules/path.module | 10 +++++----- modules/path/path.module | 10 +++++----- modules/poll.module | 6 +++--- modules/poll/poll.module | 6 +++--- modules/system.module | 10 +++++----- modules/system/system.module | 10 +++++----- modules/taxonomy.module | 8 ++++---- modules/taxonomy/taxonomy.module | 8 ++++---- modules/user.module | 22 +++++++++++----------- modules/user/user.module | 22 +++++++++++----------- 24 files changed, 138 insertions(+), 144 deletions(-) diff --git a/includes/file.inc b/includes/file.inc index f2f2a263d471..84b3c6ab9889 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -147,7 +147,7 @@ function file_copy(&$source, $dest = 0, $replace = 0) { // Make sure we at least have a valid directory. if ($basename === false) { - drupal_set_message(t('file copy failed: no directory configured, or it could not be accessed.'), 'error'); + drupal_set_message(t('File copy failed: no directory configured, or it could not be accessed.'), 'error'); return 0; } @@ -162,7 +162,7 @@ function file_copy(&$source, $dest = 0, $replace = 0) { $source = realpath($source); if (!file_exists($source)) { - drupal_set_message(t('file copy failed: source file does not exist.'), 'error'); + drupal_set_message(t('File copy failed: source file does not exist.'), 'error'); return 0; } @@ -190,7 +190,7 @@ function file_copy(&$source, $dest = 0, $replace = 0) { } if (!copy($source, $dest)) { - drupal_set_message(t('file copy failed.'), 'error'); + drupal_set_message(t('File copy failed.'), 'error'); return 0; } @@ -211,7 +211,7 @@ function file_move(&$source, $dest = 0, $replace = 0) { if (unlink($path)) { return 1; } - drupal_set_message(t('removing original file failed.'), 'error'); + drupal_set_message(t('Removing original file failed.'), 'error'); } return 0; } @@ -249,7 +249,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; } @@ -259,14 +259,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; } @@ -299,14 +299,14 @@ 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; } $temp = variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp')); $file = tempnam($temp, 'file'); if (!$fp = fopen($file, 'w')) { - drupal_set_message(t('unable to create file.'), 'error'); + drupal_set_message(t('Unable to create file.'), 'error'); return 0; } fwrite($fp, $data); diff --git a/includes/locale.inc b/includes/locale.inc index 19876577bb73..9f6c912f6433 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -866,7 +866,7 @@ function _locale_string_delete($lid) { db_query("DELETE FROM {locales_source} WHERE lid = %d", $lid); db_query("DELETE FROM {locales_target} WHERE lid = %d", $lid); locale_refresh_cache(); - drupal_set_message(t("deleted string")); + drupal_set_message(t("Deleted string")); } /** @@ -890,7 +890,7 @@ function _locale_string_save($lid) { // delete form data so it will remember where it came from $edit = ''; - drupal_set_message(t("saved string")); + drupal_set_message(t("Saved string")); } /** diff --git a/modules/aggregator.module b/modules/aggregator.module index dd83cda229a7..899fb33cd8a3 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -260,7 +260,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' => $feed['title']))); } /** @@ -340,7 +340,7 @@ 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' => $feed['title']))); break; case 301: $feed['url'] = $result->redirect_url; @@ -383,14 +383,12 @@ function aggregator_refresh($feed) { cache_clear_all(); watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title]))); - $message = t('syndicated content from "%site".', array('%site' => $feed['title'])); - drupal_set_message($message); + drupal_set_message(t('Syndicated content from "%site".', array('%site' => $feed['title'])); } break; default: watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error))); - $message = t('failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)); - drupal_set_message($message); + drupal_set_message(t('Failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error))); } } @@ -447,8 +445,7 @@ function aggregator_parse_feed(&$data, $feed) { 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)))); - $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))); - drupal_set_message($message, 'error'); + 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'); return 0; } xml_parser_free($xml_parser); @@ -539,7 +536,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' => $feed['title'])), '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 dd83cda229a7..899fb33cd8a3 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -260,7 +260,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' => $feed['title']))); } /** @@ -340,7 +340,7 @@ 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' => $feed['title']))); break; case 301: $feed['url'] = $result->redirect_url; @@ -383,14 +383,12 @@ function aggregator_refresh($feed) { cache_clear_all(); watchdog('regular', t('aggregator: syndicated content from "%site"', array('%site' => $feed[title]))); - $message = t('syndicated content from "%site".', array('%site' => $feed['title'])); - drupal_set_message($message); + drupal_set_message(t('Syndicated content from "%site".', array('%site' => $feed['title'])); } break; default: watchdog('error', t('aggregator: failed to parse RSS feed "%site": %error', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error))); - $message = t('failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error)); - drupal_set_message($message); + drupal_set_message(t('Failed to parse RSS feed "%site": %error.', array('%site' => $feed['title'], '%error' => $result->code .' '. $result->error))); } } @@ -447,8 +445,7 @@ function aggregator_parse_feed(&$data, $feed) { 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)))); - $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))); - drupal_set_message($message, 'error'); + 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'); return 0; } xml_parser_free($xml_parser); @@ -539,7 +536,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' => $feed['title'])), '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/block.module b/modules/block.module index 564f4225b706..2979a4b20b95 100644 --- a/modules/block.module +++ b/modules/block.module @@ -244,11 +244,11 @@ function block_box_save($edit) { if ($edit['bid']) { db_query("UPDATE {boxes} SET title = '%s', body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['title'], $edit['body'], $edit['info'], $edit['format'], $edit['bid']); - return t('the block has been updated.'); + return t('The block has been updated.'); } else { db_query("INSERT INTO {boxes} (title, body, info, format) VALUES ('%s', '%s', '%s', %d)", $edit['title'], $edit['body'], $edit['info'], $edit['format']); - return t('the new block has been added.'); + return t('The new block has been added.'); } } @@ -258,7 +258,7 @@ function block_box_save($edit) { function block_box_delete($bid = 0) { if ($bid) { db_query('DELETE FROM {boxes} WHERE bid = %d', $bid); - drupal_set_message(t('the block has been deleted.')); + drupal_set_message(t('The block has been deleted.')); cache_clear_all(); } print theme('page', block_admin_display()); diff --git a/modules/block/block.module b/modules/block/block.module index 564f4225b706..2979a4b20b95 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -244,11 +244,11 @@ function block_box_save($edit) { if ($edit['bid']) { db_query("UPDATE {boxes} SET title = '%s', body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['title'], $edit['body'], $edit['info'], $edit['format'], $edit['bid']); - return t('the block has been updated.'); + return t('The block has been updated.'); } else { db_query("INSERT INTO {boxes} (title, body, info, format) VALUES ('%s', '%s', '%s', %d)", $edit['title'], $edit['body'], $edit['info'], $edit['format']); - return t('the new block has been added.'); + return t('The new block has been added.'); } } @@ -258,7 +258,7 @@ function block_box_save($edit) { function block_box_delete($bid = 0) { if ($bid) { db_query('DELETE FROM {boxes} WHERE bid = %d', $bid); - drupal_set_message(t('the block has been deleted.')); + drupal_set_message(t('The block has been deleted.')); cache_clear_all(); } print theme('page', block_admin_display()); diff --git a/modules/book.module b/modules/book.module index 03b21edb52b1..a2ce00b51dda 100644 --- a/modules/book.module +++ b/modules/book.module @@ -240,17 +240,17 @@ function book_node_link($node = 0) { if ($op == t('Add to book outline')) { db_query('INSERT INTO {book} (nid, parent, weight) VALUES (%d, %d, %d)', $node->nid, $edit['parent'], $edit['weight']); - drupal_set_message(t('added the node to the book.')); + drupal_set_message(t('Added the node to the book.')); } if ($op == t('Update book outline')) { db_query('UPDATE {book} SET parent = %d, weight = %d WHERE nid = %d', $edit['parent'], $edit['weight'], $node->nid); - drupal_set_message(t('updated the book outline.')); + drupal_set_message(t('Updated the book outline.')); } if ($op == t('Remove from book outline')) { db_query('DELETE FROM {book} WHERE nid = %d', $node->nid); - drupal_set_message(t('removed the node form the book.')); + drupal_set_message(t('Removed the node form the book.')); } $output .= '<h3>'. t('Edit book outline for node "%booktitle"', array('%booktitle' => '<em>'. $node->title .'</em>')) .'</h3>'; diff --git a/modules/book/book.module b/modules/book/book.module index 03b21edb52b1..a2ce00b51dda 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -240,17 +240,17 @@ function book_node_link($node = 0) { if ($op == t('Add to book outline')) { db_query('INSERT INTO {book} (nid, parent, weight) VALUES (%d, %d, %d)', $node->nid, $edit['parent'], $edit['weight']); - drupal_set_message(t('added the node to the book.')); + drupal_set_message(t('Added the node to the book.')); } if ($op == t('Update book outline')) { db_query('UPDATE {book} SET parent = %d, weight = %d WHERE nid = %d', $edit['parent'], $edit['weight'], $node->nid); - drupal_set_message(t('updated the book outline.')); + drupal_set_message(t('Updated the book outline.')); } if ($op == t('Remove from book outline')) { db_query('DELETE FROM {book} WHERE nid = %d', $node->nid); - drupal_set_message(t('removed the node form the book.')); + drupal_set_message(t('Removed the node form the book.')); } $output .= '<h3>'. t('Edit book outline for node "%booktitle"', array('%booktitle' => '<em>'. $node->title .'</em>')) .'</h3>'; diff --git a/modules/comment.module b/modules/comment.module index 4b1b0a640331..2640394fa8ff 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -980,7 +980,7 @@ function comment_delete($cid) { // We'll only delete if the user has confirmed the // deletion using the form in our else clause below. if ($comment->cid && $_POST['op'] == t('Delete comment')) { - drupal_set_message(t('the comment and all its replies have been deleted.')); + drupal_set_message(t('The comment and all its replies have been deleted.')); // Delete comment and its replies. _comment_delete_thread($comment); @@ -992,13 +992,13 @@ function comment_delete($cid) { // Print a confirmation. else if ($comment->cid) { - drupal_set_message(t('do you want to delete this comment and all its replies?')); + drupal_set_message(t('Do you want to delete this comment and all its replies?')); $comment->comment = check_output($comment->comment, $comment->format); $output = theme('comment', $comment); $output .= form_submit(t('Delete comment')); } else { - drupal_set_message(t('the comment no longer exists.')); + drupal_set_message(t('The comment no longer exists.')); } print theme('page', form($output)); @@ -1007,7 +1007,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']))); - drupal_set_message(t('the comment has been saved.')); + drupal_set_message(t('The comment has been saved.')); } /** @@ -1060,7 +1060,7 @@ function comment_matrix_settings() { db_query('INSERT INTO {moderation_roles} (mid, rid, value) VALUES '. $sql); } } - drupal_set_message(t('the vote values have been saved.')); + drupal_set_message(t('The vote values have been saved.')); } $output .= '<h3>Moderation vote/value matrix</h3>'; @@ -1107,7 +1107,7 @@ function comment_role_settings() { if ($edit) { variable_set('comment_roles', $edit); - drupal_set_message(t('the comment scores have been saved.')); + drupal_set_message(t('The comment scores have been saved.')); } $start_values = variable_get('comment_roles', array()); @@ -1136,18 +1136,18 @@ function comment_vote_settings($mid = 0) { if ($op == t('Save vote')) { db_query("UPDATE {moderation_votes} SET vote = '%s', weight = %d WHERE mid = %d", $edit['vote'], $edit['weight'], $mid); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been saved.')); + drupal_set_message(t('The vote has been saved.')); } else if ($op == t('Delete vote')) { db_query('DELETE FROM {moderation_votes} WHERE mid = %d', $mid); db_query('DELETE FROM {moderation_roles} WHERE mid = %d', $mid); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been deleted.')); + drupal_set_message(t('The vote has been deleted.')); } else if ($op == t('Add new vote')) { db_query("INSERT INTO {moderation_votes} (vote, weight) VALUES ('%s', %d)", $edit['vote'], $edit['weight']); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been added.')); + drupal_set_message(t('The vote has been added.')); } $output .= '<h3>'. t('Moderation votes overview') .'</h3>'; @@ -1191,17 +1191,17 @@ function comment_threshold_settings($fid = 0) { if ($op == t('Save threshold')) { db_query("UPDATE {moderation_filters} SET filter = '%s', minimum = %d WHERE fid = %d", $edit['filter'], $edit['minimum'], $fid); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been saved.')); + drupal_set_message(t('The threshold has been saved.')); } else if ($op == t('Delete threshold')) { db_query('DELETE FROM {moderation_filters} WHERE fid = %d', $fid); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been deleted.')); + drupal_set_message(t('The threshold has been deleted.')); } else if ($op == t('Add new threshold')) { db_query("INSERT INTO {moderation_filters} (filter, minimum) VALUES ('%s', %d)", $edit['filter'], $edit['minimum']); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been added.')); + drupal_set_message(t('The threshold has been added.')); } $output .= '<h3>Comment threshold overview</h3>'; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 4b1b0a640331..2640394fa8ff 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -980,7 +980,7 @@ function comment_delete($cid) { // We'll only delete if the user has confirmed the // deletion using the form in our else clause below. if ($comment->cid && $_POST['op'] == t('Delete comment')) { - drupal_set_message(t('the comment and all its replies have been deleted.')); + drupal_set_message(t('The comment and all its replies have been deleted.')); // Delete comment and its replies. _comment_delete_thread($comment); @@ -992,13 +992,13 @@ function comment_delete($cid) { // Print a confirmation. else if ($comment->cid) { - drupal_set_message(t('do you want to delete this comment and all its replies?')); + drupal_set_message(t('Do you want to delete this comment and all its replies?')); $comment->comment = check_output($comment->comment, $comment->format); $output = theme('comment', $comment); $output .= form_submit(t('Delete comment')); } else { - drupal_set_message(t('the comment no longer exists.')); + drupal_set_message(t('The comment no longer exists.')); } print theme('page', form($output)); @@ -1007,7 +1007,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']))); - drupal_set_message(t('the comment has been saved.')); + drupal_set_message(t('The comment has been saved.')); } /** @@ -1060,7 +1060,7 @@ function comment_matrix_settings() { db_query('INSERT INTO {moderation_roles} (mid, rid, value) VALUES '. $sql); } } - drupal_set_message(t('the vote values have been saved.')); + drupal_set_message(t('The vote values have been saved.')); } $output .= '<h3>Moderation vote/value matrix</h3>'; @@ -1107,7 +1107,7 @@ function comment_role_settings() { if ($edit) { variable_set('comment_roles', $edit); - drupal_set_message(t('the comment scores have been saved.')); + drupal_set_message(t('The comment scores have been saved.')); } $start_values = variable_get('comment_roles', array()); @@ -1136,18 +1136,18 @@ function comment_vote_settings($mid = 0) { if ($op == t('Save vote')) { db_query("UPDATE {moderation_votes} SET vote = '%s', weight = %d WHERE mid = %d", $edit['vote'], $edit['weight'], $mid); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been saved.')); + drupal_set_message(t('The vote has been saved.')); } else if ($op == t('Delete vote')) { db_query('DELETE FROM {moderation_votes} WHERE mid = %d', $mid); db_query('DELETE FROM {moderation_roles} WHERE mid = %d', $mid); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been deleted.')); + drupal_set_message(t('The vote has been deleted.')); } else if ($op == t('Add new vote')) { db_query("INSERT INTO {moderation_votes} (vote, weight) VALUES ('%s', %d)", $edit['vote'], $edit['weight']); $mid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the vote has been added.')); + drupal_set_message(t('The vote has been added.')); } $output .= '<h3>'. t('Moderation votes overview') .'</h3>'; @@ -1191,17 +1191,17 @@ function comment_threshold_settings($fid = 0) { if ($op == t('Save threshold')) { db_query("UPDATE {moderation_filters} SET filter = '%s', minimum = %d WHERE fid = %d", $edit['filter'], $edit['minimum'], $fid); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been saved.')); + drupal_set_message(t('The threshold has been saved.')); } else if ($op == t('Delete threshold')) { db_query('DELETE FROM {moderation_filters} WHERE fid = %d', $fid); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been deleted.')); + drupal_set_message(t('The threshold has been deleted.')); } else if ($op == t('Add new threshold')) { db_query("INSERT INTO {moderation_filters} (filter, minimum) VALUES ('%s', %d)", $edit['filter'], $edit['minimum']); $fid = 0; // zero it out so we return to the overview. - drupal_set_message(t('the threshold has been added.')); + drupal_set_message(t('The threshold has been added.')); } $output .= '<h3>Comment threshold overview</h3>'; diff --git a/modules/menu.module b/modules/menu.module index c7354538a23c..260f087bed41 100644 --- a/modules/menu.module +++ b/modules/menu.module @@ -107,7 +107,7 @@ function menu_reset() { switch ($op) { case t('Reset'): db_query('DELETE FROM {menu}'); - drupal_set_message(t('all menu items reset.')); + drupal_set_message(t('All menu items reset.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -153,7 +153,7 @@ function menu_reset_item($mid) { switch ($op) { case t('Reset'): db_query('DELETE FROM {menu} WHERE mid = %d', $mid); - drupal_set_message(t('menu item reset.')); + drupal_set_message(t('Menu item reset.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -174,7 +174,7 @@ function menu_delete_item($mid) { switch ($op) { case t('Delete'): db_query('DELETE FROM {menu} WHERE mid = %d', $mid); - drupal_set_message(t('menu item deleted.')); + drupal_set_message(t('Menu item deleted.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -197,7 +197,7 @@ function menu_disable_item($mid) { $type &= ~MENU_VISIBLE_IN_BREADCRUMB; $type |= MENU_MODIFIED_BY_ADMIN; db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $mid); - drupal_set_message(t('menu item disabled.')); + drupal_set_message(t('Menu item disabled.')); drupal_goto('admin/menu'); } diff --git a/modules/menu/menu.module b/modules/menu/menu.module index c7354538a23c..260f087bed41 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -107,7 +107,7 @@ function menu_reset() { switch ($op) { case t('Reset'): db_query('DELETE FROM {menu}'); - drupal_set_message(t('all menu items reset.')); + drupal_set_message(t('All menu items reset.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -153,7 +153,7 @@ function menu_reset_item($mid) { switch ($op) { case t('Reset'): db_query('DELETE FROM {menu} WHERE mid = %d', $mid); - drupal_set_message(t('menu item reset.')); + drupal_set_message(t('Menu item reset.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -174,7 +174,7 @@ function menu_delete_item($mid) { switch ($op) { case t('Delete'): db_query('DELETE FROM {menu} WHERE mid = %d', $mid); - drupal_set_message(t('menu item deleted.')); + drupal_set_message(t('Menu item deleted.')); drupal_goto('admin/menu'); break; case t('Cancel'): @@ -197,7 +197,7 @@ function menu_disable_item($mid) { $type &= ~MENU_VISIBLE_IN_BREADCRUMB; $type |= MENU_MODIFIED_BY_ADMIN; db_query('UPDATE {menu} SET type = %d WHERE mid = %d', $type, $mid); - drupal_set_message(t('menu item disabled.')); + drupal_set_message(t('Menu item disabled.')); drupal_goto('admin/menu'); } diff --git a/modules/node.module b/modules/node.module index 6a1365ca89e3..b68c018009ed 100644 --- a/modules/node.module +++ b/modules/node.module @@ -737,7 +737,7 @@ function node_admin_nodes() { } } - drupal_set_message(t('the update has been performed.')); + drupal_set_message(t('The update has been performed.')); } $filter = $_SESSION['node_overview_filter']; @@ -799,7 +799,7 @@ function node_default_settings() { foreach ($edit as $name => $value) { variable_set($name, $value); } - drupal_set_message(t('the content settings have been saved.')); + drupal_set_message(t('The content settings have been saved.')); } if ($op == t('Reset to defaults')) { @@ -807,7 +807,7 @@ function node_default_settings() { foreach ($edit as $name => $value) { variable_del($name); } - drupal_set_message(t('the content settings have been reset to their default values.')); + drupal_set_message(t('The content settings have been reset to their default values.')); } $header = array_merge(array(t('type')), array_keys(node_invoke_nodeapi($node, 'settings'))); @@ -904,7 +904,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' => $revision, '%title' => $node->title))); drupal_goto('node/'. $nid .'/revisions'); } } @@ -920,7 +920,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' => $revision, '%title' => $node->title))); drupal_goto('node/'. $nid . (count($node->revisions) ? '/revisions' : '')); } } @@ -1349,7 +1349,7 @@ function node_submit($node) { 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'))); + $msg = t('The %name was updated.', array ('%name' => node_invoke($node, 'node_name'))); } } else { @@ -1358,7 +1358,7 @@ function node_submit($node) { 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'))); + $msg = t('Your %name was created.', array ('%name' => node_invoke($node, 'node_name'))); } } diff --git a/modules/node/node.module b/modules/node/node.module index 6a1365ca89e3..b68c018009ed 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -737,7 +737,7 @@ function node_admin_nodes() { } } - drupal_set_message(t('the update has been performed.')); + drupal_set_message(t('The update has been performed.')); } $filter = $_SESSION['node_overview_filter']; @@ -799,7 +799,7 @@ function node_default_settings() { foreach ($edit as $name => $value) { variable_set($name, $value); } - drupal_set_message(t('the content settings have been saved.')); + drupal_set_message(t('The content settings have been saved.')); } if ($op == t('Reset to defaults')) { @@ -807,7 +807,7 @@ function node_default_settings() { foreach ($edit as $name => $value) { variable_del($name); } - drupal_set_message(t('the content settings have been reset to their default values.')); + drupal_set_message(t('The content settings have been reset to their default values.')); } $header = array_merge(array(t('type')), array_keys(node_invoke_nodeapi($node, 'settings'))); @@ -904,7 +904,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' => $revision, '%title' => $node->title))); drupal_goto('node/'. $nid .'/revisions'); } } @@ -920,7 +920,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' => $revision, '%title' => $node->title))); drupal_goto('node/'. $nid . (count($node->revisions) ? '/revisions' : '')); } } @@ -1349,7 +1349,7 @@ function node_submit($node) { 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'))); + $msg = t('The %name was updated.', array ('%name' => node_invoke($node, 'node_name'))); } } else { @@ -1358,7 +1358,7 @@ function node_submit($node) { 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'))); + $msg = t('Your %name was created.', array ('%name' => node_invoke($node, 'node_name'))); } } diff --git a/modules/path.module b/modules/path.module index 4ce7b05143db..b5699f21f74e 100644 --- a/modules/path.module +++ b/modules/path.module @@ -113,7 +113,7 @@ function path_admin_edit($pid = 0) { */ function path_admin_delete($pid = 0) { db_query('DELETE FROM {url_alias} WHERE pid = %d', $pid); - drupal_set_message(t('the alias has been deleted.')); + drupal_set_message(t('The alias has been deleted.')); drupal_goto('admin/path'); } @@ -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 "%src" is invalid.', array('%src' => $src))); } if (!valid_url($dst)) { - form_set_error('dst', t('the alias "%dst" is invalid.', array('%dst' => $dst))); + form_set_error('dst', t('The alias "%dst" is invalid.', array('%dst' => $dst))); } 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 "%dst" is already in use.', array('%dst' => $dst))); } if (form_get_errors()) { @@ -307,7 +307,7 @@ function path_save($edit) { else { path_set_alias($src, $dst, $pid); - drupal_set_message(t('the alias has been saved.')); + drupal_set_message(t('The alias has been saved.')); drupal_goto('admin/path'); } } diff --git a/modules/path/path.module b/modules/path/path.module index 4ce7b05143db..b5699f21f74e 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -113,7 +113,7 @@ function path_admin_edit($pid = 0) { */ function path_admin_delete($pid = 0) { db_query('DELETE FROM {url_alias} WHERE pid = %d', $pid); - drupal_set_message(t('the alias has been deleted.')); + drupal_set_message(t('The alias has been deleted.')); drupal_goto('admin/path'); } @@ -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 "%src" is invalid.', array('%src' => $src))); } if (!valid_url($dst)) { - form_set_error('dst', t('the alias "%dst" is invalid.', array('%dst' => $dst))); + form_set_error('dst', t('The alias "%dst" is invalid.', array('%dst' => $dst))); } 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 "%dst" is already in use.', array('%dst' => $dst))); } if (form_get_errors()) { @@ -307,7 +307,7 @@ function path_save($edit) { else { path_set_alias($src, $dst, $pid); - drupal_set_message(t('the alias has been saved.')); + drupal_set_message(t('The alias has been saved.')); drupal_goto('admin/path'); } } diff --git a/modules/poll.module b/modules/poll.module index 214145848801..fb364b3092ff 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -385,14 +385,14 @@ function poll_vote(&$node) { db_query("UPDATE {poll_choices} SET chvotes = chvotes + 1 WHERE nid = %d AND chorder = %d", $node->nid, $choice); $node->allowvotes = false; $node->choice[$choice]['chvotes']++; - drupal_set_message(t('your vote was recorded.')); + drupal_set_message(t('Your vote was recorded.')); } else { - drupal_set_message(t("you're not allowed to vote on this poll."), 'error'); + drupal_set_message(t("You're not allowed to vote on this poll."), 'error'); } } else { - drupal_set_message(t("you didn't specify a valid poll choice."), 'error'); + drupal_set_message(t("You didn't specify a valid poll choice."), 'error'); } drupal_goto('node/'. $nid); diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 214145848801..fb364b3092ff 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -385,14 +385,14 @@ function poll_vote(&$node) { db_query("UPDATE {poll_choices} SET chvotes = chvotes + 1 WHERE nid = %d AND chorder = %d", $node->nid, $choice); $node->allowvotes = false; $node->choice[$choice]['chvotes']++; - drupal_set_message(t('your vote was recorded.')); + drupal_set_message(t('Your vote was recorded.')); } else { - drupal_set_message(t("you're not allowed to vote on this poll."), 'error'); + drupal_set_message(t("You're not allowed to vote on this poll."), 'error'); } } else { - drupal_set_message(t("you didn't specify a valid poll choice."), 'error'); + drupal_set_message(t("You didn't specify a valid poll choice."), 'error'); } drupal_goto('node/'. $nid); diff --git a/modules/system.module b/modules/system.module index fc88e79da158..852272208100 100644 --- a/modules/system.module +++ b/modules/system.module @@ -153,12 +153,12 @@ function system_view_general() { // file system: $directory_path = variable_get('file_directory_path', 'files'); if (!file_check_directory($directory_path)) { - form_set_error('file_directory_path', t( "the directory '%name' does not exist, or is not writable.", array('%name' => $directory_path))); + form_set_error('file_directory_path', t("The directory '%name' does not exist, or is not writable.", array('%name' => $directory_path))); } $directory_temp = variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp')); if (!file_check_directory($directory_temp)) { - form_set_error('file_directory_temp', t("the directory '%name' does not exist, or is not writable.", array('%name' => $directory_temp))); + form_set_error('file_directory_temp', t("The directory '%name' does not exist, or is not writable.", array('%name' => $directory_temp))); } $group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.')); @@ -306,7 +306,7 @@ function system_listing_save($edit = array()) { cache_clear_all(); - drupal_set_message(t('the configuration options have been saved.')); + drupal_set_message(t('The configuration options have been saved.')); drupal_goto($_GET['q']); } } @@ -326,13 +326,13 @@ function system_settings_save() { foreach ($edit as $name => $value) { variable_del($name); } - drupal_set_message(t('the configuration options have been reset to their default values.')); + drupal_set_message(t('The configuration options have been reset to their default values.')); } if ($op == t('Save configuration')) { foreach ($edit as $name => $value) { variable_set($name, $value); } - drupal_set_message(t('the configuration options have been saved.')); + drupal_set_message(t('The configuration options have been saved.')); } else { return; diff --git a/modules/system/system.module b/modules/system/system.module index fc88e79da158..852272208100 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -153,12 +153,12 @@ function system_view_general() { // file system: $directory_path = variable_get('file_directory_path', 'files'); if (!file_check_directory($directory_path)) { - form_set_error('file_directory_path', t( "the directory '%name' does not exist, or is not writable.", array('%name' => $directory_path))); + form_set_error('file_directory_path', t("The directory '%name' does not exist, or is not writable.", array('%name' => $directory_path))); } $directory_temp = variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp')); if (!file_check_directory($directory_temp)) { - form_set_error('file_directory_temp', t("the directory '%name' does not exist, or is not writable.", array('%name' => $directory_temp))); + form_set_error('file_directory_temp', t("The directory '%name' does not exist, or is not writable.", array('%name' => $directory_temp))); } $group = form_textfield(t('File system path'), 'file_directory_path', $directory_path, 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.')); @@ -306,7 +306,7 @@ function system_listing_save($edit = array()) { cache_clear_all(); - drupal_set_message(t('the configuration options have been saved.')); + drupal_set_message(t('The configuration options have been saved.')); drupal_goto($_GET['q']); } } @@ -326,13 +326,13 @@ function system_settings_save() { foreach ($edit as $name => $value) { variable_del($name); } - drupal_set_message(t('the configuration options have been reset to their default values.')); + drupal_set_message(t('The configuration options have been reset to their default values.')); } if ($op == t('Save configuration')) { foreach ($edit as $name => $value) { variable_set($name, $value); } - drupal_set_message(t('the configuration options have been saved.')); + drupal_set_message(t('The configuration options have been saved.')); } else { return; diff --git a/modules/taxonomy.module b/modules/taxonomy.module index 519ada067d27..1e7e61f4f5f2 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' => $edit['name'])); } 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' => $edit['name'])); } 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 "%a" has been updated.', array('%a' => $edit['name'])); } 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 "%name".', array('%name' => $edit['name'])); } 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 519ada067d27..1e7e61f4f5f2 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' => $edit['name'])); } 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' => $edit['name'])); } 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 "%a" has been updated.', array('%a' => $edit['name'])); } 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 "%name".', array('%name' => $edit['name'])); } db_query('DELETE FROM {term_relation} WHERE tid1 = %d OR tid2 = %d', $edit['tid'], $edit['tid']); diff --git a/modules/user.module b/modules/user.module index 9a47d8f05ef5..6c89b24cc9d7 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1046,7 +1046,7 @@ function user_edit_validate($uid, &$edit) { // Validate the e-mail address: if ($error = user_validate_mail($edit['mail'])) { - form_set_error('mail', $error); + form_set_error('mail', ucfirst($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']))); @@ -1091,7 +1091,7 @@ function user_edit($category = 'account') { } else { user_save($account, $edit, $category); - drupal_set_message(t('the changes have been saved.')); + drupal_set_message(t('The changes have been saved.')); drupal_goto("user/$account->uid"); } } @@ -1101,13 +1101,13 @@ function user_edit($category = 'account') { db_query('DELETE FROM {users} WHERE uid = %d', $account->uid); db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid); db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid); - drupal_set_message(t('the account has been deleted.')); + drupal_set_message(t('The account has been deleted.')); module_invoke_all('user', 'delete', $edit, $account); print theme('page', user_admin_account()); drupal_goto('admin/user'); } else { - drupal_set_message(t('failed to delete account: the account has to be blocked first.'), 'error'); + drupal_set_message(t('Failed to delete account: the account has to be blocked first.'), 'error'); } } @@ -1279,7 +1279,7 @@ function user_admin_create($edit = array()) { user_save('', array('name' => $edit['name'], 'pass' => $edit['pass'], 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => 1)); - drupal_set_message(t('created a new user account. No e-mail has been sent.')); + drupal_set_message(t('Created a new user account. No e-mail has been sent.')); return; } @@ -1308,19 +1308,19 @@ function user_admin_access($edit = array()) { if ($op == t('Add rule')) { $aid = db_next_id('{access}_aid'); db_query("INSERT INTO {access} (aid, mask, type, status) VALUES ('%s', '%s', '%s', %d)", $aid, $edit['mask'], $type, $edit['status']); - drupal_set_message(t('the access rule has been added.')); + drupal_set_message(t('The access rule has been added.')); } else if ($op == t('Check')) { if (user_deny($type, $edit['test'])) { - drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => $edit['test']))); + drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => ucfirst($edit['test'])))); } else { - drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => $edit['test']))); + drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => ucfirst($edit['test'])))); } } else if ($id) { db_query('DELETE FROM {access} WHERE aid = %d', $id); - drupal_set_message(t('the access rule has been deleted.')); + drupal_set_message(t('The access rule has been deleted.')); } $header = array(t('type'), t('mask'), t('operations')); @@ -1524,14 +1524,14 @@ function user_configure() { $output = user_admin_access($edit); break; case t('Save permissions'): - drupal_set_message(t('the user permissions have been saved.')); + drupal_set_message(t('The user permissions have been saved.')); case 'permission': $output = user_admin_perm($edit); break; case t('Add role'): case t('Delete role'): case t('Save role'): - drupal_set_message(t('your role changes were saved.')); + drupal_set_message(t('Your role changes were saved.')); case 'role': $output = user_admin_role($edit); break; diff --git a/modules/user/user.module b/modules/user/user.module index 9a47d8f05ef5..6c89b24cc9d7 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1046,7 +1046,7 @@ function user_edit_validate($uid, &$edit) { // Validate the e-mail address: if ($error = user_validate_mail($edit['mail'])) { - form_set_error('mail', $error); + form_set_error('mail', ucfirst($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']))); @@ -1091,7 +1091,7 @@ function user_edit($category = 'account') { } else { user_save($account, $edit, $category); - drupal_set_message(t('the changes have been saved.')); + drupal_set_message(t('The changes have been saved.')); drupal_goto("user/$account->uid"); } } @@ -1101,13 +1101,13 @@ function user_edit($category = 'account') { db_query('DELETE FROM {users} WHERE uid = %d', $account->uid); db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid); db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid); - drupal_set_message(t('the account has been deleted.')); + drupal_set_message(t('The account has been deleted.')); module_invoke_all('user', 'delete', $edit, $account); print theme('page', user_admin_account()); drupal_goto('admin/user'); } else { - drupal_set_message(t('failed to delete account: the account has to be blocked first.'), 'error'); + drupal_set_message(t('Failed to delete account: the account has to be blocked first.'), 'error'); } } @@ -1279,7 +1279,7 @@ function user_admin_create($edit = array()) { user_save('', array('name' => $edit['name'], 'pass' => $edit['pass'], 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => 1)); - drupal_set_message(t('created a new user account. No e-mail has been sent.')); + drupal_set_message(t('Created a new user account. No e-mail has been sent.')); return; } @@ -1308,19 +1308,19 @@ function user_admin_access($edit = array()) { if ($op == t('Add rule')) { $aid = db_next_id('{access}_aid'); db_query("INSERT INTO {access} (aid, mask, type, status) VALUES ('%s', '%s', '%s', %d)", $aid, $edit['mask'], $type, $edit['status']); - drupal_set_message(t('the access rule has been added.')); + drupal_set_message(t('The access rule has been added.')); } else if ($op == t('Check')) { if (user_deny($type, $edit['test'])) { - drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => $edit['test']))); + drupal_set_message(t('<em>%test</em> is not allowed.', array('%test' => ucfirst($edit['test'])))); } else { - drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => $edit['test']))); + drupal_set_message(t('<em>%test</em> is allowed.', array('%test' => ucfirst($edit['test'])))); } } else if ($id) { db_query('DELETE FROM {access} WHERE aid = %d', $id); - drupal_set_message(t('the access rule has been deleted.')); + drupal_set_message(t('The access rule has been deleted.')); } $header = array(t('type'), t('mask'), t('operations')); @@ -1524,14 +1524,14 @@ function user_configure() { $output = user_admin_access($edit); break; case t('Save permissions'): - drupal_set_message(t('the user permissions have been saved.')); + drupal_set_message(t('The user permissions have been saved.')); case 'permission': $output = user_admin_perm($edit); break; case t('Add role'): case t('Delete role'): case t('Save role'): - drupal_set_message(t('your role changes were saved.')); + drupal_set_message(t('Your role changes were saved.')); case 'role': $output = user_admin_role($edit); break; -- GitLab