Problem/Motivation

I see a lot of 'a' uses in comments instead of 'an'.

Ex:

  • a entity
  • a alt
  • a author
  • a image
  • ...

Proposed resolution

Many modules and core files are concerned. I suggest to make all changes here instead of one issue per module since it's only minor documentation issue.

Additional context

Keep in mind:

The choice of a vs. an is actually based on the phonetics of the start of a word, not the orthographic representation.

Notes

Note: .js and .css files should be generated from .es6 and .pcss.css files by run

$ cd core
$ npm run build:js
$ npm run build:css

Not touch them directly

CommentFileSizeAuthor
#267 2851394-267.patch208.51 KBquietone
#267 diff-260-267.txt1.22 KBquietone
#260 interdiff-258-260.txt6.32 KBjungle
#260 2851394-260.patch208.52 KBjungle
#258 2851394-258.patch214.84 KBjungle
#258 interdiff-257-258.txt904 bytesjungle
#257 interdiff-255-257.txt11.18 KBjungle
#257 2851394-257.patch214.81 KBjungle
#255 2851394-255.patch208.34 KBanmolgoyal74
#247 diff_reroll_2851394_238-247.txt49.69 KBankithashetty
#247 2851394-247.patch207.46 KBankithashetty
#238 interdiff-2851394-236-238.txt1.28 KBshaktik
#238 2851394-238.patch209.23 KBshaktik
#237 interdiff-2851394-234-236.txt4.76 KBmarkdorison
#236 2851394-236.patch208.19 KBshaktik
#234 225-234-interdiff.txt4.57 KBmmatsoo
#234 2851394-234.patch210.59 KBmmatsoo
#233 2851394-233.patch199.34 KBSwapnil_Kotwal
#229 interdiff_225-229.txt30.14 KBnitesh624
#229 2851394-229.patch195.54 KBnitesh624
#225 interdiff_223-225.txt4.57 KBmmatsoo
#225 2851394-225.patch215.79 KBmmatsoo
#224 interdiff_223-224.txt4.57 KBmmatsoo
#224 2851394-224.patch230.93 KBmmatsoo
#223 2851394-223.patch210.59 KBmrinalini9
#220 interdiff_217-220.txt397 bytesnitvirus
#220 2851394-220.patch210.35 KBnitvirus
#217 interdiff_214-217.txt711 bytesravi.shankar
#217 2851394-217.patch210.96 KBravi.shankar
#214 interdiff_210-214.txt9.21 KBridhimaabrol24
#214 2851394-214.patch210.09 KBridhimaabrol24
#210 2851394-210.patch207.77 KBridhimaabrol24
#209 interdiff_200-209.txt4.08 KBridhimaabrol24
#209 2851394-209.patch222.11 KBridhimaabrol24
#200 interdiff-191-200.txt810 bytesjungle
#200 2851394-200.patch222.11 KBjungle
#191 2851394-191.patch222.9 KBjungle
#187 Screenshot at 2019-11-15 11-16-10.png191.72 KBshimpy
#186 grammar-indefinite-articles-2851394-186.patch224.48 KBshashikant_chauhan
#185 Screenshot at 2019-11-14 15-34-35.png147.03 KBshimpy
#183 grammar-indefinite-articles-2851394-183.patch224.94 KBshashikant_chauhan
#182 Failure Message.png216.56 KBshubham.prakash
#176 interdiff-163_176.txt2.4 KBwolffereast
#176 grammar-indefinite-articles-2851394-176.patch229.4 KBwolffereast
#174 interdiff.txt1.14 KBamit.drupal
#174 grammar-indefinite-articles-2851394-174.patch233.26 KBamit.drupal
#173 grammar-indefinite-articles-2851394-173.patch235.73 KBwolffereast
#172 grammar-indefinite-articles-2851394-172.patch235.74 KBwolffereast
#171 interdiff_163-171.txt2.4 KBwolffereast
#171 grammar-indefinite-articles-2851394-171.patch235.75 KBwolffereast
#163 grammar-indefinite-articles-2851394-163.patch227.03 KBwolffereast
#157 interdiff_147-157.txt1.96 KBkostyashupenko
#157 grammar-indefinite-articles-2851394-157.patch204.85 KBkostyashupenko
#147 interdiff-144-147.txt1.92 KBoknate
#147 grammar-indefinite-articles-2851394-147.patch206.43 KBoknate
#144 grammar-indefinite-articles-2851394-144.patch206.65 KBoknate
#144 interdiff-143-144.txt2.39 KBoknate
#143 interdiff-133-143.txt3.29 KBoknate
#143 grammar-indefinite-articles-2851394-143.patch205.57 KBoknate
#133 grammar-indefinite-articles-2851394-133.patch202.28 KBoknate
#132 interdiff-131-132.txt12.55 KBoknate
#132 grammar-indefinite-articles-2851394-132.patch201.88 KBoknate
#131 grammar-indefinite-articles-2851394-131.patch189.94 KBoknate
#127 fix_grammar-2851394-127.patch298.73 KBsavkaviktor16@gmail.com
#120 interdiff_119-120.txt5.42 KBtanc
#120 fix_grammar-2851394-120.patch191.6 KBtanc
#119 interdiff_113-119.txt9.78 KBtanc
#119 fix_grammar-2851394-119.patch191.6 KBtanc
#118 Error.png77.33 KBDinesh18
#113 fix_grammar-2851394-113.patch190.67 KBmartin_q
#113 interdiff_110-113.txt91.34 KBmartin_q
#110 fix_grammar-2851394-110.patch263.66 KBdimaro
#110 interdiff_107-110.txt976 bytesdimaro
#109 image.png34.54 KBmahtab_alam
#107 2851394-107.patch264.11 KBMerryHamster
#104 2851394-104.patch276.74 KBMerryHamster
#100 interdiff_97-100.txt6.8 KBleolandotan
#100 2851394-100.patch289.03 KBleolandotan
#97 interdiff-88-97.txt4.07 KBswarad07
#97 2851394-97.patch296.51 KBswarad07
#95 2851394-94.patch298.15 KBswarad07
#95 interdiff-88-94.txt5.55 KBswarad07
#89 patch_result_core.png26.79 KBVenkatesh Rajan.J
#88 2851394-88.patch294.9 KBjofitz
#88 interdiff-86-88.txt1.21 KBjofitz
#86 2851394-86.patch296.11 KBjofitz
#84 patch_error_2.png113.5 KBVenkatesh Rajan.J
#84 patch_error_1.png64.3 KBVenkatesh Rajan.J
#79 fix_grammar_a_to_an-2851394-79.patch357.97 KBhgunicamp
#79 interdiff-2851394-79.txt1.19 KBhgunicamp
#78 interdiff-75-78.txt1.09 KBgaurav.kapoor
#78 fix_grammar_a_to_an-2851394-78.patch359.47 KBgaurav.kapoor
#75 fix_grammar_a_to_an-2851394-75.patch358.52 KBhgunicamp
#75 interdiff-2851394-75.txt175.61 KBhgunicamp
#73 fix_grammar_a_to_an-2851394-73.patch280.08 KBhgunicamp
#73 interdiff-2851394-73.txt55.69 KBhgunicamp
#70 fix_grammar_a_to_an-2851394-70.patch216.99 KBhgunicamp
#70 interdiff-2851394-70.txt3.12 KBhgunicamp
#69 fix_grammar_a_to_an-2851394-66.patch216.99 KBhgunicamp
#69 interdiff-2851394-66.txt3.12 KBhgunicamp
#69 fix_grammar_a_to_an-2851394-66.patch216.99 KBhgunicamp
#69 interdiff-2851394-66.txt3.12 KBhgunicamp
#63 fix_grammar_a_to_an-2851394-63.patch129.03 KBakashkrishnan01
#58 error.png21.65 KBlomasr
#56 2851394-reroll.patch131.77 KBtameeshb
#54 intediff.txt1.46 KBtameeshb
#54 2851394-reroll.patch131.77 KBtameeshb
#53 2851394-reroll.patch131.02 KBtameeshb
#53 intediff.txt922 bytestameeshb
#51 after.png53.2 KBlomasr
#50 fix_grammar_a_to_an-2851394-50.patch132.3 KBdimaro
#43 fix_grammar_a_to_an-2851394-43.patch132.3 KBjofitz
#40 interdiff-36-39.txt814 bytesboaloysius
#40 fix_grammar_a_to_an-2851394-39.patch132.2 KBboaloysius
#38 interdiff.txt814 bytesMunavijayalakshmi
#38 fix_grammar_a_to_an-2851394-38.patch132.2 KBMunavijayalakshmi
#36 fix_grammar_a_to_an-2851394-36.patch146.03 KBGoZ
#34 fix_grammar_a_to_an-2851394-34.patch146.3 KBGoZ
#27 fix_grammar_a_to_an-2851394-27.patch145.92 KBGoZ
#25 interdiff-2851394-22-25.txt44.52 KBGoZ
#25 fix_grammar_a_to_an-2851394-25.patch145.92 KBGoZ
#23 interdiff-17-22.txt576 bytestameeshb
#22 2851394-22.patch89.29 KBtameeshb
#17 fix_grammar_a_to_an-2851394-17.patch98.19 KBGoZ
#17 interdiff-2851394-15-17.txt2.01 KBGoZ
#16 fix_grammar_a_to_an-2851394-15.patch96.33 KBGoZ
#16 interdiff-2851394-2-15.txt38.43 KBGoZ
#2 fix_grammar_a_to_an-2851394-2.patch54.24 KBGoZ
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GoZ created an issue. See original summary.

