Commit e2153365 authored by Dries's avatar Dries

- Patch #991726 by wojtha, meba: missing format_plural() in comments and node module.

parent 7361b458
......@@ -232,7 +232,7 @@ function comment_multiple_delete_confirm_submit($form, &$form_state) {
cache_clear_all();
$count = count($form_state['values']['comments']);
watchdog('content', 'Deleted @count comments.', array('@count' => $count));
drupal_set_message(t('Deleted @count comments.', array('@count' => $count)));
drupal_set_message(format_plural($count, 'Deleted 1 comment.', 'Deleted @count comments.'));
}
$form_state['redirect'] = 'admin/content/comment';
}
......
......@@ -226,7 +226,7 @@ class CommentHelperCase extends DrupalWebTestCase {
if ($operation == 'delete') {
$this->drupalPost(NULL, array(), t('Delete comments'));
$this->assertRaw(t('Deleted @count comments.', array('@count' => 1)), t('Operation "' . $operation . '" was performed on comment.'));
$this->assertRaw(format_plural(1, 'Deleted 1 comment.', 'Deleted @count comments.'), t('Operation "' . $operation . '" was performed on comment.'));
}
else {
$this->assertText(t('The update has been performed.'), t('Operation "' . $operation . '" was performed on comment.'));
......
......@@ -595,7 +595,7 @@ function node_multiple_delete_confirm_submit($form, &$form_state) {
node_delete_multiple(array_keys($form_state['values']['nodes']));
$count = count($form_state['values']['nodes']);
watchdog('content', 'Deleted @count posts.', array('@count' => $count));
drupal_set_message(t('Deleted @count posts.', array('@count' => $count)));
drupal_set_message(format_plural($count, 'Deleted 1 post.', 'Deleted @count posts.'));
}
$form_state['redirect'] = 'admin/content';
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment