diff --git a/core/includes/install.inc b/core/includes/install.inc index 42b0d40..60a5c02 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -558,7 +558,7 @@ function drupal_verify_profile($install_state) { 'title' => t('Required modules'), 'value' => t('Required modules not found.'), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as /modules. Missing modules: !modules', array('!modules' => implode(', ', $modules))), + 'description' => t('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as /modules. Missing modules: @modules', array('@modules' => implode(', ', $modules))), ); } return $requirements; diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index e0d4e0d..93a1e33 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -718,11 +718,11 @@ protected function validate() { $old_entity_type_id = $this->configManager->getEntityTypeIdByName($names['old_name']); $new_entity_type_id = $this->configManager->getEntityTypeIdByName($names['new_name']); if ($old_entity_type_id != $new_entity_type_id) { - $this->logError($this->t('Entity type mismatch on rename. !old_type not equal to !new_type for existing configuration !old_name and staged configuration !new_name.', array('old_type' => $old_entity_type_id, 'new_type' => $new_entity_type_id, 'old_name' => $names['old_name'], 'new_name' => $names['new_name']))); + $this->logError($this->t('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', array('old_type' => $old_entity_type_id, 'new_type' => $new_entity_type_id, 'old_name' => $names['old_name'], 'new_name' => $names['new_name']))); } // Has to be a configuration entity. if (!$old_entity_type_id) { - $this->logError($this->t('Rename operation for simple configuration. Existing configuration !old_name and staged configuration !new_name.', array('old_name' => $names['old_name'], 'new_name' => $names['new_name']))); + $this->logError($this->t('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', array('old_name' => $names['old_name'], 'new_name' => $names['new_name']))); } } $this->eventDispatcher->dispatch(ConfigEvents::IMPORT_VALIDATE, new ConfigImporterEvent($this)); @@ -762,7 +762,7 @@ protected function processConfiguration($collection, $op, $name) { } } catch (\Exception $e) { - $this->logError($this->t('Unexpected error during import with operation @op for @name: !message', array('@op' => $op, '@name' => $name, '!message' => $e->getMessage()))); + $this->logError($this->t('Unexpected error during import with operation @op for @name: @message', array('@op' => $op, '@name' => $name, '@message' => $e->getMessage()))); // Error for that operation was logged, mark it as processed so that // the import can continue. $this->setProcessedConfiguration($collection, $op, $name); diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php index ad2ac19..19c81f2 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php @@ -122,10 +122,10 @@ protected function checkEncoding() { $this->pass(t('Database is encoded in UTF-8')); } else { - $this->fail(t('The %driver database must use %encoding encoding to work with Drupal. Recreate the database with %encoding encoding. See !link for more details.', array( + $this->fail(t('The %driver database must use %encoding encoding to work with Drupal. Recreate the database with %encoding encoding. See @link for more details.', array( '%encoding' => 'UTF8', '%driver' => $this->name(), - '!link' => 'INSTALL.pgsql.txt' + '@link' => 'INSTALL.pgsql.txt' ))); } } @@ -174,7 +174,7 @@ function checkBinaryOutput() { '%needed_value' => 'escape', '!query' => "" . $query . "", ); - $this->fail(t("The %setting setting is currently set to '%current_value', but needs to be '%needed_value'. Change this by running the following query: !query", $replacements)); + $this->fail(t("The %setting setting is currently set to '%current_value', but needs to be '%needed_value'. Change this by running the following query: @query", $replacements)); } } } @@ -227,7 +227,7 @@ public function checkStandardConformingStrings() { '%needed_value' => 'on', '!query' => "" . $query . "", ); - $this->fail(t("The %setting setting is currently set to '%current_value', but needs to be '%needed_value'. Change this by running the following query: !query", $replacements)); + $this->fail(t("The %setting setting is currently set to '%current_value', but needs to be '%needed_value'. Change this by running the following query: @query", $replacements)); } } } diff --git a/core/lib/Drupal/Core/Datetime/Element/Datetime.php b/core/lib/Drupal/Core/Datetime/Element/Datetime.php index f9ccb45..3eb7c84 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datetime.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datetime.php @@ -241,7 +241,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state // placeholders are invalid for HTML5 date and datetime, so an example // format is appended to the title to appear in tooltips. $extra_attributes = array( - 'title' => t('Date (e.g. !format)', array('!format' => static::formatExample($date_format))), + 'title' => t('Date (e.g. @format)', array('@format' => static::formatExample($date_format))), 'type' => $element['#date_date_element'], ); @@ -288,7 +288,7 @@ public static function processDatetime(&$element, FormStateInterface $form_state // Adds the HTML5 attributes. $extra_attributes = array( - 'title' => t('Time (e.g. !format)', array('!format' => static::formatExample($time_format))), + 'title' => t('Time (e.g. @format)', array('@format' => static::formatExample($time_format))), 'type' => $element['#date_time_element'], 'step' => $element['#date_increment'], ); diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index 2abf196..1ad6dc7 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -939,7 +939,7 @@ function hook_requirements($phase) { $cron_last = \Drupal::state()->get('system.cron_last'); if (is_numeric($cron_last)) { - $requirements['cron']['value'] = t('Last run !time ago', array('!time' => \Drupal::service('date.formatter')->formatTimeDiffSince($cron_last))); + $requirements['cron']['value'] = t('Last run @time ago', array('@time' => \Drupal::service('date.formatter')->formatTimeDiffSince($cron_last))); } else { $requirements['cron'] = array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php index 948079e..d660c89 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php @@ -73,7 +73,7 @@ public function settingsSummary() { $operators = $this->getMatchOperatorOptions(); $summary[] = t('Autocomplete matching: @match_operator', array('@match_operator' => $operators[$this->getSetting('match_operator')])); - $summary[] = t('Textfield size: !size', array('!size' => $this->getSetting('size'))); + $summary[] = t('Textfield size: @size', array('@size' => $this->getSetting('size'))); $placeholder = $this->getSetting('placeholder'); if (!empty($placeholder)) { $summary[] = t('Placeholder: @placeholder', array('@placeholder' => $placeholder)); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php index 84b7d2c..cde5684 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -73,7 +73,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen */ public static function validateElement(array $element, FormStateInterface $form_state) { if ($element['#required'] && $element['#value'] == '_none') { - $form_state->setError($element, t('!name field is required.', array('!name' => $element['#title']))); + $form_state->setError($element, t('@name field is required.', array('@name' => $element['#title']))); } // Massage submitted form values. diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextareaWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextareaWidget.php index 44af9df..493c59c 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextareaWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextareaWidget.php @@ -60,7 +60,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { public function settingsSummary() { $summary = array(); - $summary[] = t('Number of rows: !rows', array('!rows' => $this->getSetting('rows'))); + $summary[] = t('Number of rows: @rows', array('@rows' => $this->getSetting('rows'))); $placeholder = $this->getSetting('placeholder'); if (!empty($placeholder)) { $summary[] = t('Placeholder: @placeholder', array('@placeholder' => $placeholder)); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextfieldWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextfieldWidget.php index 79bc044..329b8a0 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextfieldWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextfieldWidget.php @@ -60,7 +60,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { public function settingsSummary() { $summary = array(); - $summary[] = t('Textfield size: !size', array('!size' => $this->getSetting('size'))); + $summary[] = t('Textfield size: @size', array('@size' => $this->getSetting('size'))); $placeholder = $this->getSetting('placeholder'); if (!empty($placeholder)) { $summary[] = t('Placeholder: @placeholder', array('@placeholder' => $placeholder)); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/UriWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/UriWidget.php index 8be947c..d129730 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/UriWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/UriWidget.php @@ -60,7 +60,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { public function settingsSummary() { $summary = array(); - $summary[] = $this->t('URI field size: !size', array('!size' => $this->getSetting('size'))); + $summary[] = $this->t('URI field size: @size', array('@size' => $this->getSetting('size'))); $placeholder = $this->getSetting('placeholder'); if (!empty($placeholder)) { $summary[] = $this->t('Placeholder: @placeholder', array('@placeholder' => $placeholder)); diff --git a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php index 7bc0f1c..c476430 100644 --- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php +++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php @@ -179,8 +179,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) { catch (\Exception $e) { // The format of this error message is similar to that used on the // database connection form in the installer. - $form_state->setErrorByName('connection_settings', $this->t('Failed to connect to the server. The server reports the following message: !message For more help installing or updating code on your server, see the handbook.', array( - '!message' => '

' . $e->getMessage() . '

', + $form_state->setErrorByName('connection_settings', $this->t('Failed to connect to the server. The server reports the following message: @message For more help installing or updating code on your server, see the handbook.', array( + '@message' => '

' . $e->getMessage() . '

', '@handbook_url' => 'https://www.drupal.org/documentation/install/modules-themes', ))); } diff --git a/core/lib/Drupal/Core/Form/FormValidator.php b/core/lib/Drupal/Core/Form/FormValidator.php index 10678e3..bcf7faa 100644 --- a/core/lib/Drupal/Core/Form/FormValidator.php +++ b/core/lib/Drupal/Core/Form/FormValidator.php @@ -296,7 +296,7 @@ protected function doValidateForm(&$elements, FormStateInterface &$form_state, $ // form constructors are encouraged to set #title anyway, and then set // #title_display to 'invisible'. This improves accessibility. elseif (isset($elements['#title'])) { - $form_state->setError($elements, $this->t('!name field is required.', array('!name' => $elements['#title']))); + $form_state->setError($elements, $this->t('@name field is required.', array('@name' => $elements['#title']))); } else { $form_state->setError($elements); @@ -331,7 +331,7 @@ protected function doValidateForm(&$elements, FormStateInterface &$form_state, $ protected function performRequiredValidation(&$elements, FormStateInterface &$form_state) { // Verify that the value is not longer than #maxlength. if (isset($elements['#maxlength']) && Unicode::strlen($elements['#value']) > $elements['#maxlength']) { - $form_state->setError($elements, $this->t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => Unicode::strlen($elements['#value'])))); + $form_state->setError($elements, $this->t('@name cannot be longer than %max characters but is currently %length characters long.', array('@name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => Unicode::strlen($elements['#value'])))); } if (isset($elements['#options']) && isset($elements['#value'])) { diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php index 9173231..bd9fbc3 100644 --- a/core/lib/Drupal/Core/Form/form.api.php +++ b/core/lib/Drupal/Core/Form/form.api.php @@ -112,8 +112,8 @@ function callback_batch_operation($MULTIPLE_PARAMS, &$context) { function callback_batch_finished($success, $results, $operations) { if ($success) { // Here we do something meaningful with the results. - $message = t("!count items were processed.", array( - '!count' => count($results), + $message = t("@count items were processed.", array( + '@count' => count($results), )); $list = array( '#theme' => 'item_list', diff --git a/core/lib/Drupal/Core/Mail/MailManagerInterface.php b/core/lib/Drupal/Core/Mail/MailManagerInterface.php index ded236b..196726e 100644 --- a/core/lib/Drupal/Core/Mail/MailManagerInterface.php +++ b/core/lib/Drupal/Core/Mail/MailManagerInterface.php @@ -67,8 +67,8 @@ * $message['send'] = FALSE; * break; * } - * $message['subject'] = t('Notification from !site', $variables, $options); - * $message['body'][] = t("Dear !username\n\nThere is new content available on the site.", $variables, $options); + * $message['subject'] = t('Notification from @site', $variables, $options); + * $message['body'][] = t("Dear @username\n\nThere is new content available on the site.", $variables, $options); * break; * } * } diff --git a/core/lib/Drupal/Core/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php index 971a193..259e118 100644 --- a/core/lib/Drupal/Core/Menu/menu.api.php +++ b/core/lib/Drupal/Core/Menu/menu.api.php @@ -504,7 +504,7 @@ function hook_contextual_links_alter(array &$links, $group, array $route_paramet // Dynamically use the menu name for the title of the menu_edit contextual // link. $menu = \Drupal::entityManager()->getStorage('menu')->load($route_parameters['menu']); - $links['menu_edit']['title'] = t('Edit menu: !label', array('!label' => $menu->label())); + $links['menu_edit']['title'] = t('Edit menu: @label', array('@label' => $menu->label())); } } diff --git a/core/lib/Drupal/Core/Render/Element/Table.php b/core/lib/Drupal/Core/Render/Element/Table.php index c13b623..4cd571e 100644 --- a/core/lib/Drupal/Core/Render/Element/Table.php +++ b/core/lib/Drupal/Core/Render/Element/Table.php @@ -200,7 +200,7 @@ public static function processTable(&$element, FormStateInterface $form_state, & } } if (isset($title) && $title !== '') { - $title = t('Update !title', array('!title' => $title)); + $title = t('Update @title', array('@title' => $title)); } } diff --git a/core/lib/Drupal/Core/Updater/Updater.php b/core/lib/Drupal/Core/Updater/Updater.php index 4869b1c..c23c996 100644 --- a/core/lib/Drupal/Core/Updater/Updater.php +++ b/core/lib/Drupal/Core/Updater/Updater.php @@ -257,7 +257,7 @@ public function update(&$filetransfer, $overrides = array()) { return $this->postUpdateTasks(); } catch (FileTransferException $e) { - throw new UpdaterFileTransferException(t('File Transfer failed, reason: !reason', array('!reason' => strtr($e->getMessage(), $e->arguments)))); + throw new UpdaterFileTransferException(t('File Transfer failed, reason: @reason', array('@reason' => strtr($e->getMessage(), $e->arguments)))); } } @@ -295,7 +295,7 @@ public function install(&$filetransfer, $overrides = array()) { return $this->postInstallTasks(); } catch (FileTransferException $e) { - throw new UpdaterFileTransferException(t('File Transfer failed, reason: !reason', array('!reason' => strtr($e->getMessage(), $e->arguments)))); + throw new UpdaterFileTransferException(t('File Transfer failed, reason: @reason', array('@reason' => strtr($e->getMessage(), $e->arguments)))); } } diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 1f479f2..074076d 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -140,14 +140,14 @@ function contact_mail($key, &$message, $params) { switch ($key) { case 'page_mail': case 'page_copy': - $message['subject'] .= t('[!form] !subject', $variables, $options); - $message['body'][] = t("!sender-name (!sender-url) sent a message using the contact form at !form-url.", $variables, $options); + $message['subject'] .= t('[@form] @subject', $variables, $options); + $message['body'][] = t("@sender-name (@sender-url) sent a message using the contact form at @form-url.", $variables, $options); $build = entity_view($contact_message, 'mail', $language->getId()); $message['body'][] = (string) \Drupal::service('renderer')->renderPlain($build); break; case 'page_autoreply': - $message['subject'] .= t('[!form] !subject', $variables, $options); + $message['subject'] .= t('[@form] @subject', $variables, $options); $message['body'][] = $params['contact_form']->getReply(); break; @@ -157,10 +157,10 @@ function contact_mail($key, &$message, $params) { '!recipient-name' => user_format_name($params['recipient']), '!recipient-edit-url' => $params['recipient']->url('edit-form', array('absolute' => TRUE, 'language' => $language)), ); - $message['subject'] .= t('[!site-name] !subject', $variables, $options); - $message['body'][] = t('Hello !recipient-name,', $variables, $options); - $message['body'][] = t("!sender-name (!sender-url) has sent you a message via your contact form at !site-name.", $variables, $options); - $message['body'][] = t("If you don't want to receive such emails, you can change your settings at !recipient-edit-url.", $variables, $options); + $message['subject'] .= t('[@site-name] @subject', $variables, $options); + $message['body'][] = t('Hello @recipient-name,', $variables, $options); + $message['body'][] = t("@sender-name (!sender-url) has sent you a message via your contact form at @site-name.", $variables, $options); + $message['body'][] = t("If you don't want to receive such emails, you can change your settings at @recipient-edit-url.", $variables, $options); $build = entity_view($contact_message, 'mail', $language->getId()); $message['body'][] = (string) \Drupal::service('renderer')->renderPlain($build); break; diff --git a/core/modules/contact/src/MailHandler.php b/core/modules/contact/src/MailHandler.php index 308acf5..606292c 100644 --- a/core/modules/contact/src/MailHandler.php +++ b/core/modules/contact/src/MailHandler.php @@ -91,7 +91,7 @@ public function sendMailMessages(MessageInterface $message, AccountInterface $se // For the email message, clarify that the sender name is not verified; it // could potentially clash with a username on this site. - $sender_cloned->name = $this->t('!name (not verified)', array('!name' => $message->getSenderName())); + $sender_cloned->name = $this->t('@name (not verified)', array('@name' => $message->getSenderName())); } // Build email parameters. diff --git a/core/modules/contact/src/Tests/ContactPersonalTest.php b/core/modules/contact/src/Tests/ContactPersonalTest.php index 031ee75..2a01d0d 100644 --- a/core/modules/contact/src/Tests/ContactPersonalTest.php +++ b/core/modules/contact/src/Tests/ContactPersonalTest.php @@ -83,7 +83,7 @@ function testSendPersonalContactMessage() { '!subject' => $message['subject[0][value]'], '!recipient-name' => $this->contactUser->getUsername(), ); - $this->assertEqual($mail['subject'], t('[!site-name] !subject', $variables), 'Subject is in sent message.'); + $this->assertEqual($mail['subject'], t('[@site-name] @subject', $variables), 'Subject is in sent message.'); $this->assertTrue(strpos($mail['body'], 'Hello ' . $variables['!recipient-name']) !== FALSE, 'Recipient name is in sent message.'); $this->assertTrue(strpos($mail['body'], $this->webUser->getUsername()) !== FALSE, 'Sender name is in sent message.'); $this->assertTrue(strpos($mail['body'], $message['message[0][value]']) !== FALSE, 'Message body is in sent message.'); diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index 4b8228b..35fa5d4 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -208,7 +208,7 @@ function testFieldFormSingleRequired() { // Submit with missing required value. $edit = array(); $this->drupalPostForm('entity_test/add', $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); // Create an entity $value = mt_rand(1, 127); @@ -228,7 +228,7 @@ function testFieldFormSingleRequired() { "{$field_name}[0][value]" => $value, ); $this->drupalPostForm('entity_test/manage/' . $id, $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); } // function testFieldFormMultiple() { diff --git a/core/modules/filter/src/Tests/FilterFormatAccessTest.php b/core/modules/filter/src/Tests/FilterFormatAccessTest.php index b9eeaa7..441be0d 100644 --- a/core/modules/filter/src/Tests/FilterFormatAccessTest.php +++ b/core/modules/filter/src/Tests/FilterFormatAccessTest.php @@ -280,7 +280,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); @@ -315,7 +315,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 37a61ee..b2bb4c6 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -159,7 +159,7 @@ public static function validateUriElement($element, FormStateInterface $form_sta public static function validateTitleElement(&$element, FormStateInterface $form_state, $form) { if ($element['uri']['#value'] !== '' && $element['title']['#value'] === '') { $element['title']['#required'] = TRUE; - $form_state->setError($element['title'], t('!name field is required.', array('!name' => $element['title']['#title']))); + $form_state->setError($element['title'], t('@name field is required.', array('@name' => $element['title']['#title']))); } } diff --git a/core/modules/link/src/Tests/LinkFieldTest.php b/core/modules/link/src/Tests/LinkFieldTest.php index b39a2f5..8247b60 100644 --- a/core/modules/link/src/Tests/LinkFieldTest.php +++ b/core/modules/link/src/Tests/LinkFieldTest.php @@ -277,14 +277,14 @@ function testLinkTitle() { "{$field_name}[0][uri]" => 'http://www.example.com', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that the link text is not required, if the URL is empty. $edit = array( "{$field_name}[0][uri]" => '', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that a URL and link text meets requirements. $this->drupalGet('entity_test/add'); @@ -293,7 +293,7 @@ function testLinkTitle() { "{$field_name}[0][title]" => 'Example', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); } } } diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 43c0d6c..506516c 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -220,7 +220,7 @@ function locale_translate_batch_import($file, array $options, array &$context) { // https://www.drupal.org/node/1089472. $context['finished'] = min(0.95, $report['seek'] / filesize($file->uri)); if (isset($options['message'])) { - $context['message'] = t('!message (@percent%).', array('!message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); + $context['message'] = t('@message (@percent%).', array('@message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); } else { $context['message'] = t('Importing translation file: %filename (@percent%).', array('%filename' => $file->filename, '@percent' => (int) ($context['finished'] * 100))); diff --git a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php index bda7eec..df8ba90 100644 --- a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php @@ -111,7 +111,7 @@ public function testInterface() { // Check if translations are available for Drupal core. $this->drupalGet('admin/reports/translations'); - $this->assertText(t('Updates for: !project', array('!project' => t('Drupal core'))), 'Translations found'); + $this->assertText(t('Updates for: @project', array('@project' => t('Drupal core'))), 'Translations found'); $this->assertText(SafeMarkup::format('@module (@date)', array('@module' => t('Drupal core'), '@date' => format_date(REQUEST_TIME, 'html_date'))), 'Core translation update'); $update_button = $this->xpath('//input[@type="submit"][@value="' . t('Update translations') . '"]'); $this->assertTrue($update_button, 'Update translations button'); diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php index 6148ef9..311ea83 100644 --- a/core/modules/migrate/src/MigrateExecutable.php +++ b/core/modules/migrate/src/MigrateExecutable.php @@ -159,8 +159,8 @@ public function __construct(MigrationInterface $migration, MigrateMessageInterfa break; default: $limit = PHP_INT_MAX; - $this->message->display($this->t('Invalid PHP memory_limit !limit, setting to unlimited.', - array('!limit' => $limit))); + $this->message->display($this->t('Invalid PHP memory_limit @limit, setting to unlimited.', + array('@limit' => $limit))); } } $this->memoryLimit = $limit; @@ -237,7 +237,7 @@ public function import() { } catch (\Exception $e) { $this->message->display( - $this->t('Migration failed with source plugin exception: !e', array('!e' => $e->getMessage())), 'error'); + $this->t('Migration failed with source plugin exception: @e', array('@e' => $e->getMessage())), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } @@ -314,8 +314,8 @@ public function import() { } catch (\Exception $e) { $this->message->display( - $this->t('Migration failed with source plugin exception: !e', - array('!e' => $e->getMessage())), 'error'); + $this->t('Migration failed with source plugin exception: @e', + array('@e' => $e->getMessage())), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } @@ -458,10 +458,10 @@ protected function memoryExceeded() { } if ($pct_memory > $threshold) { $this->message->display( - $this->t('Memory usage is !usage (!pct% of limit !limit), reclaiming memory.', - array('!pct' => round($pct_memory*100), - '!usage' => $this->formatSize($usage), - '!limit' => $this->formatSize($this->memoryLimit))), + $this->t('Memory usage is @usage (@pct% of limit @limit), reclaiming memory.', + array('@pct' => round($pct_memory*100), + '@usage' => $this->formatSize($usage), + '@limit' => $this->formatSize($this->memoryLimit))), 'warning'); $usage = $this->attemptMemoryReclaim(); $pct_memory = $usage / $this->memoryLimit; @@ -469,19 +469,19 @@ protected function memoryExceeded() { // coming back here and trimming a tiny amount if ($pct_memory > (0.90 * $threshold)) { $this->message->display( - $this->t('Memory usage is now !usage (!pct% of limit !limit), not enough reclaimed, starting new batch', - array('!pct' => round($pct_memory*100), - '!usage' => $this->formatSize($usage), - '!limit' => $this->formatSize($this->memoryLimit))), + $this->t('Memory usage is now @usage (@pct% of limit @limit), not enough reclaimed, starting new batch', + array('@pct' => round($pct_memory*100), + '@usage' => $this->formatSize($usage), + '@limit' => $this->formatSize($this->memoryLimit))), 'warning'); return TRUE; } else { $this->message->display( - $this->t('Memory usage is now !usage (!pct% of limit !limit), reclaimed enough, continuing', - array('!pct' => round($pct_memory*100), - '!usage' => $this->formatSize($usage), - '!limit' => $this->formatSize($this->memoryLimit))), + $this->t('Memory usage is now @usage (@pct% of limit @limit), reclaimed enough, continuing', + array('@pct' => round($pct_memory*100), + '@usage' => $this->formatSize($usage), + '@limit' => $this->formatSize($this->memoryLimit))), 'warning'); return FALSE; } diff --git a/core/modules/node/src/Tests/PageEditTest.php b/core/modules/node/src/Tests/PageEditTest.php index 31d6ea9..8ac998c 100644 --- a/core/modules/node/src/Tests/PageEditTest.php +++ b/core/modules/node/src/Tests/PageEditTest.php @@ -55,7 +55,7 @@ function testPageEdit() { // Check that the title and body fields are displayed with the correct values. $active = '' . t('(active tab)') . ''; - $link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active)); + $link_text = t('@local-task-title@active', array('@local-task-title' => t('Edit'), '@active' => $active)); $this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.'); $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); diff --git a/core/modules/user/src/Tests/UserRolesAssignmentTest.php b/core/modules/user/src/Tests/UserRolesAssignmentTest.php index fc074c8..60f4eab 100644 --- a/core/modules/user/src/Tests/UserRolesAssignmentTest.php +++ b/core/modules/user/src/Tests/UserRolesAssignmentTest.php @@ -58,7 +58,7 @@ function testCreateUserWithRole() { "roles[$rid]" => $rid, ); $this->drupalPostForm('admin/people/create', $edit, t('Create new account')); - $this->assertText(t('Created a new user account for !name.', array('!name' => $edit['name']))); + $this->assertText(t('Created a new user account for @name.', array('@name' => $edit['name']))); // Get the newly added user. $account = user_load_by_name($edit['name']); diff --git a/core/modules/user/src/Tests/UserValidationTest.php b/core/modules/user/src/Tests/UserValidationTest.php index f66f465..b419103 100644 --- a/core/modules/user/src/Tests/UserValidationTest.php +++ b/core/modules/user/src/Tests/UserValidationTest.php @@ -136,7 +136,7 @@ function testValidation() { $violations = $user->validate(); $this->assertEqual(count($violations), 1, 'E-mail addresses may not be removed'); $this->assertEqual($violations[0]->getPropertyPath(), 'mail'); - $this->assertEqual($violations[0]->getMessage(), t('!name field is required.', array('!name' => $user->getFieldDefinition('mail')->getLabel()))); + $this->assertEqual($violations[0]->getMessage(), t('@name field is required.', array('@name' => $user->getFieldDefinition('mail')->getLabel()))); $user->set('mail', 'someone@example.com'); $user->set('timezone', $this->randomString(33));