Problem/Motivation
Spelling errors/typos throughout PHP comments in core.
Out of scope:
- Typos not in comments (variable names, data, ...)
- Typos in vendor/ignore code files (vendor, assets, node_modules, ...)
- Incorrect type (not typo) of namespace in phpdoc (see #2859992: [PP-1] Consistent use of leading \ for class names in *.api.php files)
- Typos in {@inheritdoc} (see #2858021: fix {inheritdoc} typos)
- Typos in a/an grammar (see #2851394: Fix grammar 'a' to 'an' when necessary)
- Links to D7 docs (see #2855175: [META] Many documentation / handbook URLs redirect to D7 content)
Proposed resolution
List of words corrected (by Vaplas using PhpStorm built-in spellchecker). NB: not a full grammar check.
Remaining tasks
None?
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #77 | 2829185-77.patch | 91.53 KB | jofitz |
| #71 | interdiff_67-70.txt | 1.37 KB | anmolgoyal74 |
| #71 | 2829185-70.patch | 92.2 KB | anmolgoyal74 |
| #67 | 2829185-67.patch | 92.71 KB | anmolgoyal74 |
| #66 | 2829185-66.patch | 92.71 KB | anmolgoyal74 |
Comments
Comment #1
Anonymous (not verified) commentedvaplas created an issue. See original summary.
Comment #2
Anonymous (not verified) commentedComment #3
Anonymous (not verified) commentedI think this is my maximum)
Comment #4
mark_fullmerThere were a few items missed in the last patch:
should be *and*:
Hyphenate user-specific:
Incorrect verb use:
Properly mark machine name of permissions in text with quotes
More than 80 characters long:
Add comma after introductory phrase:
It's jQuery, not Jquery:
Use the verb "set" to match the setter method:
Comma after introductory phrase & reduce prepositions:
Avoid newspaper headline speak:
Style:
Capitalize HTML:
Hyphenate compound verb:
Avoid newspaper speak:
Hyphenation:
Offset letter in quotes:
Comment #5
Anonymous (not verified) commentedI do not know English, but #4 looks very well for me. Done. Thank you, @mark_fullmer!
Comment #6
Anonymous (not verified) commentedOh no, I did not see your patch, sorry. You are great!
Comment #7
darius.restivan commentedSpelling corrected.
Comment #9
Anonymous (not verified) commentedTwo typos gone with refactoring their files:
Comment #10
anavarreExtra whitespace here.
Comment #11
Anonymous (not verified) commented@anavarre, thanks!
Comment #12
Anonymous (not verified) commented+1 typo for our issue. Good artists copy, great artists sill :)
Comment #13
Anonymous (not verified) commentedIt seems I'm still lamer, and correctly not 'still', but 'silly' (Silly assignment). Sorry!
Comment #15
chipway commentedThanks vaplas,
I add to re-roll the patch.
I removed thema.api.php change because another patch did a better previous (conflicting) change and wording seems ok for me.
I changed also EntityAutocomplete.php patch part because the point seems to be on correcting "unambuguously" in "unambiguously", and in the following text "still" would add no meaning while "silly" is ... silly (bad in comment) ;-).
- * matches the incoming input, and sill assign form errors otherwise.
+ * matches the incoming input, and assign form errors otherwise.
Comment #16
chipway commentedNeeds work -> needs review
Comment #18
Anonymous (not verified) commented@chipway, thank you very match! I also found out that not everyone use the 8.3 for sites, despite Layouts in core. Therefore, for better sync, i isolated two typos, that appeared only in 8.3:
#1565972: Remove static caching of array in mapConditionOperator():
#2684873: ConfigurableLanguageManager::getConfigOverrideLanguage() returns NULL:
Comment #20
chipway commentedRandom test issues on XX are not related to this patch. See https://www.drupal.org/node/2832853.
Mainly concerning UpdatePathTestBase.php. See https://www.drupal.org/project/issues/drupal?text=random+fail+UpdatePath...
or ArgumentPlaceholderUpdatePathTest.php. See https://www.drupal.org/project/issues/drupal?text=random+fail+ArgumentPl...
Comment #21
chipway commentedAll tests passed today. Lets review please.
Comment #22
5hawn commentedI just applied both: d83_only-2829185-18.patch and d82_and_d83-2829185-18.patch on a local fresh install of Drupal 8.3. I then did a git diff to see the changes and can verify the spelling changes are correct.
Comment #23
5hawn commentedComment #25
amit.drupal commentedReview Patch #18 -"d83_only-2829185-18.patch" the spelling changes are correct.
I think unused comment in core/modules/language/src/Config/LanguageConfigFactoryOverride.php file .
please refer screenshot
Comment #26
cilefen commentedComment #27
xjmGreat work on this issue so far!
It seems like this is a lot more than a few spelling errors. :) Based on the core issue scope policy and the scope @catch and I identified in #2622992: Run a spellchecker against core and fix all the errors in comments, we should spellcheck all of core and fix all the straightfoward spelling errors in a single patch if possible.
It seems like this issue is on its way to accomplishing that. Can someone document what spellcheck method is being used, and document a summary of spelling errors in code comments before vs. after the patch?
Comment #28
Yasiru Nilan commentedI'm new to here here is my little change.
Comment #29
Anonymous (not verified) commented#20: @chipway, thanks for classification errors and promotion of the issue!
#22: @ws6shawn, thanks for review!
#25: @amit.drupal, thanks for offer, but I am not competent in the language of such a decision. Looks like remark 'Prior to negotiation' has sense.
#27: @xjm, thanks for pretty words! Unfortunately, I can not you happy new Spellchecker. All typos were found through a standard spellcheker tool of PhpStorm during procrastination (censor). And then tested by Google Translate.
I can do it, if I see some example.
I don't know about idea run spellchecker, great! To tell the truth, I'm a little repented for creating this issue) I thought about the quick fix (as is the case of spelling typos in comment). But it turned out that I made a lot of inaccuracies, and other developers had to spend time on this adjustment (thanks again). They have also improved the comments going beyond typos. Maybe we should bring them into a separate patch. Example:
#28: @Yasiru Nilan, thanks for this offer. We have this fix already, but you can help with review few new typos (see interdiff files).
Proof for 8.3 only typo #2569119: Use Crypt::hashBase64(), not hash('crc32b') or sha1 for placeholder tokens:
Comment #30
Anonymous (not verified) commentedComment #33
Anonymous (not verified) commentedd82_and_d83-2829185-29.patch - not correct (it has changes for only d83 too). Fix it + new typos.
Comment #34
Anonymous (not verified) commentedComment #36
Anonymous (not verified) commentedAdd a summary of spelling errors in code comments before vs. after the patch #33 (only orthography without grammar). Based on
--word-diff+ manual correct. Order by d82_and_d83, d83_only.Comment #37
wturrell commentedUse standard issue summary template.
Comment #38
wturrell commentedComment #40
Munavijayalakshmi commentedI found Typo error (The word 'messages' is misspelled as 'mesages'.) in FormValidationMessageOrderTest.php. Fixed the typo error and attached patch, please review.
Comment #41
cilefen commented@Munavijayalakshmi Usually what we need in an issue contribution is to start with the prior working patch and add the new changes.
Comment #42
cilefen commentedFor #41 and being that a new problem was discovered, this needs work.
Comment #43
jofitzPatch no longer applies so re-rolled. Tried to correct the error mentioned in #40, but cannot find FormValidationMessageOrderTest.php or the string "mesages".
Comment #45
jofitzNow rolled against the correct version. And, as if by magic, I can now see (and correct) the typo identified in #40! Time to go home, methinks...
Comment #46
prash_98 commentedWent through all the parts of the core and I think so that all the spelling errors have been corrected. So changing the status to RTBC.
Comment #47
xjmComment #48
xjmComment #50
jacobsanfordPatch still applies to HEAD. Retesting and back to RTBC as per #46.
Comment #51
cilefen commentedNice work everybody. The first thing that I do when evaluating an issue is to make sure the patch is fixing the thing mentioned in the issue title.
As noted in #29, in addition to spelling fixes there are wording changes that are not necessarily grammar fixes. That is not a problem in itself, but we want to make sure we retain the meaning of the comments. Following are two examples I saw. I do not think there are many such changes in the patch.
Comment #52
gaurav.kapoor commentedPatch in #45 failed to apply. Fixed it and improved it by taking suggestion in #51.
Comment #53
gaurav.kapoor commentedComment #54
prash_98 commentedEven this patch applies well and also has passed all the tests. So changing to RTBC. Guess it works well.
Comment #55
cilefen commentedSo that we can evaluate whether all comment typos are fixed, would someone please attach the list of allowed tech words that were added to the PHPStorm dictionary (Editor -> Spelling -> Accepted Words)? This way we can repeat the scan with and without the patch applied and we could review the list of accepted words.
Thank you!
Comment #58
dawehner@cilefen
How about committing it early but then file a follow up like #2972224: Add .cspell.json to automate spellchecking in Drupal core.
Comment #59
Anonymous (not verified) commentedI tried several times to create a dictionary per #55, but PHPStorm just disgustingly works with the dictionary. I found the saved words in some jar file they were mixed with the code 😱.
Moreover, the mixing of the case of symbols is not supported. Example, you can not add 'PATCHing' to dictionary, and such cases are many.
In addition, the use of the dictionary is greatly reduced, because in the comments there are many modified words, or glued, but they should be so.
Maybe better simply creating an issue, where everyone will add nit typos (so they do not interfere with useful patches). And before minor release just make commit.
Rough reroll of #52 (just skip all conflicts) + few more cases + updated scope in IS.
Comment #60
Anonymous (not verified) commentedComment #61
amietpatial commented#60 looks good spelling mistakes corrected.
Comment #63
anmolgoyal74 commentedAlso need to add changes from
#2989612 - Fix typos in Views UI module.
Comment #64
jofitzRe-rolled.
Comment #65
jofitzAdded change from #2989612: Fix typos in Views UI module. (the other 2 out of 3 were already included).
Comment #66
anmolgoyal74 commentedDue to some recent changes, patch does not apply:
Comment #67
anmolgoyal74 commentedIt would be better if this issue get fixed, otherwise we need to re-roll every another day.
Comment #68
longwaveIs this supposed to be "static"? "stat" does make some sense when talking about files but not sure it was what was intended here.
Comment #69
wturrell commented"Static": it's part of this issue and commit (but FWIW, I'd have guessed "state" before I looked that up…)
Comment #70
longwaveNeeds work based on #68/69
Comment #71
anmolgoyal74 commentedComment #72
longwaveI checked all the fixes in the patch and they all look good to me.
As this is such a moving target I don't believe we will ever fix all the spelling in a single issue, so I think this should be committed now and followups can be opened for any new or existing spelling issues.
Comment #75
anmolgoyal74 commented@xjm @
Just want to check if any plans to commit this to the Drupal 8.7 DEV core ?
Comment #76
alexpottNeeds a reroll :(
That's become a PHPUnit based test now.
Comment #77
jofitzRe-rolled
Comment #78
longwaveDouble checked the reroll, all good.
Comment #79
alexpottThis is a good moment to commit this patch. We have a followup to automate spellchecking in place. I t applies to 8.7.x and 8.6.x so patches will apply to both actively published branches. And the issue has been rtbc many times.
Committed and pushed 2dabd1de10 to 8.7.x and 6dfc00c0f4 to 8.6.x. Thanks!