Commit 2f33b939 authored by Dries's avatar Dries

- Patch #9983 by Stefan: usability improvement: made sure all status messages start with a capital letter.
parent 4545f798
......@@ -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);
......
......@@ -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"));
}
/**
......
......@@ -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']));
......
......@@ -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']));
......
......@@ -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());
......
......@@ -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());
......
......@@ -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>';
......
......@@ -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>';
......
......@@ -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>';
......
......@@ -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>';
......
......@@ -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');
}
......
......@@ -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');
}
......
......@@ -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')));
}
}
......
......@@ -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')));
}
}