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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

keith.smith’s picture

Component: other » documentation
Status: Active » Postponed (maintainer needs more info)

Sure. 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.

ScoutBaker’s picture

I found one reference in profile.module.

Just because, here's a patch that removes the offending "new" reference.

GreenJelly’s picture

Rock 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

lilou’s picture

Component: documentation » user interface text
Category: feature » task
Status: Postponed (maintainer needs more info) » Needs work

Patch no longer applies.

alexanderpas’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Needs review
FileSize
1.2 KB

reroll of #2 against latest HEAD, also strings are already frozen, so this will need to go into 8.x

Elvar’s picture

Reupload of alexanderpas's patch, for test.

Status: Needs review » Needs work

The last submitted patch, drupal-profile-add-new-213475-6.patch, failed testing.

Elvar’s picture

Status: Needs work » Needs review
FileSize
4.29 KB

Alexaderspas's patch no longer applies. However i found a lot of other corrections myself, here is a patch.

disasm’s picture

Thanks 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:

core/includes/batch.inc:    // We add a new digit at 200, 2000, etc. (since, for example, 199/200
core/modules/image/image.module:      $output .= '<dd>' . t("Image module also allows you to attach images to content as fields. To add an image field to a <a href='@content-type'>content type</a>, go to the content type's <em>manage fields</em> page, and add a new field of type <em>Image</em>. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => url('admin/structure/types'))) . '</dd>';
core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php:    // language so we must add a new language and make it the default before
core/modules/poll/lib/Drupal/poll/Tests/PollCreateTest.php:    // Now add a new option to make sure that when we update the node the
core/modules/system/system.api.php: * updating a site, add a new hook_update_N(), which will be called by
core/modules/user/user.admin.inc: * Form to re-order roles or add a new one.
core/themes/seven/template.php:    $output = '<p>' . t('You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '</p>'

Lets update the patch to add these.

jaffaralia’s picture

I added dissam #9 mentioned point to this patch..

Thanks,
A. Jaffar ali

pmackay’s picture

Status: Needs review » Needs work

Thanks for updating the strings. A couple of suggested changes:

+++ b/core/modules/image/image.module
@@ -115,7 +115,7 @@ function image_menu() {
-    'description' => 'Add a new image style.',
+    'description' => 'Add a image style.',

This should be changed to "Add an image style." And it would be good to wrap it with the t() function.

+++ b/core/modules/image/image.module
@@ -160,7 +160,7 @@ function image_menu() {
-    'description' => 'Add a new effect to a style.',
+    'description' => 'Add a effect to a style.',

This should be changed to "Add an effect to a style." And it would be good to wrap it with the t() function.

jaffaralia’s picture

Status: Needs work » Needs review
FileSize
9.15 KB

Thanks for your suggestion. Here i corrected those changes..

mbrett5062’s picture

Some minor nitpicks.

This

@@ -685,7 +685,7 @@ function comment_node_view(Node $node, $view_mode) {
           $links['comment-add'] = array(
             'title' => t('Add new comment'),
             'href' => "node/$node->nid",

should say 'title' => t('Add comment'),

See "Add style" and "Add image effect" further down.

This

@@ -36,7 +36,7 @@ function testPollCreate() {
     $this->clickLink($title);
     $this->assertText('Total votes: 0', 'Link to poll correct.');
 
-    // Now add a new option to make sure that when we update the node the
+    // Now add a option to make sure that when we update the node the

should say + // Now add an option to make sure that when we update the node the

This

@@ -863,7 +863,7 @@ function theme_user_permission_description($variables) {
 }
 
 /**
- * Form to re-order roles or add a new one.
+ * Form to re-order roles or add a one.

should say + * Form to re-order roles or add one.

mbrett5062’s picture

Status: Needs review » Needs work

Setting back to needs work.

jaffaralia’s picture

Status: Needs work » Needs review
FileSize
9.76 KB

Thanks for your comment

Status: Needs review » Needs work

The last submitted patch, drupal-add-new-correction-213475-6472728.patch, failed testing.

mbrett5062’s picture

Also one additional place for comments.

The following is on lines 303-310 of comment.module

  $items['comment/reply/%node'] = array(
    'title' => 'Add new comment',
    'page callback' => 'comment_reply',
    'page arguments' => array(2),
    'access callback' => 'node_access',
    'access arguments' => array('view', 2),
    'file' => 'comment.pages.inc',
  );

Title should read "Add comment"

Also the following in your patch should be changed.

@@ -685,7 +685,7 @@ function comment_node_view(Node $node, $view_mode) {
           $links['comment-add'] = array(
             'title' => t('Add new comment'),
             'href' => "node/$node->nid",
-            'attributes' => array('title' => t('Add a new comment to this page.')),
+            'attributes' => array('title' => t('Add a comment to this page.')),
             'fragment' => 'comment-form',

Title should read "Add comment"

Not sure yet, why previous patch failed, am investigating now.

mbrett5062’s picture

More occurrences requiring change

\core\modules\comment\lib\Drupal\comment\Tests\CommentLinksTest.php

Lines 246-248

      // User is not allowed to post comments.
      if (!$info['post comments']) {
        $this->assertNoLink('Add new comment');

Should read "Add comment"

Lines 273-279

        // "Add new comment" is always expected, except when there are no
        // comments or if the user cannot see them.
        if ($path == "node/$nid" && $info['form'] == COMMENT_FORM_BELOW && (!$info['comment count'] || !$info['access comments'])) {
          $this->assertNoLink('Add new comment');
        }
        else {
          $this->assertLink('Add new comment');

3 occurrences of "Add new comment" should read "Add comment"

I believe this is were your patch is failing.

jaffaralia’s picture

Status: Needs work » Needs review
FileSize
11.76 KB

Thanks for your comment. Here i corrected all changes as you mentioned.

Status: Needs review » Needs work

The last submitted patch, drupal-add-new-correction-213475-6472728.patch, failed testing.

jaffaralia’s picture

Status: Needs work » Needs review
mbrett5062’s picture

Status: Needs review » Needs work

hhmmm 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.

mbrett5062’s picture

Status: Needs work » Needs review
mbrett5062’s picture

Assigned: Unassigned » mbrett5062
Status: Needs review » Needs work
FileSize
11.76 KB

OK not sure that was correct. Will upload patch again, and retest.

mbrett5062’s picture

Status: Needs work » Needs review
mbrett5062’s picture

Assigned: mbrett5062 » Unassigned
Status: Needs review » Needs work
FileSize
23.37 KB
3.26 KB

OK 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.

jaffaralia’s picture

Status: Needs work » Needs review
FileSize
55.04 KB

I corrected all changes as you mentioned in 26. Here is the patch

disasm’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
disasm’s picture

jaffaralia: 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.

Froelund’s picture

Assigned: Unassigned » Froelund
Froelund’s picture

Status: Needs work » Needs review

Rerolled jaffaralias code.

Froelund’s picture

Rerolled jaffaralias code.

Gaelan’s picture

Issue tags: -Needs reroll

Removing "needs reroll" tag.

Status: Needs review » Needs work

The last submitted patch, drupal-profile-add-new-213475-30.patch, failed testing.

Froelund’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal-profile-add-new-213475-30.patch, failed testing.

Anonymous’s picture

Issue summary: View changes

Added an issue summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.