Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A number of strings have the pattern "Add a new ..". Using "add" and "new" in the same string is redundant.
Proposed resolution
A number of strings are edited to remove "new".
Remaining tasks
The latest patch needs some small corrections.
User interface changes
A number of strings are changed, for example:
"Add a new file." becomes "Add a file."
API changes
None.
Original report by [username]
Their is a number of problems within the Default language scattered within the system. The issue is the common usage of "Add a new". When you "Add" something, it is assumed to be new. Therefor the default language is a little bit bloated, and incorrect.
Update to #11.
Comment | File | Size | Author |
---|---|---|---|
#32 | drupal-profile-add-new-213475-30.patch | 509.17 KB | Froelund |
#27 | drupal-add-new-correction-213475-6714124.patch | 55.04 KB | jaffaralia |
#26 | Find Results.txt | 3.26 KB | mbrett5062 |
#26 | Find Results for Add new.txt | 23.37 KB | mbrett5062 |
#24 | drupal-add_new_correction-213475-24.patch | 11.76 KB | mbrett5062 |
Comments
Comment #1
keith.smith CreditAttribution: keith.smith commentedSure. We should fix this for 7.x.
Where is it, though? I grepped for "Add a new" and "add a new" and other than code comments, only turned up "Add a new comment to this page" (which is seems like there was a long issue about) and some help text in profile module regarding profile categories "To add a new category...." . I must be either be missing it or not understand your comment.
Comment #2
ScoutBaker CreditAttribution: ScoutBaker commentedI found one reference in profile.module.
Just because, here's a patch that removes the offending "new" reference.
Comment #3
GreenJelly CreditAttribution: GreenJelly commentedRock on Scout Baker!
the other one, which I didn't see is Create new, actually just look at your export of the language and search for new... you will find it beign used all over the place un-necassarily...
I know, its a small issue... but I figure allot of small issues = one major issue.
Anyways, Thanks
Comment #4
lilou CreditAttribution: lilou commentedPatch no longer applies.
Comment #5
alexanderpas CreditAttribution: alexanderpas commentedreroll of #2 against latest HEAD, also strings are already frozen, so this will need to go into 8.x
Comment #6
Elvar CreditAttribution: Elvar commentedReupload of alexanderpas's patch, for test.
Comment #8
Elvar CreditAttribution: Elvar commentedAlexaderspas's patch no longer applies. However i found a lot of other corrections myself, here is a patch.
Comment #9
disasm CreditAttribution: disasm commentedThanks Elvar for the reroll and the added corrections.
I applied the patch to make sure it didn't need another re-roll. While I was at it, I also did a git grep 'add a new' to find some other changes. Here's a list. Some of them are in comments, which I don't think need to be updated, but it probably wouldn't hurt.
Here's an output of the grep:
Lets update the patch to add these.
Comment #10
jaffaralia CreditAttribution: jaffaralia commentedI added dissam #9 mentioned point to this patch..
Thanks,
A. Jaffar ali
Comment #11
pmackay CreditAttribution: pmackay commentedThanks for updating the strings. A couple of suggested changes:
This should be changed to "Add an image style." And it would be good to wrap it with the t() function.
This should be changed to "Add an effect to a style." And it would be good to wrap it with the t() function.
Comment #12
jaffaralia CreditAttribution: jaffaralia commentedThanks for your suggestion. Here i corrected those changes..
Comment #13
mbrett5062 CreditAttribution: mbrett5062 commentedSome minor nitpicks.
This
should say
'title' => t('Add comment'),
See "Add style" and "Add image effect" further down.
This
should say
+ // Now add an option to make sure that when we update the node the
This
should say
+ * Form to re-order roles or add one.
Comment #14
mbrett5062 CreditAttribution: mbrett5062 commentedSetting back to needs work.
Comment #15
jaffaralia CreditAttribution: jaffaralia commentedThanks for your comment
Comment #17
mbrett5062 CreditAttribution: mbrett5062 commentedAlso one additional place for comments.
The following is on lines 303-310 of comment.module
Title should read "Add comment"
Also the following in your patch should be changed.
Title should read "Add comment"
Not sure yet, why previous patch failed, am investigating now.
Comment #18
mbrett5062 CreditAttribution: mbrett5062 commentedMore occurrences requiring change
\core\modules\comment\lib\Drupal\comment\Tests\CommentLinksTest.php
Lines 246-248
Should read "Add comment"
Lines 273-279
3 occurrences of "Add new comment" should read "Add comment"
I believe this is were your patch is failing.
Comment #19
jaffaralia CreditAttribution: jaffaralia commentedThanks for your comment. Here i corrected all changes as you mentioned.
Comment #21
jaffaralia CreditAttribution: jaffaralia commented#19: drupal-add-new-correction-213475-6472728.patch queued for re-testing.
Comment #22
mbrett5062 CreditAttribution: mbrett5062 commentedhhmmm unable to apply the patch to new clone of 8.x.
Says an error in core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php:136
Have reviewed the patch and the test file, and I can see no reason.
So will re-test the patch.
Comment #23
mbrett5062 CreditAttribution: mbrett5062 commentedComment #24
mbrett5062 CreditAttribution: mbrett5062 commentedOK not sure that was correct. Will upload patch again, and retest.
Comment #25
mbrett5062 CreditAttribution: mbrett5062 commentedComment #26
mbrett5062 CreditAttribution: mbrett5062 commentedOK that worked, and have applied patch successfully to new clone of 8.x.
Still finding more places this needs changing.
Here is results of search for 'Add new comment'
And another search for just 'Add new'
Hope these help. Seems this task is growing.
Comment #27
jaffaralia CreditAttribution: jaffaralia commentedI corrected all changes as you mentioned in 26. Here is the patch
Comment #28
disasm CreditAttribution: disasm commentedComment #29
disasm CreditAttribution: disasm commentedjaffaralia: sorry for the really late review. A quick glance, and this looks good to me, although it needs a reroll. Also, in the future, when you modify an existing patch, please attach an interdiff.txt file as well so we know what you changed.
Comment #30
Froelund CreditAttribution: Froelund commentedComment #31
Froelund CreditAttribution: Froelund commentedRerolled jaffaralias code.
Comment #32
Froelund CreditAttribution: Froelund commentedRerolled jaffaralias code.
Comment #33
Gaelan CreditAttribution: Gaelan commentedRemoving "needs reroll" tag.
Comment #35
Froelund CreditAttribution: Froelund commented#32: drupal-profile-add-new-213475-30.patch queued for re-testing.
Comment #36.0
(not verified) CreditAttribution: commentedAdded an issue summary.