GoZ’s picture

Status: Active » Needs review
FileSize
54.24 KB
gmaltoni’s picture

Assigned: Unassigned » gmaltoni
gmaltoni’s picture

Assigned: gmaltoni » Unassigned
Status: Needs review » Reviewed & tested by the community

I applied the patch and it worked cleanly.

GoZ’s picture

Thanks @gmaltoni.

What's about the grammar fixes ? I'm not a english native so if someone could review i don't make mistakes that will be great.

Thanks

cilefen’s picture

Status: Reviewed & tested by the community » Needs work
GoZ’s picture

@cilefen what do you mean by "needs work" ?
If it's related to #2574981: Fix grammar ("an URL" should be "a URL") and consistent use of URL (not "url" / "Url") in documentation only, part 1, i don't touch to 'Url' to let this issue which has anteriority continue discussion and patch them.

cilefen’s picture

I set it to needs work because of your #5 comment.

cilefen’s picture

Also, how can a reviewer know that all of them are fixed in a given patch? If you have a repeatable way you used to find them it will help to mention that in the issue summary.

GoZ’s picture

Status: Needs work » Needs review

The only way i find was to search with regex in comments: " [aA] [aeiou]" and for each, define if a or an should be used.
I keep 'a' for sentences designing a name like 'a EntityType object'.

I move it to review unless someone see a missing sentence or a wrong one.

cilefen’s picture

Oh sorry for #6 - I meant "needs review". 'a EntityType object' should be 'an'.

cilefen’s picture

GoZ: please share the regex you used, so reviewers can evaluate that all files and all possible cases were hit.

GoZ’s picture

Status: Needs review » Needs work

I use regex from #10 in IDE like PhpStorm and look at comments results.

I'll add to patch every sentences corresponding to 'a EntityType object'.

GoZ’s picture

Remove u from regex, and use regex as non case sensitive: " [a] [aeio]"

cilefen’s picture

GoZ’s picture

Status: Needs work » Needs review
FileSize
38.43 KB
96.33 KB

I have been quick in previous comment. Regex is better like " a [aeio]".

Here is patch with #13 changes + missings

GoZ’s picture

You are right, here is regex to check new lines : " a *\n[ \*/]*[aeio]"

+ 1 missing line.

cilefen’s picture

Plus this issue should also do the opposite: 'an' to 'a'.

Edited: patch/issue

The last submitted patch, 16: fix_grammar_a_to_an-2851394-15.patch, failed testing.

bleen’s picture

+++ b/core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php
@@ -3,7 +3,7 @@
+ * Provides an interface to get an instance of a class with dependency injection.

This change makes the comment longer than 80 chars ... you should break the last work to a new line

Other than that, this is RTBC from me

bleen’s picture

Status: Needs review » Needs work
tameeshb’s picture

Status: Needs work » Needs review
FileSize
89.29 KB

Applying correction from #20

tameeshb’s picture

FileSize
576 bytes

Interdiff attached

GoZ’s picture

Status: Needs review » Needs work

Thanks @tameeshb

Still have to work on #18

Plus this issue should also do the opposite: 'an' to 'a'.

GoZ’s picture

Status: Needs work » Needs review
FileSize
145.92 KB
44.52 KB

Make a new pass with regex " a[^a-z]+[aeio]" for a to an so i can find words preceded by a non alphabetical character like 'a $element'.

Replace every 'an' to 'a' found with regex " an[^a-z]+[b-df-gj-np-qz]".

For acronyms, i take care of the pronunciation of the first letter.
If in doubt, i take a look at ngrams tool : https://books.google.com/ngrams/graph?content=a+html%2Can+html&year_star...

Status: Needs review » Needs work

The last submitted patch, 25: fix_grammar_a_to_an-2851394-25.patch, failed testing.

GoZ’s picture

Status: Needs work » Needs review
FileSize
145.92 KB

reroll

swarad07’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Reviewed it manually.

xjm’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Reviewed & tested by the community » Postponed
Issue tags: +rc target

Good sleuthing and thanks for documenting how you created and reviewed the patch. #25 is especially helpful.

