Go to /admin/content/node, check one node, and choose delete from the update menu. The header of the subsequent page says "these items" and the submit button says "delete all." See below:

Here's a patch that checks whether the number of nodes being deleted is greater than one. If it's greater than one, the header says what it already does. If it's one, the header refers to the item in singular form.
This patch changes the "Delete all" text on the submit button to just "Delete," which I think expresses the same thing given the warning in the header, and it also avoids having an awkward use of format_plural(). If people absolutely love "Delete all" I can revise it to use format_plural() like the the header does in this patch.
The indentation here is awkward. Let me know if/how it can be improved.
A similar change would be needed for the submit handler, but I'm not sure if it would be better to use format_plural() or just two separate drupal_set_message() calls within an if block. I'll wait for feedback on that.
(Is there a tag for textual/language work?)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node_delete_multiple_3.patch | 1.78 KB | akahn |
| node_delete_multiple_1.patch | 1.17 KB | akahn | |
| Picture 1.png | 13.29 KB | akahn |
Comments
Comment #1
dries commentedIt's better to format_plural() the entire sentence so the translator has enough context.
Comment #2
akahn commentedThanks, I wasn't sure about that. I'll likely get to this on Monday.
Comment #3
akahn commentedOkay, this patch has all of the text in format_plural() so that translators have an easier time. I also moved the call to format_plural() out of the return statement since that was getting cluttered. I also gave node_multiple_delete_submit() the same treatment, so that the message that the user sees after the nodes get deleted is not plural if only one node was deleted.
The indentation is still a bit awkward, so let me know if there is a better way.
Comment #5
akahn commentedWhat's up with these exceptions? The patch doesn't do anything about path aliases...
Comment #6
kalis1Hi,
I've requested a new test for node_delete_multiple_3.patch, which went well this time...
And locally on my test site, everything is working as intended...
Comment #7
dries commentedCommitted to CVS HEAD. Thanks.