Issue #3051548 by Rkumar, quietone, Balu Ertl, nitesh624, lauriii, pandaski, alexpott: Fix spelling of "email"

merge-requests/4232/head
Dave Long 2023-07-24 16:58:20 +01:00
parent 5823307501
commit 758cc0ecfa
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
13 changed files with 20 additions and 19 deletions

View File

@ -47,6 +47,7 @@
{ "name": "drupal", "path": "./misc/cspell/dictionary.txt"}
],
"flagWords": [
"e-mail",
"grey",
"hte",
"please"

View File

@ -452,7 +452,7 @@ EOD;
* transformed and should generally be avoided.
*
* Necessary for HTML that is served outside of a website, for example, RSS
* and e-mail.
* and email.
*
* @param string $html
* The partial (X)HTML snippet to load. Invalid markup will be corrected on

View File

@ -172,7 +172,7 @@ class MailManager extends DefaultPluginManager implements MailManagerInterface {
*/
public function mail($module, $key, $to, $langcode, $params = [], $reply = NULL, $send = TRUE) {
// Mailing can invoke rendering (e.g., generating URLs, replacing tokens),
// but e-mails are not HTTP responses: they're not cached, they don't have
// but emails are not HTTP responses: they're not cached, they don't have
// attachments. Therefore we perform mailing inside its own render context,
// to ensure it doesn't leak into the render context for the HTTP response
// to the current request.

View File

@ -14,7 +14,7 @@ related:
<h2>{% trans %}What are simple actions?{% endtrans %}</h2>
<p>{% trans %}Simple actions do not require configuration. They are automatically available to be executed, and are always listed as available on the {{ actions_page }}.{% endtrans %}</p>
<h2>{% trans %}What are advanced actions?{% endtrans %}</h2>
<p>{% trans %}Advanced actions require configuration. Before they are available for listing and execution, they need to be created and configured. For example, for an action that sends e-mail, you would need to configure the e-mail address.{% endtrans %}</p>
<p>{% trans %}Advanced actions require configuration. Before they are available for listing and execution, they need to be created and configured. For example, for an action that sends email, you would need to configure the email address.{% endtrans %}</p>
<h2>{% trans %}How are actions executed?{% endtrans %}</h2>
<p>{% trans %}In the core software, actions can be executed through a <em>bulk operations form</em> added to a view; if you have the core Views module installed, see the related topic "Managing content listings (views)" for more information about views and bulk operations.{% endtrans %}</p>
<h2>{% trans %}Configuring actions overview{% endtrans %}</h2>

View File

@ -123,7 +123,7 @@ class MailHandler implements MailHandlerInterface {
// User contact forms do not support an auto-reply message, so this
// message always originates from the site.
if (!$sender_cloned->getEmail()) {
$this->logger->error('Error sending auto-reply, missing sender e-mail address in %contact_form', [
$this->logger->error('Error sending auto-reply, missing sender email address in %contact_form', [
'%contact_form' => $contact_form->label(),
]);
}

View File

@ -499,7 +499,7 @@ class ContactSitewideTest extends BrowserTestBase {
$this->assertCount(0, $captured_emails);
$this->drupalLogin($admin_user);
$this->drupalGet('admin/reports/dblog');
$this->assertSession()->responseContains('Error sending auto-reply, missing sender e-mail address in foo');
$this->assertSession()->responseContains('Error sending auto-reply, missing sender email address in foo');
}
/**

View File

@ -36,7 +36,7 @@ class MigrateContactCategoryTest extends MigrateDrupal6TestBase {
* @param string $expected_label
* The expected label.
* @param string[] $expected_recipients
* The recipient e-mail addresses the form should have.
* The recipient email addresses the form should have.
* @param string $expected_reply
* The expected reply message.
* @param int $expected_weight

View File

@ -795,7 +795,7 @@ function file_tokens($type, $tokens, array $data, array $options, BubbleableMeta
case 'url':
// Ideally, this would use return a relative URL, but because tokens
// are also often used in e-mails, it's better to keep absolute file
// are also often used in emails, it's better to keep absolute file
// URLs. The 'url.site' cache context is associated to ensure the
// correct absolute URL is used in case of a multisite setup.
$replacements[$original] = $file->createFileUrl(FALSE);

View File

@ -166,7 +166,7 @@ class NodeTypeTranslationTest extends BrowserTestBase {
$this->drupalGet("$langcode/node/add/$type");
$this->assertSession()->pageTextContains('Translated title');
// Add an e-mail field.
// Add an email field.
$this->drupalGet("admin/structure/types/manage/{$type}/fields/add-field");
$this->submitForm([
'new_storage_type' => 'email',

View File

@ -153,13 +153,13 @@ class UserRegistrationResource extends ResourceBase {
if (!$this->userSettings->get('verify_mail')) {
if (empty($account->getPassword())) {
// If no e-mail verification then the user must provide a password.
// If no email verification then the user must provide a password.
throw new UnprocessableEntityHttpException('No password provided.');
}
}
else {
if (!empty($account->getPassword())) {
// If e-mail verification required then a password cannot provided.
// If email verification required then a password cannot provided.
// The password will be set when the user logs in.
throw new UnprocessableEntityHttpException('A Password cannot be specified. It will be generated on login.');
}
@ -174,7 +174,7 @@ class UserRegistrationResource extends ResourceBase {
*/
protected function sendEmailNotifications(UserInterface $account) {
$approval_settings = $this->userSettings->get('register');
// No e-mail verification is required. Activating the user.
// No email verification is required. Activating the user.
if ($approval_settings == UserInterface::REGISTER_VISITORS) {
if ($this->userSettings->get('verify_mail')) {
// No administrator approval required.

View File

@ -92,7 +92,7 @@ class UserPasswordResetTest extends BrowserTestBase {
$long_name = $this->randomMachineName(UserInterface::USERNAME_MAX_LENGTH + 10);
$edit = ['name' => $long_name];
$this->submitForm($edit, 'Submit');
$this->assertCount(0, $this->drupalGetMails(['id' => 'user_password_reset']), 'No e-mail was sent when requesting a password for an invalid user name.');
$this->assertCount(0, $this->drupalGetMails(['id' => 'user_password_reset']), 'No email was sent when requesting a password for an invalid user name.');
$this->assertSession()->pageTextContains("The username or email address is invalid.");
// Try to reset the password for an invalid account.
@ -501,9 +501,9 @@ class UserPasswordResetTest extends BrowserTestBase {
*/
public function assertValidPasswordReset(string $name): void {
$this->assertSession()->pageTextContains("If $name is a valid account, an email will be sent with instructions to reset your password.");
$this->assertMail('to', $this->account->getEmail(), 'Password e-mail sent to user.');
$this->assertMail('to', $this->account->getEmail(), 'Password email sent to user.');
$subject = 'Replacement login information for ' . $this->account->getAccountName() . ' at Drupal';
$this->assertMail('subject', $subject, 'Password reset e-mail subject is correct.');
$this->assertMail('subject', $subject, 'Password reset email subject is correct.');
}
/**
@ -518,7 +518,7 @@ class UserPasswordResetTest extends BrowserTestBase {
// This message is the same as the valid reset for privacy reasons.
$this->assertSession()->pageTextContains("If $name is a valid account, an email will be sent with instructions to reset your password.");
// The difference is that no email is sent.
$this->assertCount(0, $this->drupalGetMails(['id' => 'user_password_reset']), 'No e-mail was sent when requesting a password for an invalid account.');
$this->assertCount(0, $this->drupalGetMails(['id' => 'user_password_reset']), 'No email was sent when requesting a password for an invalid account.');
}
/**

View File

@ -88,7 +88,7 @@ class UserRegistrationRestTest extends ResourceTestBase {
$response = $this->registerRequest('Rick.Deckard', FALSE);
$this->assertResourceErrorResponse(422, "No password provided.", $response);
// Attempt to register with a password when e-mail verification is on.
// Attempt to register with a password when email verification is on.
$config->set('register', UserInterface::REGISTER_VISITORS);
$config->set('verify_mail', 1);
$config->save();
@ -119,7 +119,7 @@ class UserRegistrationRestTest extends ResourceTestBase {
$this->assertMailString('body', 'Your application for an account is', 2);
$this->assertMailString('body', 'Argaven has applied for an account', 2);
// Allow visitors to register with Admin approval and e-mail verification.
// Allow visitors to register with Admin approval and email verification.
$config->set('register', UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
$config->set('verify_mail', 1);
$config->save();

View File

@ -111,7 +111,7 @@ class UserMailRequiredValidatorTest extends UnitTestCase {
$items->isEmpty()->willReturn(TRUE);
$cases['Existing users without an email should add a violation'] = [$items->reveal(), TRUE];
// Case 4: New user with an e-mail is valid.
// Case 4: New user with an email is valid.
$items = $prophet->prophesize(FieldItemListInterface::class);
$account = $prophet->prophesize(UserInterface::class);
$account->isNew()->willReturn(TRUE);
@ -121,7 +121,7 @@ class UserMailRequiredValidatorTest extends UnitTestCase {
$account->getFieldDefinition("mail")->willReturn($field_definition->reveal())->shouldBeCalledTimes(1);
$items->getEntity()->willReturn($account->reveal())->shouldBeCalledTimes(1);
$items->isEmpty()->willReturn(FALSE);
$cases['New user with an e-mail is valid'] = [$items->reveal(), FALSE];
$cases['New user with an email is valid'] = [$items->reveal(), FALSE];
// Case 5: Existing users with an email should be ignored.
$items = $prophet->prophesize(FieldItemListInterface::class);