I thought about whether we could create a coder rule to detect this (in order to meet https://www.drupal.org/core/scope#coding-standards) but since it depends on the pronunciation and on whether the following word is an acronym, any rule would have false positives.

Since this is a grammar fix that can disrupt a lot of other patches, it's the sort of change we make during our release candidate phases. So, I'm postponing it for now and marking it as an RC target. The RC phase begins after March 1.

xjm’s picture

Status: Postponed » Needs review

Okay, we can look at this again during RC. I'll send a retest. The patch will probably need to be recreated.

Status: Needs review » Needs work

The last submitted patch, 27: fix_grammar_a_to_an-2851394-27.patch, failed testing.

xjm’s picture

Yep. Let's recreate a new patch using the instructions in #25, rather than trying to reroll the current one. Thanks!

prash_98’s picture

Should we make the changes in #25 or do the whole thing again i.e each and every change.

GoZ’s picture

Status: Needs work » Needs review
FileSize
146.3 KB

Status: Needs review » Needs work

The last submitted patch, 34: fix_grammar_a_to_an-2851394-34.patch, failed testing.

GoZ’s picture

Status: Needs work » Needs review
FileSize
146.03 KB

Sorry for that

Munavijayalakshmi’s picture

Assigned: Unassigned » Munavijayalakshmi
Status: Needs review » Needs work
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
@@ -79,13 +79,13 @@ function testEntityReferenceAutocompletion() {
+    // Try to autocomplete an entity label with both a comma, a slash and markup.

Line exceeding 80 characters.

Munavijayalakshmi’s picture

Status: Needs work » Needs review
FileSize
132.2 KB
814 bytes

Status: Needs review » Needs work

The last submitted patch, 38: fix_grammar_a_to_an-2851394-38.patch, failed testing.

boaloysius’s picture

boaloysius’s picture

Status: Needs work » Needs review

The last submitted patch, 38: fix_grammar_a_to_an-2851394-38.patch, failed testing.

jofitz’s picture

Re-rolled.

The last submitted patch, 40: fix_grammar_a_to_an-2851394-39.patch, failed testing.

boaloysius’s picture

Status: Needs review » Reviewed & tested by the community
jofitz’s picture

Status: Reviewed & tested by the community » Needs review

@boaloysius I'm afraid you can't set to RTBC because you have contributed a patch to this issue.

darius.restivan’s picture

Checked, everything seems ok.

darius.restivan’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 43: fix_grammar_a_to_an-2851394-43.patch, failed testing.

dimaro’s picture

Status: Needs work » Needs review
FileSize
132.3 KB

Rerolled #43
Simple rebase fixed it.

lomasr’s picture

FileSize
53.2 KB

Applied the patch in #50. Worked fine for 8.3.x

For 8.4.x I got this error

error: while searching for:
    }

    // add_condition determines whether a single expression is enough(FALSE) or the
    // conditions should be added via an db_or()/db_and() (TRUE).
    $add_condition = TRUE;
    if ($operator == 'not') {
      $value = NULL;

error: patch failed: core/modules/views/src/ManyToOneHelper.php:269
boaloysius’s picture

tameeshb’s picture

Rerolled from changes in 8.4, should work on 8.4 now.

tameeshb’s picture

Reroll Patch redone, previous one had one thing missing also, this must be tested against 8.4.x but it's option isn't here to test with.
Might fail with 8.3.x

tameeshb’s picture

Version: 8.3.x-dev » 8.4.x-dev
tameeshb’s picture

Test against 8.4.x

The last submitted patch, 54: 2851394-reroll.patch, failed testing.

lomasr’s picture

FileSize
21.65 KB

Tested on 8.4.x, got an error please see the screen.

dimaro’s picture

@lomasr I tried to replicate the error, however using "git apply" all looks good for me and I can not reproduce that.

akashkrishnan01’s picture

Patch #56 works fine for me too.

akashkrishnan01’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 56: 2851394-reroll.patch, failed testing.

akashkrishnan01’s picture

Since the previous patch was changing a few file which is not included in a basic Drupal core site, so removed them and re-rolled with a new patch.

akashkrishnan01’s picture

Status: Needs work » Needs review

Works fine for me. Let the bot give it a try now.

hgunicamp’s picture

Status: Needs review » Needs work
Issue tags: +ciandt-contrib

To make sure that I would be able to get all 'a [aeiou]' occurrences in comments I used the following command:

find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep -e '\(\*\|\/\/\).*\b\(A\|a\) \$\?\([AEIOU]\|[aeiou]\)' {} \+ | wc -l

It show me that before applying the 'fix_grammar_a_to_an-2851394-63.patch' patch there were 1298 occurrences.
After applying the patch, it was reduced to 1162.

To help us find where these mistakes are we could use the following command.

find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep --color=auto -e '\(\*\|\/\/\).*\b\(A\|a\) \$\?\([AEIOU]\|[aeiou]\)' {} \+

akashkrishnan01’s picture

hgunicamp, keeping things you shared, I have corrected those wrong statements. Thanks for your review. I have created a new patch with new changes as well.

akashkrishnan01’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 66: fix_grammar_a_to_an-2851394-66.patch, failed testing.

hgunicamp’s picture

I tried to solve this problem as "dropping down dominoes pieces" using the 'sed' command, but I was able to reduce to 963 occurrences. The chain reaction was not so explosive as I thought.
The command I used was:

sed -i 's/\(\*\|\/\/\)\(.*\) \(A\|\a\) \([AEIOU]\|[aeiou]\)/\1\2 \3n \4/g' $(find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep -e '\(\*\|\/\/\).*\b\(A\|a\) \$\?\([AEIOU]\|[aeiou]\)' {} \+ | cut -f1 -d':' | uniq )

This command bring back things like 'an url' or 'module An and B' that I fixed by hand.

Work is still need.

hgunicamp’s picture

I'm sorry @akashkrishnan. I had not updated my page and used the same name you used for a patch (fix_grammar_a_to_an-2851394-66.patch). Let's upload again.

I'm using 'fix_grammar_a_to_an-2851394-70.patch'.

The last submitted patch, 69: fix_grammar_a_to_an-2851394-66.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 70: fix_grammar_a_to_an-2851394-70.patch, failed testing.

hgunicamp’s picture

Status: Needs work » Needs review
FileSize
55.69 KB
280.08 KB

Following the "dropping down dominoes" strategy, I used a command to replace "an " for "a ". The command also avoids replacing expressions like "an (html|http|xml|xss)".

sed -i 's/\(\*\|\/\/\)\(.*\) \(A\|a\)n \([B-DF-HJ-NP-TV-Z]\|[b-df-hj-np-tv-z]\)/\1\2 \3 \4/;s/ \(A\|a\) \([Hh][Tt][Mm][Ll]\|[Xx][Mm][Ll]\|[Hh][Tt][Tt][Pp]\|[Xx][Ss][Ss]\)/ \1n \2/g' $(find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep -e '\(\*\|\/\/\).* \(A\|a\)n \([B-DF-HJ-NP-TV-Z]\|[b-df-hj-np-tv-z]\)' {} \+ | cut -f1 -d':' | uniq)

The command
find . -type f \( -name '*.inc' -or -name '*.module' -or -name '*.php' \) -exec grep -e '\(\*\|//\).* \(A\|a\) \([AEIOU]\|[aeiou]\)' {} \+ | grep -v -e '\(A\|a\) [Uu][Rr][Ll]' | wc -l

Shown me the there are 646 "a " remaining occurrences.

nicrodgers’s picture

Status: Needs review » Needs work

I've just done a very quick skim review of the first couple of changes in the patch in #73, and it includes a lot of unnecessary changes that actually change the sentence from correct to incorrect. For example:

  1. +++ b/core/core.api.php
    @@ -1692,7 +1692,7 @@
    - * documentation. A user of your API can usually name their callback function
    + * documentation. An user of your API can usually name their callback function
    

    "A user" is correct.

  2. +++ b/core/core.api.php
    @@ -2241,7 +2241,7 @@ function hook_rebuild() {
    - *   A one-dimensional array of \Drupal\Core\Config\ConfigImporter method names
    + *   An one-dimensional array of \Drupal\Core\Config\ConfigImporter method names
    

    "A one-dimensional" is correct.

  3. +++ b/core/includes/common.inc
    @@ -289,7 +289,7 @@ function format_size($size, $langcode = NULL) {
    - *   A UNIX timestamp to format.
    + *   An UNIX timestamp to format.
    

    "A UNIX timestamp" is correct

hgunicamp’s picture

Thanks @nicrodgers.

I found and corrected the mistakes you pointed.

I made another search excluding expressions like "a user, a url, a one, a unix, an html, an xml, an http, an xss".

Let me know if there are any more collateral damages from my approach.

Status: Needs review » Needs work

The last submitted patch, 75: fix_grammar_a_to_an-2851394-75.patch, failed testing.

gaurav.kapoor’s picture

Assigned: Unassigned » gaurav.kapoor
gaurav.kapoor’s picture

Assigned: gaurav.kapoor » Unassigned
Status: Needs work » Needs review
FileSize
359.47 KB
1.09 KB
hgunicamp’s picture

Thanks @gaurav.kapoor for trying to fix my mess.
Actually the mistakes are in the commentaries of functions 'module_a_post_update_a' and 'module_a_post_update_b', where my patch replaced 'Module A update' for 'Module An update'.

Sending a patch to fix this collateral damage.

vegantriathlete’s picture

Issue tags: +dcco2017

I'll queue this up for this weekend's Drupalcamp Colorado and see about having somebody look at it on Sunday.

nicrodgers’s picture

@vegantriathlete great! I think this would really benefit from a manual review and manual fix - the automated/bulk solutions seem to be creating more bugs than they are fixing.

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

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now 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.

Venkatesh Rajan.J’s picture

Assigned: Unassigned » Venkatesh Rajan.J
Venkatesh Rajan.J’s picture

Assigned: Venkatesh Rajan.J » Unassigned
Status: Needs review » Needs work
FileSize
64.3 KB
113.5 KB

Could not apply patch #79 on Drupal 8.5.x, throws some errors while applying the patch.

cilefen’s picture

Issue tags: +Needs reroll

Hello Venkatesh Rajan.J:

Thank you for helping. In order that your support can be even more useful let me suggest the following. When a patch does not apply it is not necessary to post evidence (code screenshots are seldom needed). Instead add the tag "Needs reroll". It is even more helpful to reroll it, if you are comfortable doing so.

Thank you!

jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
296.11 KB

Re-rolled. Including correcting from "an user", "an unique" and "an UID".

Status: Needs review » Needs work

The last submitted patch, 86: 2851394-86.patch, failed testing. View results

jofitz’s picture

Status: Needs work » Needs review
FileSize
1.21 KB
294.9 KB

Fixed a couple of coding standards errors.

EDIT: Unable to replicate the test failure locally (appears to have been a testbot fault).

Venkatesh Rajan.J’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
26.79 KB

@Jo Fitzgerald,

Thanks for the patch. It works well. PFA for the same.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 88: 2851394-88.patch, failed testing. View results

dimaro’s picture

@Venkatesh Rajan.J I think that we have to check again these occurrences.
The last patch before @cilefen categorized this issue as "Needs reroll" is from May 4.

Ivan Berezhnov’s picture

Issue tags: +CSKyiv18
vegantriathlete’s picture

Issue tags: -dcco2017

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

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now 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.

swarad07’s picture

Status: Needs work » Needs review
FileSize
5.55 KB
298.15 KB

Attempting a patch reroll against 8.6.x...

Status: Needs review » Needs work

The last submitted patch, 95: 2851394-94.patch, failed testing. View results

swarad07’s picture

Status: Needs work » Needs review
FileSize
296.51 KB
4.07 KB

Seems I left some code during conflict resolution in ConfirmDeleteMultiple.php. That was the only file with conflicts during rebase.

thatdamnqa’s picture

Thanks for this. Upon reviewing, I found a few items that need some more work eg the ones below. If you could fix these it would be much appreciated.

--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -198,15 +198,15 @@ function valid_email_address($mail) {
- * Strips dangerous protocols from a URI and encodes it for output to HTML.
+ * Strips dangerous protocols from an URI and encodes it for output to HTML.

"A URI" is correct

--- a/core/includes/database.inc
+++ b/core/includes/database.inc
@@ -522,7 +522,7 @@ function db_and() {
- *   a \Drupal\Core\Database\Query\Condition object, specifying an XOR
+ *   a \Drupal\Core\Database\Query\Condition object, specifying a XOR

Presuming it's pronounced "ex-or", then "an XOR" is correct

--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -77,7 +77,7 @@
- * Returns the scheme of a URI (e.g. a stream).
+ * Returns the scheme of an URI (e.g. a stream).

"A URI" is correct. This change has been made 8 times in this file, all are incorrect.

--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -2048,7 +2048,7 @@ function install_check_requirements($install_state) {
-        // security risk. It would also cause a usability problem, since site
+        // security risk. It would also cause an usability problem, since site

"A usability problem" is correct.

diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 61982c3885..c676aac3f3 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -16,7 +16,7 @@
- * class acts as a unified global accessor to arbitrary services within the
+ * class acts as an unified global accessor to arbitrary services within the

"A unified" is correct

--- a/core/lib/Drupal/Component/ClassFinder/ClassFinder.php
+++ b/core/lib/Drupal/Component/ClassFinder/ClassFinder.php
@@ -5,7 +5,7 @@
 use Doctrine\Common\Reflection\ClassFinderInterface;
 
 /**
- * A Utility class that uses active autoloaders to find a file for a class.
+ * An Utility class that uses active autoloaders to find a file for a class.

"A Utility class" is correct

thatdamnqa’s picture

Status: Needs review » Needs work
leolandotan’s picture

Status: Needs work » Needs review
FileSize
289.03 KB
6.8 KB

Hi! I applied the fix mentioned in #98. Upon applying the patch to the latest 8.6.x code, `git apply` didn't work so I used `patch -p1` and had two rejects which are for core/lib/Drupal/Component/Gettext/PoStreamReader.php and core/modules/simpletest/src/AssertContentTrait.php. For core/lib/Drupal/Component/Gettext/PoStreamReader.php, I just manually added the changes from the patch while core/modules/simpletest/src/AssertContentTrait.php didn't need to be changed because a recent commit removed all the code inside this file as stated in it's docblock.

Hope everything is in order.

amietpatial’s picture

@ leolando.tan I also faced same issue of apply patch but after applying it's working fine

bleen’s picture

NOTE: This comment should in no way derail, bikeshed, delay, conflate, blow up, distract from this effort...

Once this is committed I wonder if there a way to add a build check to D.O. so that future patches are checked using similar REGEXes as were used here to warn (break build?) people about making the same mistake. It would be a shame to do this work so thoroughly only to have a future patch introduce the same mistakes a week later.

... If not, then isn't possible we are being overly thorough here? Why not just commit what we have and move on?

Just thinkin' about a possible followup

sayali_pd’s picture

Status: Needs review » Needs work
  1. +++ b/core/includes/bootstrap.inc
    @@ -363,7 +363,7 @@ function format_string($string, array $args) {
    + * end up in locations that are potentially unsafe; A onerror attribute that
    

    There wasn't any change required here. "An onerror" is the right usage. Please change it back

  2. +++ b/core/includes/install.core.inc
    @@ -1372,7 +1372,7 @@ function install_download_translation(&$install_state) {
    + * Attempts to get a file using an HTTP request and to store it locally.
    

    This should be "a HTTP request". Please make the required changes.

  3. +++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
    @@ -251,7 +251,7 @@ private function readLine() {
    +        // The first line might come with an UTF-8 BOM, which should be removed.
    

    "a UTF-8 BOM" is the right usage. Please change this back.

  4. +++ b/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php
    @@ -169,7 +169,7 @@ protected static function ordUTF8($character) {
    -   *   The character code of a Unicode character.
    

    This should be "a unicode" character. Please change this back

  5. +++ b/core/lib/Drupal/Component/Utility/Html.php
    @@ -445,7 +445,7 @@ public static function escape($text) {
    +   *   The root URL, which has an URI scheme, host and optional port.
    

    This should be changed to "The root URL, which has a URI scheme,host and an optional port"

  6. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -272,7 +272,7 @@ public static function truncateBytes($string, $len) {
    -   * Counts the number of characters in a UTF-8 string.
    

    "a UTF-8 string" is the right usage. Please change it back.

  7. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -293,7 +293,7 @@ public static function strlen($text) {
    +   * Converts an UTF-8 string to uppercase.
    

    Please change this back to "a UTF-8 string"

  8. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -315,7 +315,7 @@ public static function strtoupper($text) {
        *
    

    Please change this to "a UTF-8 string" back. This would be the right usage.

  9. +++ b/core/includes/common.inc
    @@ -204,9 +204,9 @@ function valid_email_address($mail) {
      * @return string
    ...
      *   attribute value. Because it is already encoded, it should not be set as a
    

    This should be "A URI". Please change it back.

  10. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -350,7 +350,7 @@ public static function ucfirst($text) {
    -   * Converts the first character of a UTF-8 string to lowercase.
    

    Please change this back to "a UTF-8 string".

  11. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -488,7 +488,7 @@ public static function substr($text, $start, $length = NULL) {
    -   * Truncates a UTF-8-encoded string safely to a number of characters.
    

    Please change this back to "truncates a UTF-8-encoded" string

  12. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -677,7 +677,7 @@ public static function caseFlip($matches) {
    +   * end up in locations that are potentially unsafe; A onerror attribute that
    

    Please change this back to "An onerror attribute"

  13. +++ b/core/lib/Drupal/Component/Utility/UrlHelper.php
    @@ -304,7 +304,7 @@ public static function setAllowedProtocols(array $protocols = []) {
    +   * Strips dangerous protocols (for example, 'javascript:') from an URI.
    

    Please change this to "a URI"

  14. +++ b/core/lib/Drupal/Component/Uuid/Com.php
    @@ -3,7 +3,7 @@
    + * Generates an UUID using the Windows internal GUID extension.
    

    Please change this back to "a UUID"

  15. +++ b/core/lib/Drupal/Component/Uuid/Pecl.php
    @@ -3,7 +3,7 @@
    - * Generates a UUID using the PECL extension.
    

    Please change this back to "a UUID"

  16. +++ b/core/lib/Drupal/Component/Uuid/UuidInterface.php
    @@ -8,7 +8,7 @@
    +   * Generates an Universally Unique IDentifier (UUID).
    
    +++ b/core/lib/Drupal/Core/Access/AccessManager.php
    @@ -55,7 +55,7 @@ class AccessManager implements AccessManagerInterface {
    -   * Constructs a AccessManager instance.
    

    This should be changed back to "a AccessManager instance"

  17. +++ b/core/lib/Drupal/Component/Utility/Unicode.php
    @@ -337,7 +337,7 @@ public static function strtolower($text) {
    +   * Capitalizes the first character of an UTF-8 string.
    ...
        * @param string $text
    

    "a UTF-8 string" would be the right usage. Please change it back.

MerryHamster’s picture

Fixed all items from #103
8.6 has many changes since the last patch so I have not added the interdiff file.

MerryHamster’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 104: 2851394-104.patch, failed testing. View results

MerryHamster’s picture

8.6 has many changes since the #100 patch, so #104 patch had fallen.
I recreated patch for current 8.6 and added all notes from #103

MerryHamster’s picture

Status: Needs work » Needs review
mahtab_alam’s picture

Status: Needs review » Needs work
FileSize
34.54 KB

Patch #107 failed failed

dimaro’s picture

Status: Needs work » Needs review
FileSize
976 bytes
263.66 KB

One more time the patch no longer applies.
Rerolled #107

martin_q’s picture

There is a recurring problem with the correct usage of 'a/an' before 'http' because the pronunciation of the letter 'H' is disputed. Although many people do consider it to be pronounced /heɪtʃ/ (which would necessitate the article 'a'), the standard and far more widespread pronunciation is /eɪtʃ/ (requiring the article 'an'). Source: https://en.wikipedia.org/wiki/H#Name_in_English

Thus there are problems with this patch (as well as various other false positives), and with the list in #103. I'll reroll it...

Status: Needs review » Needs work

The last submitted patch, 110: fix_grammar-2851394-110.patch, failed testing. View results

martin_q’s picture

Rerolled 110, which reverts several things related to false positive 'a'/'an' issues, a few other wording problems and some comment line length issues (but only those line length issues that I spotted easily, possibly not a complete list).

(For the record, I'm a mother tongue (British) English speaker.)

martin_q’s picture

Status: Needs work » Needs review
jpoesen’s picture

Thanks @martin_q!

1.

@@ -8,7 +8,7 @@
 class PluginNotFoundException extends PluginException {
 
   /**
-   * Construct an PluginNotFoundException exception.
+   * Construct a PluginNotFoundException exception.

--> should be constructs, no?

2.

--- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
@@ -167,7 +167,7 @@ public function testExportImport() {
     $this->assertText($this->contentType->label());
 
     $this->drupalPostForm(NULL, [], 'Import all');
-    // After importing the snapshot has been updated an there are no warnings.
+    // After importing the snapshot has been updated there are no warnings.

--> I believe this should have been corrected to 'has been updated *and* there are no warnings'.

3.

--- a/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php
+++ b/core/modules/dblog/tests/src/Functional/ConnectionFailureTest.php
@@ -23,7 +23,7 @@ public function testConnectionFailureLogging() {
     // MySQL errors like "1153 - Got a packet bigger than 'max_allowed_packet'
     // bytes" or "1100 - Table 'xyz' was not locked with LOCK TABLES" lead to a
     // database connection unusable for further requests. All further request
-    // will result in an "2006 - MySQL server had gone away" error. As a
+    // will result in a "2006 - MySQL server had gone away" error. As a

--> while not exactly within the scope of this round of corrections, the error reads 'MySQL server has gone away', not 'had'.

4.

--- a/core/modules/file/src/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/src/Tests/FileFieldWidgetTest.php
@@ -479,7 +479,7 @@ public function testWidgetElement() {
 
     $elements = $this->xpath($xpath);
 
-    // If the field has at least a item, the table should be visible.
+    // If the field has at least an item, the table should be visible.

--> Should this not have been corrected to 'at least *one* item'?

5.

@@ -131,7 +131,7 @@ public function testDefaultLangcode() {
 
     // Check the default value of a language field when authors preferred option
     // is selected.
-    // Create first an user and assign a preferred langcode to him.
+    // Create first a user and assign a preferred langcode to him.

--> again strictly out of scope, but: incorrect word order, and pronoun issue.
--> suggestion: 'First create a user, then assign them a langcode'.

6.

--- a/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
+++ b/core/modules/system/tests/src/Functional/Database/SelectPagerDefaultTest.php
@@ -14,7 +14,7 @@ class SelectPagerDefaultTest extends DatabaseTestBase {
   /**
    * Confirms that a pager query returns the correct results.
    *
-   * Note that we have to make an HTTP request to a test page handler
-   * because the pager depends on GET parameters.
+   * Note that we have to make a HTTP request to a test page handler because the
+   * pager depends on GET parameters.
    */
   public function testEvenPagerQuery() {
@@ -48,7 +48,7 @@ public function testEvenPagerQuery() {
   /**
    * Confirms that a pager query returns the correct results.
    *
-   * Note that we have to make an HTTP request to a test page handler
-   * because the pager depends on GET parameters.
+   * Note that we have to make a HTTP request to a test page handler because the
+   * pager depends on GET parameters.

--> As you indicated in comment #111, use 'an' before 'HTTP', so the above correction should be undone.

7.

--- a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php
@@ -274,7 +274,7 @@ public function testValidEntityAutocompleteElement() {
   public function testInvalidEntityAutocompleteElement() {
     $form_builder = $this->container->get('form_builder');
 
-    // Test 'single' with a entity label that doesn't exist
+    // Test 'single' with an entity label that doesn't exist

--> Missing period at the end.

8.

--- a/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
@@ -120,7 +120,7 @@ public function providerTestSetErrorByName() {
     return [
       // Only validate the 'options' element.
       [[['options']], ['options' => '']],
-      // Do not limit an validation, and, ensuring the first error is returned
-      // for the 'test' element.
+      // Do not limit a validation, and ensuring the first error is returned for
+      // the 'test' element.

--> should either be ', and ensure [...]' or ', ensuring [...]'
--> 'Do not limit *a* validation' sounds strange but might be correct if we are talking about individual, discrete validations, rather than 'all/any validation' to be skipped.

jpoesen’s picture

Status: Needs review » Needs work
Dinesh18’s picture

Assigned: Unassigned » Dinesh18
Dinesh18’s picture

Assigned: Dinesh18 » Unassigned
Issue tags: +Needs reroll
FileSize
77.33 KB

I tried applying the patch mentioned in #113. It throws an error.
We need reroll. Added the needs reroll tag.
Here is the error msg screenshot attached.

tanc’s picture

Status: Needs work » Needs review
FileSize
191.6 KB
9.78 KB

Here is a re-roll of #113, not including the changes suggested by @jpoesen.

There were a few changed file paths:

core/modules/editor/src/Tests/EditorAdminTest.php -> core/modules/editor/tests/src/Functional/EditorAdminTest.php
core/modules/editor/src/Tests/EditorLoadingTest.php -> core/modules/editor/tests/src/Functional/EditorLoadingTest.php
core/modules/system/src/Tests/System/HtaccessTest.php -> core/modules/system/tests/src/Functional/System/HtaccessTest.php
core/modules/system/src/Tests/System/ThemeTest.php -> core/modules/system/tests/src/Functional/System/ThemeTest.php

The text changes in core/tests/Drupal/Tests/BrowserTestBase.php did not apply and no longer exist (so not included in this patch).

The rest of the changes were line numbers.

tanc’s picture

Includes suggested changes from @jpoesen in #115

tanc’s picture

Issue tags: -Needs reroll
martin_q’s picture

Thanks, all. I agree with all of @jpoesen's points - these were all either due to me being too cautious about changing meaning of things I don't know about, or me reading the texts too quickly. And in the case of that "a HTML" I must just have been confused. Definitely 'an HTML"! :)

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

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now 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.

quietone’s picture

Retesting the patch in #120 in 8.7.x

mayaslatinek6@gmail.com’s picture

Couldn't apply the patch provided in #120

quietone’s picture

Issue tags: +Needs reroll

Since the patch no longer applies, tagging for reroll

savkaviktor16@gmail.com’s picture

Re-rolled

oknate’s picture

The drupal bot tester says the patch adds nine additional coding standard messages

quietone’s picture

Status: Needs review » Needs work

@oknate is correct, there are coding standard errors that need to be fixed. Setting to NW.

oknate’s picture

It also looks like there's some unintentional changes/reversions in core/modules/tour/js/tour.es6.js and core/modules/quickedit/js/models/EntityModel.es6.js in #127.

oknate’s picture

Reroll with two small fixes (comments longer than 80 characters).

oknate’s picture

Adding some more indefinite article fixes.

oknate’s picture

quietone’s picture

Latest patch has all coding standards fixed, Thanks oknate.

volkswagenchick’s picture

Issue tags: +fldc19, +sfdug, +dcnj19

Tagging for upcoming contribution days.

johnpicozzi’s picture

Patch applies cleanly and changes look good.

RTBC +1

pawandubey’s picture

I have tested this patch#133 and working fine along with the coding standards.

samiullah’s picture

Assigned: Unassigned » samiullah
samiullah’s picture

Patch Looks good

samiullah’s picture

Status: Needs review » Reviewed & tested by the community

The last submitted patch, 120: fix_grammar-2851394-120.patch, failed testing. View results

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/simpletest/src/Exception/MissingGroupException.php
@@ -3,7 +3,7 @@
- * Exception thrown when a simpletest class is missing an @group annotation.
+ * Exception thrown when a simpletest class is missing a @group annotation.

For me - at least according to the rules this conversion is wrong. When saying this out loud I would say "at-group annotation" so following the general rule from https://english.blogoverflow.com/2011/11/articles-a-vs-an/ - @group starts with a vowel sound and so should be an @group annotation. This why it is an HTML because saying H you say "aitch" which is starts with a vowel sound.

Note in core we have stuff like

 * EntityType, look for class files that have an @ annotation section using the
 *   with \Drupal\Component\Render\FormattableMarkup and an @variable

And

 *   a @group annotation, which gives information about the test.

So we're not consistent and this patch doesn't adjust any of this to be consistent.

oknate’s picture

Updated, I searched the codebase for "a @" and found a few that I think should be changed, based on Alex Pott's comment.

oknate’s picture

Adding a few more changes. Not sure why I missed these in the last patch.

oknate’s picture

Status: Needs work » Needs review
alexpott’s picture

+++ b/core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php
@@ -51,7 +51,7 @@ public function testCount() {
    * Custom error handler that saves the last error.
-   *
+   * an @group
    * We need this custom error handler because we cannot rely on the error to
    * exception conversion as __toString is never allowed to leak any kind of

Looks like something crept in by mistake.

oknate’s picture

Fixing the "butterfingers" typo in #146, also making a change

- an (array of) SelectInterface(s)
+ a SelectInterface or an array of SelectInterfaces

I think the second way is clearer.

jcloys’s picture

Assigned: samiullah » Unassigned
jcloys’s picture

Assigned: Unassigned » jcloys
Status: Needs review » Reviewed & tested by the community

Review and can confirm that the patch applies. One patch adds an where appropriate and the diff can show this appropriately.

pawandubey’s picture

Patch looks good.
RTBC +1

jcloys’s picture

Assigned: jcloys » Unassigned

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 147: grammar-indefinite-articles-2851394-147.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Reviewed & tested by the community

Random testbot fail.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 147: grammar-indefinite-articles-2851394-147.patch, failed testing. View results

pawandubey’s picture

Status: Needs work » Reviewed & tested by the community
quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Patch in #147 no longer applies, needs a reroll.

kostyashupenko’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
204.85 KB
1.96 KB
baikho’s picture

Status: Needs review » Needs work

Reviewing patch in #157 and everything seemed fine but looking at:

--- a/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Lock/LockTest.php
@@ -48,7 +48,7 @@ public function testBackendLockRelease() {
 
     $this->lock->release('lock_b');
 
-    // Test acquiring an releasing a lock with a long key (over 255 chars).
+    // Test acquiring a releasing a lock with a long key (over 255 chars).

I think "Test acquiring a releasing lock with a long key (over 255 chars)." would be correct grammar? (I am not an english native speaker)

volkswagenchick’s picture

Issue tags: -fldc19, -dcnj19 +midcamp2019
pawandubey’s picture

Patch in #157 no longer applies, needs a reroll along with the suggestion in #158.

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wolffereast’s picture

I'm working on the reroll and change mentioned in 158

wolffereast’s picture

Status: Needs work » Needs review
Issue tags: +Seattle2019
FileSize
227.03 KB

I added some specificity to the original regex posted in #25.
For the a regex: updated to match only instances in comment lines and not match items followed by the word one (the word one came up as a false positive many times, this significantly culled the results).
(?:\*|//)[^\r\n]*\sa[^a-z.:]+(?!one)[aeio]
Similar update to the an regex, finding only items in comments and adding digits to the matched items as those occasionally need updates.
(?:\*|//)[^\r\n]*\san[^a-z.:]+[b-df-gj-np-qz0-9]

TestDiscoveryTest had more issues than just an a/an flip. I have updated the grammar to be more appropriate, but this might do better split out into a separate ticket.

Additional items that are likely outside the scope of this ticket:
an should precede consonants that sound as thought they start with a vowel. For example: an X-Files episode
This is a much more difficult thing the grep, so should probably be handled on a case by case basis in separate tickets as instances are discovered.

I didn't update anything outside of a comment or docblock with the exception of a test in TestDiscoveryTest. That text matches the doc block string that follows, so I updated both.

There is an issue with the comment in editor.admin.es6.js:670 that includes an a/an item but it needs more work. I will open a separate ticket for that one.

artis’s picture

Status: Needs review » Reviewed & tested by the community

Manually reviewed the patch as a native (american) english speak. Did not find any clear issues with the grammar or spelling on the relevant lines of code.

There is one situation with some gray area.

If the @ symbol is read as 'at' in front of @Translation then the update to 'an' in this patch is correct. However if the @ symbol should be ignored when read then it should go back to being preceded by 'a'. Don't have a strong inclination either way. Marking as RTBC. If someone strongly disagrees then the patch would need to be re-rolled with that one change.

oknate’s picture

Issue tags: -midcamp2019, -Seattle2019

This has grown to be a giant patch. +1 RTBC. Can we get this one in, and then going forward doing smaller patches for individual issues?

bleen’s picture

going forward we should look to include the regex used here in the checks on all new patches... I'm not sure how to get that done (or how to even indicate that to the d.o. team) but if new patches had a failing "test" based on this then it would prevent similar issues in the future

oknate’s picture

that would be awesome, there are checks for php standards, maybe it could be added there, in /vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting

artis’s picture

+1 for that suggestion

pawandubey’s picture

Completely agree with @artis on the review part and the suggestion given by @oknate.

RTBC+1

wolffereast’s picture

Status: Reviewed & tested by the community » Needs review

I agree that a test would be great but I think designing it will be quite a task because of the sheer volume of edge cases in the English language. Even with the updated regex I still had to comb through the returned list to ensure I didn't update anything incorrectly. I also see some holes in the existing version that would sneak through a test based on the current regex. For example it doesnt pick up any word following an 'a' that starts with a u. That incorrectly ignores words like 'unknown' which should use an instead of a, but doesn't incorrectly flag things like 'a unique'.

Well shoot, now that I looked for it I found an instance of the u edge case. I hate to do this, but I rerolled the patch and updated the a regex to catch the new item.
In addition to the addition of the un capture group I forced either a space or a line break after the captured a. That removed a bunch of false positives that were catching a followed by odd punctuation.
(?:\*|//)[^\r\n]*\sa[\s\r\n][^a-z.:]*(?:(?!one)[aeio]|un[b-df-hj-np-tv-z])

While I thought about it we also weren't catching the numbers 8, 11, 18, or anything in the 80s.
(?:\*|\/\/)[^\r\n]*\sa[\s\r\n][^a-z0-9.:]*(?:(11|18)[^0-9]|8[0-9]+|(?!onc?e)[aeio]|un[b-df-hj-np-tv-z])

And at this point I feel pretty confident that this is getting to the point where it is no longer maintainable.

Other items that would need to be caught:

  • the letter A when used as an example. IE 'module A is installed...'
  • the letter a when used as a variable in js. IE 'var a = event'
  • fringe case: 'a <a href' is caught
  • a followed by punctuation should not be flagged. IE 'a ","' is a false positive

I'm sure I'm missing more cases. Those cover most of the ~30 false positives I am seeing when I run the above on core.

wolffereast’s picture

wolffereast’s picture

One of the files was moved in another update. Updated the patch to include the change. The interdiff is still essentially the same so I didn't regenerate that as well.

wolffereast’s picture

Another moved file breaking the patch. Hopefully this also fixes the CI issue. the 163-171 interdiff is still essentially correct.

amit.drupal’s picture

After Review found some unused code.
Update #173

Status: Needs review » Needs work

The last submitted patch, 174: grammar-indefinite-articles-2851394-174.patch, failed testing. View results

wolffereast’s picture

@amit.drupal good catch! That was my rookie mistake, some testing for a different ticket snuck its way into this patch. I went all the way back to the patch in 163 and used the updated regex to apply the additional changes. Attaching a new patch and an interdiff. I believe those additions were the reason for the CI issue

wolffereast’s picture

Status: Needs work » Needs review

Got a pass after removing my mistakes. moving to needs review

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

andyrandom’s picture

Status: Needs review » Needs work

Looks good to me, excellent attention to detail. This obviously took a lot of work.

I found two minor typos that persisted in lines that were updated. They're not specific to this issue (spelling mistakes rather than a/an discrepancies), but as long as we're diving this deep into the documentation it makes sense to add them.

  1. +++ b/core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php
    @@ -21,7 +21,7 @@ class UpcastingTest extends BrowserTestBase {
    +   * The tests shuffle the parameters around and checks if the right thing is
    

    This should say "and check"

  2. +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
    @@ -43,7 +43,7 @@ public function testAjaxElementValidation() {
    +    // The AJAX request/resonse will complete successfully when an InsertCommand
    

    Spelling "response" properly will re-break these lines.

Dinesh18’s picture

I tried to apply patch #176 but the patch is not applying properly and It is failing.

shubham.prakash’s picture

Issue tags: +Needs reroll

The patch no longer applies and needs reroll.

shubham.prakash’s picture

FileSize
216.56 KB
shashikant_chauhan’s picture

Status: Needs work » Needs review
FileSize
224.94 KB

Rerolled the patch and added the changes mentioned in #179.

shashikant_chauhan’s picture

Issue tags: -Needs reroll
shimpy’s picture

Status: Needs review » Needs work
FileSize
147.03 KB

I tried applying #183. But failed to apply. Attaching screenshot as well.

shashikant_chauhan’s picture

Removed the extra space in a new patch which was added while rerolling the patch.

shimpy’s picture

Status: Needs review » Needs work
FileSize
191.72 KB

I tried applying patch #186 but failed to apply.

patch failed

shashikant_chauhan’s picture

Status: Needs work » Needs review

@shimpy, Don't be in a hurry.
Before applying any patch you should first check if you have the latest code on branch 8.9.x.
use command git pull origin 8.9.x
then try applying the same patch again. I checked the patch is getting applied successfully.

shimpy’s picture

@shashikant_chauhan
Thanks for reminding me to pull the latest 8.9 code. Patch got applied.

jungle’s picture

Assigned: Unassigned » jungle
Status: Needs review » Needs work

#186 is broken

jungle’s picture

Rerolled from #186 and get .js files generated by run npm run build:js, not touched directly. (Updatd to IS) no css/.pcss.css file changes.

But run npm run build:css got one file change. I think this should be done by a separate issue.

diff --git a/core/themes/claro/css/components/form.css b/core/themes/claro/css/components/form.css
index c2ab325e92..ca6f8f302f 100644
--- a/core/themes/claro/css/components/form.css
+++ b/core/themes/claro/css/components/form.css
@@ -58,10 +58,6 @@
   color: #8e929c;
 }
 
-::-ms-input-placeholder {
-  color: #8e929c;
-}
-
 ::placeholder {
   color: #8e929c;
 }
jungle’s picture

Assigned: Unassigned » jungle
Issue tags: +Needs followup
jungle’s picture

jungle’s picture

Issue summary: View changes

Update IS: .post.css -> pcss.css

thalles’s picture

This issue already have three years and don't look me that been next to resolve, because involve several files, and this issue has no critical, so, maybe, can be best, to send small patches, that involve few files

Status: Needs review » Needs work

The last submitted patch, 191: 2851394-191.patch, failed testing. View results

jungle’s picture

Status: Needs work » Needs review
+++ b/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php
@@ -778,7 +778,7 @@ protected function getClassyHash($type, $file) {
         'radios.html.twig' => 'd938c3dd61fc99b79cf4f07ad673ee83',
         'item-list.html.twig' => '869d9d6a7c79844b69e88a622eb1e4b1',
         'aggregator-feed.html.twig' => 'b9c4dc3b384bca32041edf63c598e197',
-        'item-list--search-results.html.twig' => 'fe10f094b0caff314d63842bd332cfb3',
+        'item-list--search-results.html.twig' => '2a49384b04f845908781fad1691c5e38',
         'table.html.twig' => '8a3c6dc67452ec6372d56cfb496c711d',
         'forum-list.html.twig' => '62bf16f84cc75748df38a6721f9c6315',

1 fail in #191 just because of core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php changed, and hash does not match. simply changing the file hash (md5) in the test does not fix it. The other tests will break. So options are

  1. Revert the change to tem-list--search-results.html.twig
  2. Fix the test(s)
+++ b/core/themes/classy/templates/dataset/item-list--search-results.html.twig
@@ -13,7 +13,7 @@
  * - attributes: HTML attributes to be applied to the list.
  * - empty: A message to display when there are no items. Allowed value is a
  *   string or render array.
- * - context: An list of contextual data associated with the list. For search
+ * - context: A list of contextual data associated with the list. For search

I'd set back to needs review

jungle’s picture

Status: Needs review » Postponed

@xjm: Yeah, I think postponing it is a good idea. It's the kind of issue that we would make a late beta target, and schedule the commit on a certain day, because it changes many lines in many places. We could also split it into comments only, like with the duplicate word issue, to make it safer to backport and easier to commit.

Let's postpone it or split it into small ones.

jungle’s picture

jungle’s picture

Status: Postponed » Needs review
FileSize
222.11 KB
810 bytes

As Classy was removed in 9.x, and I have no idea how to fix the hash tests easily, so just reverted the change to core/themes/classy/templates/dataset/item-list--search-results.html.twig to get the tests passed and sizing the current window. we can fix it in a separate issue if necessary

Status: Needs review » Needs work

The last submitted patch, 200: 2851394-200.patch, failed testing. View results

jungle’s picture

Just tested that the failed test passed on my local. It seems a random tests failure. Queued and check back later.

jungle’s picture

Status: Needs work » Needs review
clayfreeman’s picture

Status: Needs review » Needs work

This was quite an exhausting review, so let me know if I've missed anything or missed discussion on how some things should be handled.

  1. +++ b/core/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
    @@ -3,7 +3,7 @@
    + * Defines an AJAX command to open content in a dialog in an off-canvas dialog.
    

    This sentence is a bit clunky; is the content being opened in a dialog or an off-canvas dialog (or a dialog in an off-canvas dialog)?

  2. +++ b/core/lib/Drupal/Core/Config/Entity/Query/Query.php
    @@ -59,7 +59,7 @@ public function __construct(EntityTypeInterface $entity_type, $conjunction, Conf
    +   * placeholders (*) to match all keys of a subarray. Let's take the follow
    

    following*

  3. +++ b/core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php
    @@ -3,7 +3,7 @@
    + * Provides an interface to get an instance of a class with dependency injection.
    

    This line now breaks the 80 character wrap guide. Consider adjustment?

  4. +++ b/core/lib/Drupal/Core/Render/Element.php
    @@ -56,7 +56,7 @@ public static function child($key) {
        * not start with a '#'. See drupal_render() for details.
    

    This really depends on how one pronounces #; "hashtag," "pound sign," or "octothorpe?"

    I believe "hashtag" or "pound sign" are most common; so this is probably fine.

  5. +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
    @@ -407,7 +407,7 @@ public function testWidgetElement() {
    +    // If the field has at least an item, the table should be visible.
    

    This comment doesn't make complete sense in this context, as visibility isn't being verified.

    Aside from that, it's much easier to read "If the field has at least one item, ..." rather than how it's currently written.

  6. +++ b/core/modules/help/tests/src/Functional/HelpTest.php
    @@ -85,7 +85,7 @@ public function testHelp() {
    +    // Ensure that module which does not provide a module overview page is
    

    The grammar is a bit rough here; maybe "Ensure that a module which does not provide a module overview page is handled correctly."

  7. +++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
    @@ -34,7 +34,7 @@ abstract class EntityTestMapFieldResourceTestBase extends EntityResourceTestBase
    +   * The complex nested value to assign to an @FieldType=map field.
    

    If we expect "@" to be pronounced, this is fine, but if we just pronounce the annotation object, this needs to be fixed.

  8. +++ b/core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php
    @@ -131,7 +131,7 @@ public function testModuleStatusChangeSubtreesHashCacheClear() {
    +    // The ID of an (any) admin menu link.
    

    This is confusing at first. Might consider rewriting.

  9. +++ b/core/modules/tour/src/Plugin/tour/tip/TipPluginText.php
    @@ -71,7 +71,7 @@ public static function create(ContainerInterface $container, array $configuratio
    +   * Returns an ID that is guaranteed uniqueness.
    

    I'd rewrite to say:

    Returns an ID that is guaranteed to be unique.

  10. +++ b/core/modules/views/src/Plugin/views/argument_validator/Entity.php
    @@ -51,7 +51,7 @@ class Entity extends ArgumentValidatorPluginBase {
    +   * Constructs a \Drupal\views\Plugin\views\argument_validator\Entity object.
    

    This can probably go either way, but I read this as "Constructs an Entity object" in my head (without the namespace).

  11. +++ b/core/scripts/run-tests.sh
    @@ -925,7 +925,7 @@ function simpletest_script_command($test_id, $test_class) {
    + * In case an (e.g., fatal) error occurs after the test site has been fully setup
    

    Consider moving the parenthetical after the article-adjoining word: "In case an error (e.g. fatal) occurs ..."

dipakmdhrm’s picture

Issue tags: +DIACWApril2020
dipakmdhrm’s picture

shimpy’s picture

Assigned: Unassigned » shimpy

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

ridhimaabrol24’s picture

Assigned: shimpy » Unassigned
Status: Needs work » Needs review
FileSize
222.11 KB
4.08 KB

Fixed suggestion given on #204

ridhimaabrol24’s picture

Patch uploaded for Drupal 9.1

jungle’s picture

Status: Needs review » Needs work

Thanks @ridhimaabrol24!

+++ b/core/lib/Drupal/Component/Utility/Html.php
@@ -45,7 +45,7 @@ class Html {
+   *   tag. That tag only makes sense in an HTML-served-as-HTML context, in which

+++ b/core/lib/Drupal/Core/Database/Query/ConditionInterface.php
@@ -48,10 +48,10 @@
+   *   also be a SelectInterface or an array of SelectInterfaces. If $operator is
+   *   a unary operator, e.g. IS NULL, $value will be ignored and should be null.

+++ b/core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php
@@ -3,7 +3,7 @@
+ * Provides an interface to get an instance of a class with dependency injection.

+++ b/core/modules/big_pipe/src/Render/BigPipe.php
@@ -76,7 +76,7 @@
+ *     asset libraries again. An HTML page can have multiple AJAX responses, each

+++ b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
@@ -176,8 +176,8 @@ protected function doProcessPlaceholders(array $placeholders) {
+   *   Whether the placeholder is safe for use in an HTML attribute (in case it's

@@ -229,8 +229,8 @@ protected static function createBigPipeJsPlaceholder($original_placeholder, arra
+   *   Whether the placeholder must be safe for use in an HTML attribute (in case

+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -246,7 +246,7 @@ public function tokenizeValue($value, $row_index) {
+   * Should the output of the style plugin be rendered even if it's an empty view.

+++ b/core/scripts/run-tests.sh
@@ -908,7 +908,7 @@ function simpletest_script_command($test_id, $test_class) {
+ * In case an error (e.g., fatal) occurs after the test site has been fully setup

+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php
@@ -79,13 +79,13 @@ public function testEntityReferenceAutocompletion() {
+    // Try to autocomplete an entity label with both a comma, a slash and markup.

Over 80 chars

ridhimaabrol24’s picture

Assigned: Unassigned » ridhimaabrol24

Thanks for the review @jungle. Will submit a patch after fixing these.

thalles’s picture

Looks me that #210 needs reroll

ridhimaabrol24’s picture

Assigned: ridhimaabrol24 » Unassigned
Status: Needs work » Needs review
FileSize
210.09 KB
9.21 KB

Fixed lines exceeding 80 chars as suggested in #211 and also re-rolled the patch. Please review.

thalles’s picture

Thanks @ridhimaabrol24!

quietone’s picture

Status: Needs review » Needs work
+++ b/core/tests/Drupal/Tests/Core/Form/FormStateTest.php
@@ -120,7 +120,7 @@ public function providerTestSetErrorByName() {
+      // Do not limit a validation, and, ensure the first error is returned

This caught my eye. Searching the issue I found #115.8 suggesting a improvement.

ravi.shankar’s picture

Status: Needs work » Needs review
FileSize
210.96 KB
711 bytes

This patch might address comment #216.

mmatsoo’s picture

Status: Needs review » Needs work

I was reviewing https://www.drupal.org/files/issues/2020-05-29/2851394-217.patch and noticed that the lines below are mistakenly changing "a" (correct) to "an" incorrect.

```
@@ -642,7 +642,7 @@ public function testDatelistWidget() {
$field_name = $this->fieldStorage->getName();
$field_label = $this->field->label();

- // Ensure field is set to a date only field.
+ // Ensure field is set to an date only field.
```

The original "// Ensure field is set to a date only field." is grammatically correct.

nitvirus’s picture

Assigned: Unassigned » nitvirus

Asssigning this to myself

nitvirus’s picture

Removing this code as per last comment

```
@@ -642,7 +642,7 @@ public function testDatelistWidget() {
$field_name = $this->fieldStorage->getName();
$field_label = $this->field->label();

- // Ensure field is set to a date only field.
+ // Ensure field is set to an date only field.
nitvirus’s picture

Assigned: nitvirus » Unassigned
Status: Needs work » Needs review

Unassigned this and changing the status to needs review.

jungle’s picture

Status: Needs review » Needs work

Thanks, @nitvirus! But it's totally wrong based on the interdiff in #220

Just need to revert the change below as #218 pointed. not REMOVE it from the patch file!

@@ -642,7 +642,7 @@ public function testDatelistWidget() {
$field_name = $this->fieldStorage->getName();
$field_label = $this->field->label();

- // Ensure field is set to a date only field.
+ // Ensure field is set to an date only field.
mrinalini9’s picture

Status: Needs work » Needs review
FileSize
210.59 KB

I have rerolled patch #217 as it's no longer applicable and also reverted changes as mentioned in #222, please review.

mmatsoo’s picture

I reviewed the patch from #223 and found some grammatical errors that I fixed in the patch I have added. Hopefully the interdiff tells that tale.

Otherwise I made it through the entire patch to confirm that the changes from "a" to "an" and vice versa now look good.

mmatsoo’s picture

Oops, my last patch had junk in it that was not necessary. Re-rolled and added again, along with the same, but renamed interdiff.

mmatsoo’s picture

quietone’s picture

Status: Needs review » Needs work

@mmatsoo, thanks for updating the patch.

I have only looked at the interdiff and found that, sadly, all of the changes are out of scope, that is they are doing things other than change 'a' to 'an'. Looking back I see that in #224 that grammatical errors were fixed. While they may be correct they need to done in a separate issue so that so the change can be made throughout core. There will be policy about that on d.o but I can't find it right now.

+++ b/core/modules/system/tests/src/Functional/Form/ElementTest.php
@@ -198,7 +198,7 @@ public function testRequiredFieldsetsAndDetails() {
-   * Tests a form with a autocomplete setting..
+   * Tests a form with an autocomplete setting..

Sorry, this looks out of scope.

+++ b/core/modules/views/tests/src/Unit/ViewsDataTest.php
@@ -480,7 +480,7 @@ public function testCacheCallsWithWarmCacheAndDifferentTable() {
-   * Tests the cache calls for a not existing table:
+   * Tests the cache calls for a nonexistent table:

This word change is made in several places.

This too looks out of scrope

+++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php
@@ -48,9 +48,9 @@ public function testAjaxElementValidation() {
-    // The AJAX request/resonse will complete successfully when an InsertCommand
...
+    // The AJAX request/response will complete successfully when an

Not sure why this was changed. The line was 80 characters long. Am I not seeing something?

nitesh624’s picture

Assigned: Unassigned » nitesh624

Assigning to myself and i will work on this today

nitesh624’s picture

Removed the out of scrope changes in #225

nitesh624’s picture

Status: Needs work » Needs review
nitesh624’s picture

Assigned: nitesh624 » Unassigned
mmatsoo’s picture

@quietone Thanks for the explanation about things being out-of-scope. I guess I got all caught up fixing other things I noticed along the way.

Regarding your question about line length, I corrected the spelling of "response". (It originally was "resonse" and I wondered if it was intentionally misspelled to keep the line length at 80 characters.) That pushed the line even longer, so I moved "InsertCommand" to a new line.

Swapnil_Kotwal’s picture

mmatsoo’s picture

@nitesh624 The interdiff for your patch has a lot of stuff not involved with reversing the changes I made in #225

I have re-rolled my patch to reverse the out-of-scope changes I introduced in #225

It should now be back to the state of where @mrinalini9 had it in #223

The interdiff shows the difference from 225 to 234. It adds back grammatical errors, but they are considered out-of-scope for this issue so back in they go.

shaktik’s picture

Assigned: Unassigned » shaktik
Status: Needs review » Needs work

The patch is no longer to apply, so I am working on it.

shaktik’s picture

Assigned: shaktik » Unassigned
Status: Needs work » Needs review
FileSize
208.19 KB

rerolled patch #234, Kindly check.

markdorison’s picture

Issue summary: View changes
Status: Needs review » Needs work
FileSize
4.76 KB

I created an interdiff between #234 and #236. Of the new changes that were added, a number of which are not valid.

I have updated the ticket description to note that the selection of a/an is not based on the succeeding letter, but the phonetics of the following word. For example, "an HTML page" is correct, despite "HTML" beginning with an "H" since we pronounce it "aitch tee em el" not "haitch tee em el."

shaktik’s picture

Hi @markdorison,

Thanks for the review.

I think you have created reverse direction interdiff patch because already updated on "an HTML page" and

+   * Helper function that returns an empty .po file., +   * Retrieves a unique ID from a given sequence.
, 

in 234 and 236 patch. I have fixed new thing. Kindly check.

shaktik’s picture

Status: Needs work » Needs review
sanjayk’s picture

Assigned: Unassigned » sanjayk
sanjayk’s picture

Assigned: sanjayk » Unassigned

Patch applied successfully and also pass test cases.

asishsajeev’s picture

Assigned: Unassigned » asishsajeev
asishsajeev’s picture

Status: Needs review » Reviewed & tested by the community

The Patch applied successfully. Thanks for the patch.

asishsajeev’s picture

Assigned: asishsajeev » Unassigned
jungle’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs reroll.

ankithashetty’s picture

Assigned: Unassigned » ankithashetty
ankithashetty’s picture

Assigned: ankithashetty » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
207.46 KB
49.69 KB

Re-rolled the patch in #238... Kindly review.

Thank you!

sarvjeetsingh’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied cleanly to the latest pull of 9.1. There were no errors found related to the use of 'a' and 'and' in the submitted patch. Moving it to RTBC.

catch’s picture

Status: Reviewed & tested by the community » Postponed
Issue tags: +8.1.0 beta target

This touches a lot of files which is likely to be disruptive for other patches, so let's aim to schedule commit towards the end of the 8.1.x beta.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Pasqualle’s picture

Issue tags: -8.1.0 beta target +beta target

8.1.0 beta?

Pasqualle’s picture

Version: 9.2.x-dev » 9.1.x-dev
xjm’s picture

Title: Fix grammar 'a' to 'an' when necessary » [NEEDS SCHEDULING] Fix grammar 'a' to 'an' when necessary
longwave’s picture

Status: Postponed » Needs work
Issue tags: +Needs reroll

We are in the beta window now, so it would be a good time to get this rerolled again and then reviewed if we are to get this done for 9.1.0.

anmolgoyal74’s picture

Status: Needs work » Needs review
FileSize
208.34 KB

Re-rolled

longwave’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll

This is looking really good, lots of little fixes here. I read through the whole patch and noted a handful of minor problems:

  1. +++ b/core/lib/Drupal/Component/Utility/UrlHelper.php
    @@ -242,14 +242,14 @@ public static function isExternal($path) {
    +   *   Exception thrown when either $url or $bath_url are not fully qualified.
    

    Maybe out of scope but there is a typo here - $bath_url should be $base_url.

  2. +++ b/core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php
    @@ -63,7 +63,7 @@ class ImageToolkitOperation extends Plugin {
    -   * The string should be wrapped in a @Translation().
    +   * The string should be wrapped in an @Translation().
    

    Not sure this needs "a" or "an", it doesn't read well either way.

  3. +++ b/core/modules/help/tests/src/Functional/HelpTest.php
    @@ -89,7 +89,7 @@ public function testHelp() {
    +    // Ensure that module which does not provide a module overview page is
         // handled correctly.
    

    This should be "Ensure that a module which..."

  4. +++ b/core/modules/media/src/IFrameUrlHelper.php
    @@ -61,7 +61,7 @@ public function getHash($url, $max_width = NULL, $max_height = NULL) {
    -   * Checks if an oEmbed URL can be securely displayed in an frame.
    +   * Checks if an oEmbed URL can be securely displayed in a frame.
    

    I think this one should actually be "..in an iframe".

  5. +++ b/core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestMapFieldResourceTestBase.php
    @@ -29,7 +29,7 @@ abstract class EntityTestMapFieldResourceTestBase extends EntityResourceTestBase
    -   * The complex nested value to assign to a @FieldType=map field.
    +   * The complex nested value to assign to an @FieldType=map field.
    

    I think "a" is correct here? We could perhaps also drop the @FieldType bit and just say "...assign to a map field".

  6. +++ b/core/scripts/run-tests.sh
    @@ -908,10 +908,10 @@ function simpletest_script_command($test_id, $test_class) {
    + * In case an error (e.g., fatal) occurs after the test site has been fully
    

    I think this could just say "In case a fatal error occurs...", the "e.g." part is out of place and I'm not sure what other type of error might happen to cause this - it doesn't give any hints.

jungle’s picture

Status: Needs work » Needs review
FileSize
214.81 KB
11.18 KB

Addressing #256

  1. #256.2, be wrapped in an @Translation(), omitted an or a in 3 occurrences -- Could it be be wrapped in the @Translation(), the is omittable?
  2. #256.4

    I think this one should actually be "..in an iframe".

    More occurrences replaced.

jungle’s picture

Version: 9.1.x-dev » 9.2.x-dev
FileSize
904 bytes
214.84 KB
+++ b/core/modules/help/tests/src/Functional/HelpTest.php
@@ -89,7 +89,7 @@ public function testHelp() {
-    // Ensure that module which does not provide a module overview page is
...
     // handled correctly.

Wrapped too early, addressing

longwave’s picture

#257.1 - "be wrapped in @Translation()" is correct, there is no need for "the" here.

However, I didn't realise there were other instances of "frame" instead of "iframe", changing all of those here might be out of scope, especially in user-facing messages?

jungle’s picture

Assigned: Unassigned » jungle
Issue tags: +Needs followup
FileSize
208.52 KB
6.32 KB

#259, good point, thanks! Let me revert it, and let's do it in a separate issue, as it is UI-related. Filing the followup next.

jungle’s picture

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, this looks good now - let's try to get this in the beta window.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 260: 2851394-260.patch, failed testing. View results

jungle’s picture

Status: Needs work » Reviewed & tested by the community

Looks like a random fail, re-queued.

gaurav.kapoor’s picture

catch’s picture

Title: [NEEDS SCHEDULING] Fix grammar 'a' to 'an' when necessary » Fix grammar 'a' to 'an' when necessary
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Removing 'needs scheduling' since we're in beta right now. Needs a re-roll though.

quietone’s picture

Simple reroll. Patch failed to apply to ConfigExportImportUITest.php.

quietone’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs reroll

Beat me to it, I arrived at the same patch.

Something about this issue makes d.o super slow for me, maybe just the sheer number of comments though.

  • catch committed 1d6e7e2 on 9.2.x
    Issue #2851394 by GoZ, hgunicamp, oknate, jungle, wolffereast, tameeshb...
catch’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

  • catch committed 608d53a on 9.1.x
    Issue #2851394 by GoZ, hgunicamp, oknate, jungle, wolffereast, tameeshb...

Status: Fixed » Closed (fixed)

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