From e2153365cf0a8cfa8aed4424d5b42875a3c575ce Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Thu, 9 Dec 2010 02:16:21 +0000 Subject: [PATCH] - Patch #991726 by wojtha, meba: missing format_plural() in comments and node module. --- modules/comment/comment.admin.inc | 2 +- modules/comment/comment.test | 2 +- modules/node/node.admin.inc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 1d868b9f0329..1f0a516647db 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -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'; } diff --git a/modules/comment/comment.test b/modules/comment/comment.test index b712d2c64a51..45d6631bd58a 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -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.')); diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index a86ffb6ff8ad..d7efc00a74b4 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -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'; } -- GitLab