Updated: Comment #102
Note this patch should be committed during the "Disruptive Patch Workflow" cycle as it's a low-priority patch that makes lots of changes to comments in many different files.
Problem/Motivation
Both "email" and "e-mail" are used in interface strings, documentation, etc. AP Style-guide and a variety of places suggest email, and current English spell checkers are preferring email too, but the Drupal style guide currently prefers e-mail. See also comments #3, #5, #11, #26, #37, #39, #40, and #41.
Proposed resolution
Update the style guide to reflect a preference for email and change all the strings to email for consistency.
Remaining tasks
1. Get consensus on the policy (done!).
2. Make a patch (done!).
3. Review patch. Verify no more e-mail exists in Core and that grammar around email is correct. (done, but should be double-checked before commit with grep -r --exclude-dir=.git 'e-mail' /path/to/core
) (done!).
Original report by zirvap
Both "email" and "e-mail" are used in the inteface strings. I couldn't find any text style guide for code, but the documentation style guide says "e-mail" so I guess that's a good reason to stick with that for interface text as well.
I found 18 instances of "email" (not counting "%email", of course) in beta-2 when searching on localize.drupal.org.
Comment | File | Size | Author |
---|---|---|---|
#116 | drupal-email-standardization-950534-2b31335-116.patch | 161.85 KB | mgifford |
#107 | Selection_005.png | 23.68 KB | mgifford |
#105 | drupal-email-standardization-950534-2b31335-105.patch | 169.16 KB | mparker17 |
Comments
Comment #1
Sree CreditAttribution: Sree commentedwe can make "e-mail" consistent throughout the complete interface.
Comment #2
webchickIMO we don't do this kind of polish anymore, that was for December 2009's freeze.
It's a good idea though to standardize on something.
Comment #3
yoroy CreditAttribution: yoroy commentedhttp://en.wikipedia.org/wiki/Email#Spelling suggests 'email' is the way to go: AP Stylebook and Yahoo style guide are cited as resources there.
Comment #4
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedemail +1
Comment #5
wmostrey CreditAttribution: wmostrey commentedThe content style guide for drupal.org states that we should use "e-mail" over "email" or "mail". The attached patch does just that.
Comment #6
theMusician CreditAttribution: theMusician commentedI have refreshed the patch wmostrey posted to work with the current version of the 8.x branch. I followed Randy Fay's excellent walk through on doing so, http://randyfay.com/content/refreshing-stale-patch-git.
Comment #8
theMusician CreditAttribution: theMusician commentedAttempt #3. It looks like prior to my patch creation I improperly committed a difference between the branches due to the staleness of the patch.
Comment #9
_vid CreditAttribution: _vid commentedI just tested theMusician's patch and it worked great with the current version of D8.
For anyone else that wants to review the patch (and you're new to review patches like I am) here were my steps:
email, etc.'Comment #10
theMusician CreditAttribution: theMusician commentedI applied the patch to the latest dev code and it applied cleanly.
Nice work everyone.
Comment #11
sun"e-mail" is definitely correct, yeah.
Invalid re-addition of already removed code. Make sure your HEAD is up to date.
Comment #12
theMusician CreditAttribution: theMusician commentedUpdated HEAD as of this morning. Refreshed the original patch again. Applied cleanly, after manually cleaning up a bunch of merge conflicts, to fresh pull of 8.x HEAD.
Comment #14
theMusician CreditAttribution: theMusician commentedDoh! I missed a merge marker.
Comment #16
theMusician CreditAttribution: theMusician commentedWow, this has been a difficult day. I followed this nice writeup, to figure out what assertRaw() does.
It looks at the raw output of the HTML, and since the patch changes that output earlier, it caused the 1 failure in the test suite.
3rd time is the charm. (I hope :) )
Comment #17
theMusician CreditAttribution: theMusician commentedTest the patch.
Comment #18
Lars Toomre CreditAttribution: Lars Toomre commentedSince #16 turned green, I did a bit more of a nit-picky review of this patch. Here is what I noticed if this patch gets re-rolled again. Otherwise this patch looks good.
This new comment exceeds 80 characters. Maybe change to 'show/hide'?
Should be 'Returns' instead of 'Return'.
This comment should be rewrapped to better fit in 80 characters.
This comment also should be rewrapped.
Comment #19
theMusician CreditAttribution: theMusician commentedThanks @Lars Toomre. I used your suggestions to update the comment wrapping. However, for the last one you mentioned in user.module I didn't see a way to enhance the wrapping so I left that one as is.
Please let me know if there are other issues with the patch.
Comment #20
sunHrm, looks like I'm too late. The additional changes suggested in #18 are scope-creep, since none of them is caused by this patch.
Please only change "email" to "e-mail" in this patch, nothing else.
No reason to undo the few additional changes now. But in general, it is highly recommended to verify and ensure that the scope of an issue and change proposal is and remains focused and limited.
This looks RTBC to me, but I'll let someone else review and confirm.
Comment #21
Lars Toomre CreditAttribution: Lars Toomre commented@sun re: #21 - In the documentation clean-up patches, we were urged to fix other documentation problems on the exact lines of documentation we were touching. Hence, I do not think that the changes in #18 were scope creep.
Comment #22
Lars Toomre CreditAttribution: Lars Toomre commentedI have reviewed once again all of the changes in this patch and all are appropriate. I did not check if any other stings of 'email' remain in core. However, I trust that others have. RBTC for the changes in #19.
Comment #23
_vid CreditAttribution: _vid commentedI also tested the patch and and confirm that it works.
You can quickly verify the change on these pages:
/admin/config
'email' found under 'Development' > 'Logging and errors'
/admin/help/openid
'email' found under: 'Uses' > 'Logging in with OpenID'
/admin/help/search
'email' found under 'Uses' > 'Searching content and users'
Comment #24
_vid CreditAttribution: _vid commentedI did a search through the latest codebase and found 47 other instances of ' email' (white-space included).
I've broken them out into types: Interface Text (14), Comments (29) and XML (4). Only a few files have both interface text and comments that may need to be updated: WebTestBase.php, EmailTest.php, UserRegistrationTest.php.
I would suppose that a patch fixing the 14 'Interface Text' files and comments therein is in order.
The question I have it whether it's best to create a follow up patch to theMusician's or a new patch that encompasses all the changes.
Any feedback on other files to include is welcome as well.
Interface Text
$this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
filename="d8:core:modules:openid:lib:Drupal:openid:Tests:OpenIDRegistrationTest.php"
rangemin="2630" rangemax="2636"
$this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
filename="d8:core:modules:openid:lib:Drupal:openid:Tests:OpenIDRegistrationTest.php"
rangemin="4736" rangemax="4742"
$this->assertEqual($user->mail, 'john@example.com', t('User was registered with right email address.'));
filename="d8:core:modules:openid:lib:Drupal:openid:Tests:OpenIDRegistrationTest.php"
rangemin="12394" rangemax="12400"
$this->assertEquals('example@example.com', $bag->filter('email', '', false, FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email');
filename="d8:core:vendor:symfony:http-foundation:Symfony:Component:HttpFoundation:Tests:ParameterBagTest.php"
rangemin="6374" rangemax="6380"
...$duplicate_user->mail)), t('Supplying a duplicate email address with added whitespace displays an error...
filename="d8:core:modules:user:lib:Drupal:user:Tests:UserRegistrationTest.php"
rangemin="6442" rangemax="6448"
...<a href="@url">%name</a> was created without an email address, so no welcome message was sent.',...
filename="d8:core:modules:user:lib:Drupal:user:RegisterFormController.php"
rangemin="4555" rangemax="4561"
...t('Expected text found in @field of email message: "@expected".', array('@field' =>...
filename="d8:core:modules:simpletest:lib:Drupal:simpletest:WebTestBase.php"
rangemin="99424" rangemax="99430"
...t('Expected text found in @field of email message: "@expected".', array('@field' =>...
filename="d8:core:modules:simpletest:lib:Drupal:simpletest:WebTestBase.php"
rangemin="98756" rangemax="98762"
...t('Supplying an exact duplicate email address displays an error message'));
filename="d8:core:modules:user:lib:Drupal:user:Tests:UserRegistrationTest.php"
rangemin="6038" rangemax="6044"
'description' => 'Testing that only user with the right permission can see the email address in the user search.',
filename="d8:core:modules:user:lib:Drupal:user:Tests:UserSearchTest.php"
rangemin="487" rangemax="493"
'description' => 'Tests the form API email element.',
filename="d8:core:modules:system:lib:Drupal:system:Tests:Form:EmailTest.php"
rangemin="493" rangemax="499"
'description' => 'The {language}.langcode that the user prefers for receiving emails and viewing the site.',
filename="d8:core:modules:user:user.install"
rangemin="6412" rangemax="6418"
'description' => 'The {language}.langcode that the user prefers for receiving emails and viewing the site.',
filename="d8:core:modules:user:user.install"
rangemin="10926" rangemax="10932"
'name' => 'Form API email',
filename="d8:core:modules:system:lib:Drupal:system:Tests:Form:EmailTest.php"
rangemin="442" rangemax="448"
Comments
// Attempt to bypass duplicate email registration validation by adding spaces.
filename="d8:core:modules:user:lib:Drupal:user:Tests:UserRegistrationTest.php"
rangemin="6118" rangemax="6124"
// attributes like name and email (*sigh*). We ask for both axschema.org
filename="d8:core:modules:openid:openid.module"
rangemin="33384" rangemax="33390"
// Default display includes name and email address; if too long, the email
filename="d8:core:modules:dblog:lib:Drupal:dblog:Tests:DBLogTest.php"
rangemin="8370" rangemax="8376"
// Default display includes name and email address; if too long, the email
filename="d8:core:modules:dblog:lib:Drupal:dblog:Tests:DBLogTest.php"
rangemin="8338" rangemax="8344"
// Ensure that there is no textfield for email.
filename="d8:core:modules:contact:lib:Drupal:contact:Tests:ContactAuthenticatedUserTest.php"
rangemin="1059" rangemax="1065"
// Hide the additional settings when the blocked email is disabled.
filename="d8:core:modules:user:user.admin.inc"
rangemin="22325" rangemax="22331"
// Hide the additional settings when this email is disabled.
filename="d8:core:modules:user:user.admin.inc"
rangemin="21002" rangemax="21008"
// If configured time between notifications elapsed, send email about
filename="d8:core:modules:update:update.module"
rangemin="12696" rangemax="12702"
// If email verification is off, hide the password field and just fill
filename="d8:core:modules:openid:openid.module"
rangemin="9705" rangemax="9711"
// If the OpenID provider did not provide both a user name and an email
filename="d8:core:modules:openid:openid.module"
rangemin="29910" rangemax="29916"
// Send emails after we have the new user object.
filename="d8:core:modules:user:lib:Drupal:user:UserStorageController.php"
rangemin="7439" rangemax="7445"
// The user's status is changing; conditionally send notification email.
filename="d8:core:modules:user:lib:Drupal:user:UserStorageController.php"
rangemin="7613" rangemax="7619"
// Try to hijack the email field with a valid email.
filename="d8:core:modules:system:tests:modules:form_test:form_test.module"
rangemin="53408" rangemax="53414"
// Try to hijack the email field with a valid email.
filename="d8:core:modules:system:tests:modules:form_test:form_test.module"
rangemin="53433" rangemax="53439"
// Use the email returned by Simple Registration if available.
filename="d8:core:modules:openid:openid.module"
rangemin="9256" rangemax="9262"
Multiline Comments
* denominator of Internet email, with lines of no more than 998 characters."
filename="d8:core:modules:system:lib:Drupal:system:Tests:Mail:HtmlToTextTest.php"
rangemin="14939" rangemax="14945"
* Email messages sent using functions other than drupal_mail() will not
filename="d8:core:modules:system:system.api.php"
rangemin="61757" rangemax="61763"
* Number of emails to search for string, starting with most recent.
filename="d8:core:modules:simpletest:lib:Drupal:simpletest:WebTestBase.php"
rangemin="97892" rangemax="97898"
* obtain it through the world-wide-web, please send an email
filename="d8:core:vendor:doctrine:common:tests:NativePhpunitTask.php"
rangemin="287" rangemax="293"
* Optional number of emails to output.
filename="d8:core:modules:simpletest:lib:Drupal:simpletest:WebTestBase.php"
rangemin="99632" rangemax="99638"
* original author names and emails are not known
filename="d8:core:vendor:doctrine:common:lib:Doctrine:Common:Util:Inflector.php"
rangemin="1330" rangemax="1336"
* Outputs to verbose the most recent $count emails sent.
filename="d8:core:modules:simpletest:lib:Drupal:simpletest:WebTestBase.php"
rangemin="99569" rangemax="99575"
* Returns HTML for an email form element.
filename="d8:core:includes:form.inc"
rangemin="167742" rangemax="167748"
* SMS, Email, pager, syslog, ...etc.
filename="d8:core:modules:system:system.api.php"
rangemin="79577" rangemax="79583"
* Tests email element.
filename="d8:core:modules:system:lib:Drupal:system:Tests:Form:EmailTest.php"
rangemin="163" rangemax="169"
* Tests that name and email fields are not present for authenticated users.
filename="d8:core:modules:contact:lib:Drupal:contact:Tests:ContactAuthenticatedUserTest.php"
rangemin="630" rangemax="636"
* The email address used for initial account creation.
filename="d8:core:modules:user:lib:Drupal:user:User.php"
rangemin="2027" rangemax="2033"
* The user's email address.
filename="d8:core:modules:user:lib:Drupal:user:User.php"
rangemin="517" rangemax="523"
* The user's preferred langcode for receiving emails and viewing the site.
filename="d8:core:modules:user:lib:Drupal:user:User.php"
rangemin="1635" rangemax="1641"
XML
<lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de"
filename="d8:core:vendor:doctrine:common:build.xml"
rangemin="1937" rangemax="1943"
<lead user="guilhermeblanco" name="Guilherme Blanco" email="guilhermeblanco@gmail.com"
filename="d8:core:vendor:doctrine:common:build.xml"
rangemin="1756" rangemax="1762"
<lead user="jwage" name="Jonathan H. Wage" email="jonwage@gmail.com"
filename="d8:core:vendor:doctrine:common:build.xml"
rangemin="1663" rangemax="1669"
<lead user="romanb" name="Roman Borschel" email="roman@code-factory.org"
filename="d8:core:vendor:doctrine:common:build.xml"
rangemin="1846" rangemax="1852"
Comment #25
webchickTossing this one to Jennifer.
Comment #26
jhodgdonWell... hmm. E-mail is not a countable noun (mail isn't, so e-mail isn't), so the text should never say "e-mails". It should say either "e-mail" or "e-mail messages". For instance here:
But I guess this can be fixed in a follow-up or a different issue.
And this change:
This changes mail to e-mail -- why?
I'm uncertain as to whether that should be committed, so I'm setting this patch back to needs review for the moment.
Comment #27
theMusician CreditAttribution: theMusician commentedThanks for the discussion of this everyone and _vid for pointing out there had been many additions since the original patch created by wmostrey.
I recreated the patch with the additions found by Vid where I thought they made good sense. I did not update the string in core/modules/update/config/update.settings.yml as I am not familiar with the yaml language. It looks like it is setting an array.
I updated emails to e-mail messages as well. Thanks Jennifer. Regarding your last comment Mail is changed to E-mail to keep it consistent.
Comment #28
joachim CreditAttribution: joachim commented#27: consistent_email_950534_08.patch queued for re-testing.
Comment #30
joachim CreditAttribution: joachim commentedI figured the patch would probably no longer apply :(
Comment #31
theMusician CreditAttribution: theMusician commentedIt would have been nice if it did apply. I am guessing that there are now more variations of e-mail or just more instances of it throughout. I will see if I can set aside some time to search for e-mail and make the patch once again.
Comment #32
joachim CreditAttribution: joachim commentedIt's probably just that things that patch is trying to change have since been affected by new commits, so it doesn't apply cleanly.
IIRC there are tags to notify maintainers that a quick commit of this patch would be appreciated, before it rots again. Not sure what they are though offhand, though they may well be of use here! :)
Comment #33
jrglasgow CreditAttribution: jrglasgow commentedComment #34
jrglasgow CreditAttribution: jrglasgow commentedComment #35
theMusician CreditAttribution: theMusician commentedThanks for the tip joachim. I'll look for the tag. Is there still value in the patch? I like consistency, but do others find it needed for core?
Comment #36
erinclerico CreditAttribution: erinclerico commentedDrupalCon Portland code sprint: attempting reroll
Comment #37
jhodgdonSo.... The real question we should address before we make a patch here is:
Is our style guide being stupid to advocate "e-mail" instead of "email"? I just wonder what is considered standard in the writing industry these days. Can we do a bit of research (AP style guide, etc.) and see if we should update our standard? That choice of "e-mail" was made many many years ago.
Comment #38
erinclerico CreditAttribution: erinclerico commentedTo @jhodgdon - I think that it should be one way or the other. In this patch I have flipped everything to 'e-mail' - I can re-do this patch and flip everything back the other way should the community decide to go with 'email' - no problem!
I decided to start from scratch on this patch. This is a site-wide inventory on the strings I found suitable for replacement as of May 24 2013.
Files touched
String samples prior to patch
Limited to comments and user interface.
');
Comment #39
joachim CreditAttribution: joachim commented> I just wonder what is considered standard in the writing industry these days. Can we do a bit of research (AP style guide, etc.) and see if we should update our standard? That choice of "e-mail" was made many many years ago.
From http://en.wikipedia.org/wiki/Email#Spelling:
That would seem to suggest we use 'email'.
Comment #40
star-szr+1 to updating our style guide to use 'email'.
Setting to CNW because regardless of the decision, this will definitely need a reroll :)
Comment #41
jhodgdonBefore we update the style guide, we should also file an issue in the Documentation project, because that style guide is for drupal.org documentation, and actually for content on drupal.org in general. If not everyone is on board with the idea...
Comment #42
theMusician CreditAttribution: theMusician commentedThat sounds like a great idea. I am in support of changing the strings to email. I am happy to re-roll the patch once a consensus is reached.
Great work everyone.
Comment #43
jbloomfield CreditAttribution: jbloomfield commentedSo has this been decided yet? Is it to be "email" or "e-mail" :)
Comment #44
jhodgdonHas not been decided. See #41 - we need to get broader discussion. That hasn't been done. If you want to start the broader discussion,that would be great.
Comment #45
jbloomfield CreditAttribution: jbloomfield commentedRe-rolled the latest patch.
Comment #46
ZenDoodles CreditAttribution: ZenDoodles commentedComment #48
ZenDoodles CreditAttribution: ZenDoodles commentedMoving to documentation and updating the issue summary.
(also +1 for email)
Comment #49
jhodgdonSee #44/#41. We need to have a broader discussion on this before we make patches.
Comment #50
ZenDoodles CreditAttribution: ZenDoodles commentedTagging.
Thanks @jhodgdon
Comment #51
tim.plunkettI vote email.
Also,
Comment #52
karthikkumarbodu CreditAttribution: karthikkumarbodu commentedI feel e-mail is the better choice.
Comment #53
batigolixPro: "email"
- it is more often used in our own code
- there is a trend that authors use this spelling more and more . that is why AP adapted this spelling (http://www.quickanddirtytips.com/education/grammar/e-mail-or-email)
Pro: "e-mail"
- it is our current accepted standard
- it is consistent with words like e-learning, e-economy and X-ray (http://www.future-perfect.co.uk/grammar-tip/is-it-e-mail-email-e-mail-or...)
So I have a light preference for "e-mail", but I am open to change my mind for a small fee ;)
Comment #54
dddave CreditAttribution: dddave commentedI feel like email is the more mature choice. "e-" stems from a time where anything web was futuristic stuff and seems more and more to get a negative, belittling connotation.
+1 email
Comment #55
LeeHunter CreditAttribution: LeeHunter commentedJust a quick comment that "email" versus "e-mail" is entirely a style decision which means that, generally speaking, there is no correct choice. It's usually one of those areas where you just pick one and stick with it. Having said that, the one thing that would influence me either way was some data on what Drupal users are actually using in their communications and as a search term and how the search results are impacted by using one term or another.
If you search drupal.org for "email" and "e-mail" its quite striking that "email" is the absolutely overwhelming favourite especially in the forums and issues and is even the strong favourite in the online documentation (which theoretically should be following the style guide).
Inconsistency has an impact when you're performing a search, since Solr is apparently (to my surprise) not treating the two spellings as the same term (55k hits for "email" versus about 8k for "e-mail").
So yeah, the online style guide should probably be updated to reflect the preferred usage of the vast majority of our users. How the issue should be addressed in core is outside my expertise.
Comment #56
jhodgdonThanks for that Lee!
Core documentation is (in theory) supposed to follow the on-line style guide for questions of grammar, punctuation, and usage.
So... A long time ago (well before I was involved in the Drupal project), someone made the decision to use e-mail, but it looks fairly conclusive that in existing Core docs and on-line drupal.org docs, email is now far more common than e-mail. I agree with Lee that we should update the on-line style guide to reflect the reality of the people in the Drupal project, and also make a patch for Core.
Does anyone find fault with that logic, even if your own personal preference is for "e-mail", or should we go ahead?
Comment #57
theMusician CreditAttribution: theMusician commentedI think the outlined path to a patch seems like solid logic.
Do we have to update all of the documentation first or can we roll a patch and then tackle the documentation?
Cheers
Comment #58
jhodgdonStep 1: Agree on the standards.
Step 2: Update the Style Guide document on drupal.org.
Step 3: Make a patch to fix this in Drupal 8, sometime when it would not be to disruptive to other work, because it will touch a lot of files.
Step 4 (if ever): As time goes on, update drupal.org documentation to the new style guide. As noted above, not much of the docs were following the past style guide anyway.
Comment #59
sunTwo data points:
Personally, I'm still in favor of "e-mail". I believe that various English grammar style guides are recommending it.
However, given the behavior of spell-checkers not under our control, and also, given that "Email" even managed to find its way and get accepted as a formal word in the official German lexicon/vocabulary (in exactly this spelling), it might be time to confess that we're diverging from the rest of the world by sticking with "e-mail", whether we like it or not. ;)
Comment #60
mgiffordPretty sure that @jbloomfield's patch in #45 has some other junk in it.
I don't really care how we do it as long as it is consistent.
This should be easy to implement, mind you this issue has been open since 2010, so perhaps not...
Comment #61
balagan CreditAttribution: balagan commentedThe MLP website does not even know about e-mail. Not that we could
notdiffer from that, but as a translator, I see that all big players in the IT field are changing their strings with e-mail to email (and just making me easy money as a translator ;-) ). I thought the official spelling was changed to email some years ago, but cannot find any info about that, so I guess that was just a recommendation of some groups.I would still use email, as it is the trend in the IT industry.
Comment #62
MixologicThe previous patch had way too much overshoot in it. So I went ahead and just created a new one.
If this gets in, then we should probably add a rule to the Drupal coder codesniffer that checks for E-mail and e-mail, as they will eventually make their way back into core without that check.
Comment #63
MixologicAlways more interesting with the actual patch.
Comment #65
MixologicAw yiss! Serialized blobs in testing code. My favorite.
Comment #66
jhodgdonUpdating summary and title. We need to get some more input on this idea before we can adopt it.
Please do not bother making more patches until we have reached consensus.
Comment #67
owenpm3 CreditAttribution: owenpm3 commented"Email" is the best route to go. AP Style Guide, New York Times, and Mashable--seems like Drupal ought to be on that list as well. It's definitely common usage now.
Comment #68
markhalliwellhttp://www.oed.com/view/Entry/60701
https://twitter.com/APStylebook/status/48798366980780033
http://mashable.com/2011/03/18/ap-stylebook-email/
http://grammarist.com/style/e-mail-email/
As said in prior comments, I think it's clear that the world as a whole (not really subject to personal preference anymore) has decided that this is now an actual separate word: email, not a hyphenated compound. I surmise that this global agreement is because everything is basically "electronic" now ;)
FWIW, it's also just a matter of time before we just drop the "e" as well and again just call it "mail" (there's already somewhat of a movement already).
Comment #69
davidhernandez+1 for "email". I can say that our Rutgers official editorial style guide also has it as "email".
Comment #70
mgiffordIn 2011 apparently http://mashable.com/2011/03/18/ap-stylebook-email/
Now they also mention http://mashable.com/2010/04/16/ap-stylebook-website/
For consistency would probably be good to open that up as a new issue if it isn't already. So, #2256367: Consistently use "website" instead of "web site" in Drupal Core docs and UI text
Comment #71
tvn CreditAttribution: tvn commented+1 for "email" as well, it seems to be common usage for major sites nowadays.
Comment #72
mgiffordRan into these two:
core/modules/system/tests/modules/form_test/form_test.module: '#title' => 'E-Mail address',
core/modules/system/tests/modules/form_test/form_test.routing.yml: _title: 'E-Mail fields'
So here's a new patch.
Comment #73
jhodgdonI'm not seeing any dissenting opinions. Let's give it until Tuesday next week (May 6) for further comment. If no one objects, we can then move over to reviewing the patch and editing the Style docs.
Comment #74
jhodgdonOK... No one objected, after numerous tweets and waiting, etc. I updated:
https://drupal.org/style-guide/content
https://drupal.org/node/338208/revisions/view/6995679/7271151
The patch still needs review, and probably a reroll by now.
Comment #75
jhodgdon72: drupal-email-standardization-950534-ec5b434-72.patch queued for re-testing.
Comment #77
MixologicRerolled - couple of merge conflicts fixed, noticed that we were changing 'edit-site-mail' to 'edit-sitemail' in SiteConfigureForm.php, and found a couple more e-mail examples in the user module.. not sure how those escaped the other patches..
Btw - the e19e644 in the patch filename is the commit against head that this patch applies against for future re-rollers.
Comment #78
jhodgdonSetting status so test bot will check...
Comment #80
mgifford77: drupal-email-standardization-950534-e19e644-77.patch queued for re-testing.
Comment #82
Mixologicwoot. Mergefail. Lets try that again.
Comment #83
mgiffordLooks good. This is a big patch. Good to standardize this.
Comment #85
mgiffordThat was annoying... So many paths changed (to nicer ones, but...)!
Can someone just get this into Core so someone else doesn't have to keep re-rolling this?
Comment #87
mgifford85: drupal-email-standardization-950534-2b31335-85.patch queued for re-testing.
Comment #88
jhodgdonLooking at the screen shot in #83... We should *not* be using the word "emails". Email is not a countable noun, just like mail is not a countable noun. It should be "email messages" (to refer to individual messages) or "email" (to refer to the body of mail that is being sent).
Comment #89
mgifford@jhodgdon - Let's deal with that in a new issue. I took a quick use of the term emails in this patch and it's all over the place.
I'm fine with that decision but it needs to be dealt with in another issue, this is just about standardizing by removing the "-" as far as I am concerned. I do think we'd want someone to review the changes of emails -> email to see that it makes sense in context.
There are going to be other standardization issues we'll want to deal with like #2256367: Consistently use "website" instead of "web site" in Drupal Core docs and UI text & #44987: [meta] Use the UTF-8 ellipsis character instead of "..." in the user interface. They should be simple changes to make, really... It really shouldn't take 90 comments to make this kind of change.
Comment #90
jhodgdonWell, OK, if that is what you want to do. I am not happy with this patch, but will refrain from reviewing.
Comment #91
mgiffordTo be clear, you would be happy with this patch if it addressed your concern about emails, right?
I created #2276419: [policy] Plural form of "email": "emails" vs. "email messages"
I took a quick look at a few dictionaries online. There doesn't seem to be a clear concensus about this, but certainly we should look out and reference external references.
Comment #92
thedavidmeister CreditAttribution: thedavidmeister commentedPretty weird but, there's a patch that's green that was rolled totally independently within a week of #85 at #1293108: Consistent use of email over e-mail in Drupal.
The good news is that we came to the same conclusion there "email" over "e-mail". The bad news is that it looks like some duplication of work has been going on :(
Comment #93
thedavidmeister CreditAttribution: thedavidmeister commentedFWIW, I totally agree that changing pluralisation is out of scope of this patch. If we were changing "e-mail addresses" to "emails" in the patch, I'd agree that's a mistake, but changing "e-mails" to "emails" is still a forward step and avoids scope creep for something that's been outstanding for nearly 4 years already.
Comment #94
thedavidmeister CreditAttribution: thedavidmeister commentedAlso... try googling "e-mail client". See how many matches you get.
Comment #95
mparker17I'll try to help!
Comment #96
mparker17Patch doesn't apply anymore :( Re-rolling.
Comment #97
mparker17Straight re-roll.
Comment #98
mparker17:( there's a new "e-mail" in
sites/default/settings.php
on line 614. I'll fix...Comment #99
mparker17Oops, never mind. That was *my* settings.php (which was created before applying the patch, and probably a few revisions ago) not
default.settings.php
.Given that, it looks like all instances of "e-mail" have been removed from core:
grep -r --exclude-dir=.git 'e-mail' .
now returns 0 results.Unfortunately, grammar / pluralization errors have crept in:
... there were also a bunch of variable names that referred to "emails", but they're not documentation so I don't think they count.
Comment #100
mparker17Okay, after a brief conversation with jhodgdon on IRC, it turns out that I missed that the e-mail/email issue should be reviewed to verify that e-mail/e-mails goes to email/emails only, and on that other issue we decided it was ok to have "emails".
Therefore, given that Testbot came back with a pass on the re-roll from comment 97 and there are no more instances of "e-mail" in core, this is RTBC.
Comment #101
mparker17Updating issue summary to be extra-clear that pluralization is out-of-scope.
Comment #102
mparker17Comment #103
mparker17Whoops, was looking for a "disruptive" tag but couldn't find it and forgot to remove it from the comment form :(
Comment #104
MixologicAs I pointed out in #77, we have to be careful about our global search and replaces, not all instances of *e-mail* should remove the hyphen.
Comment #105
mparker17@Mixologic, sorry :S I've removed the offending line and done a much-more-meticulous review to make sure nothing else got accidentally mutated.
As part of the more-meticulous review, I noticed this:
This got missed earlier because I forgot to pass
-i
to grep. I've re-checked withgrep -r -i --exclude-dir=.git 'e-mail' .
: there are no more instances.This form control got duplicated, probably in the re-roll. The attached patch removes it.
This was in the patch in #85, but there's already #2091359: Update hook_help for Search module to deal with that, so I've removed it in the attached patch.
Comment #106
mparker17Whoops, updating issue status.
Comment #107
mgiffordI was talking about this issue a lot yesterday at the Community Summit at DrupalCon. This is an easy one to get in. It hits so many places though we really just need to get it into Core.
Looks great!
Comment #108
chx CreditAttribution: chx commentedFor the record for dinosaurs like me: while it is true that AP used e-mail for a very, very long time they changed it in 2011.
Comment #109
mparker17This patch should be committed during the "Disruptive Patch Workflow" cycle because it's a low-priority patch that makes lots of changes to many different files (i.e.: it'll probably break a bunch of other patches), but at least in RTBC state, it'll get tested every day so we know when/if it breaks.
Comment #110
Mixologic@mparker17 - no problemo just pointing that out. It's probably because the patch pretty much had to be remade instead of rerolled in #85.
I applied this against the most recent head, and there are no other instances of E-mail in the codebase, and manually inspected all the changes -everything looks good to go.
Lets mark this RTBC,(somebody did that while I was typing...)and it will stay in the queue until such time as it no longer applies - the patch bots will notify us if it needs more re-rolls.I have also opened a related issue in the coder module to see about adding a check for e-mail to codesniffer so we can detect variances from this policy moving forward [2278995]
Comment #111
Mixologicer what just happened to that file? I definitely didnt select anything for deletion...
Comment #112
thedavidmeister CreditAttribution: thedavidmeister commentedman, i really wish that "needs review" patches also got the same re-review treatment :(
Comment #113
Mixologic@thedavidmeister: Soon. At any given time there's about 50 RTBC core patches and 1500 Needs Review patches in core alone.. so, its a bit more of a burden on the testbots to re-execute tests that frequently. That being said, there is definitely some momentum in the testbot infrastructure queue that will lead to that being a possibility. There may even someday be a "if this patch is comitted, it will break the patch on issues 1,2, and 45"
Comment #114
thedavidmeister CreditAttribution: thedavidmeister commentedI'm pretty aware of the huge number of "needs review" patches there are (there's way more than 1500 >.<), but I also know that many, many of them won't even apply to the latest head. I feel that running the testbots on the "needs review" queue would be a bit initial spam-fest of fails and then quieten down a lot once the 3+ year old patches get shaken out.
This is really off topic for this thread, but if you could link me to an issue where this infrastructure topic is being discussed I'd be grateful as I'm ++ for the direction the testbots are moving in and would love to get in the discussion.
Comment #116
mgiffordComment #117
LinL CreditAttribution: LinL commentedThis looks great.
I went through the patch itself and verified that all the changes make sense. Also applied it and then did a
grep -Ri "e-mail"
and the only occurrence is:$js = array('copyFieldValue' => array('edit-site-mail' => array('edit-account-mail')));
in
core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
as noted above.Setting to RTBC.
Comment #118
theMusician CreditAttribution: theMusician commentedThis looks really good to me. As @LinL mentioned, grepping after applying the patch returns the site-mail line from SiteConfigureForm.php which is not a valid reference for the use case we are considering.
Secondly, e-mail is used in the .git/hooks/applypatch-msg.sample and .git/hooks/pre-applypatch.sample files. However, I believe those are within any git repository and are not part of the scope of this patch.
If anyone is installing this patch on a functioning D8 install make sure to use sudo so that you can apply changes to settings.php and default.settings.php. This is not an issue for a fresh pull from git.
+1 RTBC
Comment #119
webchickOk, getting this in while it's hot.
Committed and pushed to 8.x. Thanks!
Comment #121
theMusician CreditAttribution: theMusician commentedThat feels great after nearly 3 years. Thanks @webchick for keeping tabs on this. Cheers for all that contributed to this issue.
@Jhodgdon if you would like to point me at the proper documentation pages I would gladly begin updating the docs. As far as I can tell this search would be the place to start.
https://drupal.org/search/site/e-mail?f[0]=ss_meta_type%3Adocumentation
Thanks again everyone!
Comment #122
jhodgdonThe style guide has already been updated with this change:
https://drupal.org/style-guide/content
So... As far as updating all of the Community Documentation pages to use email instead of e-mail... I don't think we need to do that right now. As time goes on, hopefully people will update pages that way, but I don't think it's worth the effort to make all the edits. Someone who wants to edit documentation pages, I think, could find better things to do (like making pages clearer, adding new documentation, etc.).
Comment #124
dcam CreditAttribution: dcam commentedClosed #1996226: Drupal is using E-mail instead of Email as a duplicate.
Comment #125
Balu ErtlIt's a 5 years old issue, but today grepping for the
/\se-mail/
regex pattern in the 8.8.x-devcore/
directory results 50+ occurrences again. (Results on Gitlab)Only maintainers of this project can reopen issues like this with status "Closed (fixed)".
May I ask any of the maintainers to reopen this issue thread so I can upload a patch to fix these strings in a one-run batch?
Comment #126
jhodgdonOpen a new issue instead, and mark this one as Related.
Comment #127
Balu ErtlThanks, so here we go: Maintain policy of using "email" instead of "e-mail" in Drupal