Drupal Core has some pretty atrocious spelling errors in it.
Now, on one hand, we're geeks. Why would spelling matter?
However, as part of reaching a global audience, misspelled English words are a real affront to folks whose first language isn't English.
Finding text through search/replace is also more of a challenge when not all of the words are consistently used.
It also just looks pretty amateur. If this is an enterprise system, we can't be filled with lots of stupid typos in the code.
This is an issue to look specifically at the PHP errors.
Patch from #2329703-64: [meta] Spellchecking Drupal
Comment | File | Size | Author |
---|---|---|---|
#28 | 2383871-28.patch | 35.96 KB | mgifford |
#24 | 2383871-23.patch | 36.63 KB | a_thakur |
#23 | interdiff-2383871-22-23.txt | 446 bytes | a_thakur |
#22 | 2383871-22.patch | 36.1 KB | maximpodorov |
#19 | 2383871-19.patch | 38.34 KB | rpayanm |
Comments
Comment #2
mgiffordCHOSING was corrected in another patch, so the correction in core/modules/block/block.module isn't needed:
"Once a block has been placed, it can also be moved to a different region by choosing a region from the Region dropdown menu on the Block layout page, or by dragging and dropping it to the right position."
Comment #3
jhodgdonFollowing on comments by @alexpott in the parent issue...
It seems to me that spelling errors in test modules and test classes are very minor problems.
On the other hand, spelling errors that are displayed in Drupal sites are real problems.
So can we perhaps separate this out into two issues/patches: spelling errors in test code and spelling errors that are outside of tests? We can prioritize the "outside of tests" part while leaving the "in tests" part until a less disruptive time in the beta cycle.
Comment #4
mgiffordSure, this sub-issue can be broken down into more sub-issues. Certainly, errors that are displayed are worse. If someone does this I'm happy to review it. These changes have already had a lot of review though. I'd like it to be RTBC now.
Comment #7
rpayanmComment #8
mgiffordThis patch is getting smaller all the time. I think it's ready now though.
Comment #11
rpayanmagain.
Comment #13
rpayanmand again.
Comment #14
jhodgdonI read through this whole patch again. I'm a bit concerned by:
Why is this in the PHP patch and has someone tested this CSS change? Presumably this CSS has never worked, and if it wasn't needed it should probably just be removed, not spellchecked into now suddenly doing something.
This part is also a bit scary:
This is changing a form element ID and I cannot believe it was working correctly both without and with this patch. Either this piece of settings form is never accessed in a test or ... something else is wrong.
Comment #15
mgiffordI removed the CSS fragment. Agreed this isn't in the right place.
There is only one instance of 'udpate_test_username', so I have to assume it never worked and also that there is no code leveraging this test at the moment. Maybe I'm wrong though.
Still, I don't see how fixing this will cause a problem.
Comment #17
mgiffordComment #19
rpayanmComment #20
maximpodorov CreditAttribution: maximpodorov commentedLooks correct. Most changes are test messages (and test method names) now, and the rest are trivial changes. Anyway, after applying the last patch, new iteration of spell checking can be performed to find the new and missing typos.
Comment #22
maximpodorov CreditAttribution: maximpodorov commentedThe patch is re-rolled.
Comment #23
a_thakur CreditAttribution: a_thakur as a volunteer and at Material commentedoverridden was misspelled in core/modules/simpletest/src/TestBase.php, fixed it in the new patch.
interdiff attached as well.
Comment #24
a_thakur CreditAttribution: a_thakur as a volunteer and at Material commentedComment #25
a_thakur CreditAttribution: a_thakur as a volunteer and at Material commentedComment #28
mgiffordThe spelling error in core/modules/config/src/Tests/ConfigDependencyTest.php was corrected. Here's a re-roll for the rest.
Comment #30
AohRveTPV CreditAttribution: AohRveTPV commentedInitially I don't see why the patch would cause that fail.
Comment #32
AohRveTPV CreditAttribution: AohRveTPV commentedAre grammatical errors within the scope of this patch? If so, in the patched code: "invalidate" -> "invalid"
Comment #33
AohRveTPV CreditAttribution: AohRveTPV commentedOK to set this to RTBC?
Comment #35
xjmThanks all for your work on this!
Just a not that I disagree with "atrocious" spelling errors -- none of these are user-facing, and most of them are only in test code. So for the most part this is a minor issue. It also requires very careful review to ensure that none of the changes are introducing regressions, and I'd prefer not to be doing this during this phase of the release cycle, even though it's technically mostly unfrozen. However, the patch is ready, and I've reviewed it carefully, so I decided to go ahead with it since this has a higher chance of disruption during RC or a patch release than other cleanups of this nature. And, after all, the spelling errors are irritating and a bit embarrassing. :)
Going forward, though, let's always do a beta evaluation and consider what the impact vs. the disruption of a minor change is, and whether it's worth the resources during the beta. (For reference, it took me 20 minutes to review this and make sure it wasn't breaking anything.)
A few notes from my review follow:
But if "llama" with two Ls is cool, isn't three Ls even cooler? ;)
Fixing spelling errors in variable names is a prioritized change (though small impact here). I grepped to confirm there were no other instances of
display_submtited
. This is the one change in this patch that is indeed prioritized for the beta, I think.It raised a red flag for me that I only see this variable changed where it's defined, but
$options
isn't actually used. Only$name
is. It might be better asarray_keys($display->getComponents()
-- but that would be out of scope. So this change is okay.Another misspelled variable name. I confirmed there are no other instances of
first_
norsecond_occurance
.Another misspelled variable. I grepped to confirm there are no other instances of
date_formater
.Misspelled method name used only within this test. I confirmed there are no other
assertSuccessfullUninstall
.Committed and pushed to 8.0.x. Thanks everyone for your attention to detail with this issue. :)
Comment #36
maximpodorov CreditAttribution: maximpodorov commentedHalleluiah! Let's go back to 7.x in #2329703: [meta] Spellchecking Drupal!
Comment #37
Pere OrgaSee #2494313: Follow up to Spellchecking Drupal - PHP
Comment #38
mgiffordThat's great @xjm - glad to see this is fixed. Your Lllama comment made me think of the "I'm a llama, you're a llama song" with the hand gestures.
With #35.3 where the variable is defined "but $options isn't actually used." have you opened up a new issue for that or would you like me to do that.