Skip to content

Commit

Permalink
fix cspell e-mail vs email
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Apr 9, 2024
1 parent fa2f1a3 commit 93da9d2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion backerymails.links.menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ backerymails.config:
backerymails.settings:
title: 'Settings'
route_name: backerymails.settings
description: 'Configure how Backery Mails will save e-mails.'
description: 'Configure how Backery Mails will save emails.'
parent: backerymails.config
weight: 100
4 changes: 2 additions & 2 deletions config/schema/backerymails.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ backerymails.settings:
mapping:
verbose:
type: boolean
label: 'Display the e-mails on page'
label: 'Display the emails on page'
reroute:
type: mapping
label: 'Rerouting'
Expand All @@ -26,6 +26,6 @@ backerymails.settings:
type: string
sensitives:
type: sequence
label: 'Exclude sensitives e-mails'
label: 'Exclude sensitives emails'
sequence:
type: string
2 changes: 1 addition & 1 deletion inc/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function backerymails_mail_alter(&$message) {
$body = json_encode($body);
}

// Display the e-mail if the verbose is enabled.
// Display the email if the verbose is enabled.
if ($config->get('verbose') && \Drupal::currentUser()->hasPermission('administer site configuration')) {
// Print the message.
$header_output = print_r($message['headers'], TRUE);
Expand Down
4 changes: 2 additions & 2 deletions src/Entity/BackerymailsEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ public function getFrom() {
}

/**
* Get the recipient(s) of the e-mail.
* Get the recipient(s) of the email.
*/
public function getTo() {
return $this->get('mail_to')->value;
}

/**
* Get the reply-to of the e-mail.
* Get the reply-to of the email.
*/
public function getReplyto() {
return $this->get('mail_reply_to')->value;
Expand Down
16 changes: 8 additions & 8 deletions src/Form/SettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {

// Display a page description.
$form['description'] = [
'#markup' => '<p>' . $this->t('This page allows you to configure settings which determines how e-mail messages are saved.') . '</p>',
'#markup' => '<p>' . $this->t('This page allows you to configure settings which determines how email messages are saved.') . '</p>',
];

$form['settings'] = [
Expand All @@ -48,7 +48,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {

$form['settings']['verbose'] = [
'#type' => 'checkbox',
'#title' => $this->t("Display the e-mails on page."),
'#title' => $this->t("Display the emails on page."),
'#default_value' => $config->get('verbose'),
'#description' => $this->t('If enabled, anonymous users with permissions will see any verbose output mail.'),
];
Expand All @@ -60,9 +60,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {

$form['excludes']['sensitives'] = [
'#type' => 'checkbox',
'#title' => $this->t('Exclude sensitives e-mails.'),
'#title' => $this->t('Exclude sensitives emails.'),
'#default_value' => !empty($config->get('excludes')['sensitives']),
'#description' => $this->t('Drupal send sensitives e-mails to user account such "forgotten password". Enabling this setting will result in excluding all sensitives e-mails to be saved.'),
'#description' => $this->t('Drupal send sensitives emails to user account such "forgotten password". Enabling this setting will result in excluding all sensitives emails to be saved.'),
];

$form['excludes']['customs'] = [
Expand Down Expand Up @@ -129,10 +129,10 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$config->save();

if (!empty($excludes['sensitives'])) {
$this->messenger()->addMessage($this->t('Drupal has been configured to exclude all user sensitives e-mails.'), 'status');
$this->messenger()->addMessage($this->t('Drupal has been configured to exclude all user sensitives emails.'), 'status');
}
else {
$this->messenger()->addMessage($this->t('Drupal has been configured to save all e-mails, even sensitives ones.'), 'warning');
$this->messenger()->addMessage($this->t('Drupal has been configured to save all emails, even sensitives ones.'), 'warning');
}
}

Expand All @@ -146,7 +146,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$config->save();

if ($form_state->getValue('reroute')['status']) {
$this->messenger()->addMessage($this->t('Drupal has been configured to reroute all outgoing e-mails.'), 'warning');
$this->messenger()->addMessage($this->t('Drupal has been configured to reroute all outgoing emails.'), 'warning');
}
}

Expand All @@ -155,7 +155,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$config->save();

if ($form_state->getValue('settings')['verbose']) {
$this->messenger()->addMessage($this->t('Drupal has been configured to display all outgoing e-mails.'), 'warning');
$this->messenger()->addMessage($this->t('Drupal has been configured to display all outgoing emails.'), 'warning');
}
}
}
Expand Down

0 comments on commit 93da9d2

Please sign in to comment.