"Deleted @count comments" is missing format_plural to allow translations. Attaching a patch.

(note that watchdog() cannot use format_plural since format_plural uses t())

Comments

wojtha’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, d7_plural_comments.patch, failed testing.

wojtha’s picture

Status: Needs work » Needs review
StatusFileSize
new1.42 KB

Rerolling meba's patch + test patch.

wojtha’s picture

Title: Missing format_plural in comments module » Missing format_plural in comments and node module
Issue tags: +format plural
StatusFileSize
new2.08 KB

I made search for "@count" string through all drupal core modules and found another one format_plural() text bug in node.admin.inc.

sun’s picture

Status: Needs review » Needs work
+++ modules/comment/comment.admin.inc
@@ -232,7 +232,7 @@ function comment_multiple_delete_confirm_submit($form, &$form_state) {
-    drupal_set_message(t('Deleted @count comments.', array('@count' => $count)));
+    drupal_set_message(format_plural($count, 'Deleted 1 comment', 'Deleted @count comments.'));

+++ modules/node/node.admin.inc
@@ -595,7 +595,7 @@ function node_multiple_delete_confirm_submit($form, &$form_state) {
-    drupal_set_message(t('Deleted @count posts.', array('@count' => $count)));
+    drupal_set_message(format_plural($count, 'Deleted 1 post', 'Deleted @count posts.'));

Should use a trailing period in both variants.

Powered by Dreditor.

wojtha’s picture

Status: Needs work » Needs review
StatusFileSize
new2.09 KB
sun’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Good catch. Committed to CVS HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -format plural

Automatically closed -- issue fixed for 2 weeks with no activity.