Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2014 at 17:30 UTC
Updated:
2 May 2019 at 03:39 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
attiks commentedMore: ag '\bhe\b' core --ignore=vendor
Comment #2
attiks commentedMore added:
- ag '\bshe\b' core --ignore=vendor
- ag '\bher\b' core --ignore=vendor
Comment #3
nielsonm commentedPatch no longer applies.
Comment #4
nielsonm commentedRerolled and added some new edits.
Comment #5
nielsonm commentedComment #6
mark_fullmerI think it would be preferable, when possible, to avoid number disagreement in pronouns ("user" = singular, "their" = plural).
Current: A module developer has to tag their backend service with "backend_overridable":
Proposed: A module developer has to tag the backend service with "backend_overridable":
Current patch: of node_access_rebuild() lets the user perform their changes and actually
Proposed: of node_access_rebuild() lets the user perform changes and actually
and so on...
Comment #7
mark_fullmerComment #8
mark_fullmerComment #9
mark_fullmerComment #11
frankfarm commentedI'm pleased that this issue exists and that we are working to resolution for it.
I have reviewed the issue and find the rationale and patch to be sound.
At first I wondered if the construction of "s/he" was easily understood by those who understand English but are not native English speakers, but "s/he" is defined at:
http://www.merriam-webster.com/dictionary/s/he
http://www.dictionary.com/browse/s-he?s=t
so I am guessing that it should be fine.
Comment #12
catchCompletely agreed with cleaning this up.
However, in general we use 'they/their' as a singular gender-neutral pronoun rather than he/she or s/he which is quite clunky. I very rarely see he/she in text written in the past 5 years, and while they/their has got more popular recently, it's also been used for decades/centuries in English so the singular/plural ambivalence shouldn't be a problem in practice.
Comment #13
alexpottIt is also in the style guide for Drupal.org - see https://www.drupal.org/drupalorg/style-guide/words-phrases
Comment #19
alexpottUsed
\s(s?he|him|her)\sComment #20
alexpottOne thing we can't change is the GPL v2 license which says:
This is unnecessarily binary. But we need to file an issue against the GPL.
We also have some test text that uses he or she but is not help text and so can be ignored. I've changed one because
...and she could take it awayseems odd and makes me ask why? Also madeAll the faith he had had had had no effect on the outcome of his life.not gendered because again not sure why.Comment #21
alexpottWhoops
Comment #22
alexpottI think this one could do with finessing.
This comment is weird because it does not reflect what is actually tested for. Probably should have a followup.
Comment #23
quietone commentedThe title caught my eye so had a read of the patch. Sorry, no suggestions for the two point in the previous comment.
Removing a comment caught my eye. This is in a test setup and not complicated, so it just takes a moment longer to parse the code. That is ok here, I think.
s/is/is in/ ?
Comment #25
alexpottDiscussed #22.1 IRL with @justafish and they pointed out that
to their changesis superfluous language.Fixed #23 too.
Comment #26
alexpottI've opened #3021247: Bypass workspace access permission is not working as expected for the workspace test issue.
Comment #27
quietone commentedReviewed the changes since my last review in #23. The one issue I raised that needed a fix has been fixed, and the two from #22 has been addressed as well. One is fixed and the other has a followup.
This is good to go.
Comment #28
alexpottWorking on a sniff for coder and have improved the regex to
(^|\W)(he|she|him|his|her|hers)($|\W)this results in a new patch.Comment #29
alexpottI've opened #3021632: Add a sniff to find unnecessarily gendered language in code comments so we can automatically check and don't regress.
Comment #31
alexpottA comment from @aburke626 on slack prompted me to realise there is also
(^|\W)(woman|man|boy|girl)($|\W).That finds:
Where I think we could introduce some diversity into our super hero examples.
And it also finds a view with an option
which is unnecessarily binary. Given that that is test change I'm going to file a separate issue to address that.
Comment #32
dawehnerNice!
s/in/an
I like how this improves the overall readability.
Comment #33
alexpottThanks for the review @dawehner re #2 - funnily enough something can be in error and something can be an error :) However I've totally rewritten comment because it is unnecessary wordy.
I've also replaced the superheroes. I don't feel that we could ever come up with a list that is truly diverse and have it be useful documentation therefore I've gone for shapes and colours.
Comment #34
alexpottI've also checked for guy and guys - not found in our codebase.
Comment #35
mayaslatinek commentedPatch provided by @alexpott applies without problems; in the section shown in the image below I'm guessing it doesn't have to be so many had words right?

Comment #36
alexpott@Mark Slatinek it's about how many times
hadcan appear in a sentence and it still be a proper english :) see https://english.stackexchange.com/questions/139436/all-the-faith-he-had-...Comment #37
mayaslatinek commentedOhh okay didn't know that, thank you for the info :)
Comment #39
alexpottOk so now that coder has a rule and we've updated coder in core we can apply the rule to make sure we don't regress. Nice.
It'd be great to get this to rtbc and fixed in 8.8.x because these comments are completely unnecessarily written this way. And whilst our code comments are only a small part of how we welcome people to Drupal development there is no reason for them to unnecessarily exclusive.
Comment #40
alexpottI've run phpcs with this patch applied and there are no errors. I added a "He" to a comment in the code base and re-ran and saw:
Comment #41
tim.plunkettGlad to see this cleaned up and with the rule added
Comment #42
catchCommitted 615123f and pushed to 8.8.x. Thanks!