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 c02d4fe..1c06baa 100644
--- a/core/lib/Drupal/Core/Config/ConfigImporter.php
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
@@ -7,6 +7,7 @@
namespace Drupal\Core\Config;
+use Drupal\Core\Render\SafeString;
use Drupal\Core\Config\Importer\MissingContentEvent;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Extension\ModuleInstallerInterface;
@@ -762,7 +763,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' => SafeString::create($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 fef4c32..45ecf53 100644
--- a/core/lib/Drupal/Core/Extension/module.api.php
+++ b/core/lib/Drupal/Core/Extension/module.api.php
@@ -946,7 +946,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/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php index 2a77914..3569b24 100644 --- a/core/lib/Drupal/Core/Menu/menu.api.php +++ b/core/lib/Drupal/Core/Menu/menu.api.php @@ -388,7 +388,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/action/action.module b/core/modules/action/action.module index 0a44ec8..a01cbb8 100644 --- a/core/modules/action/action.module +++ b/core/modules/action/action.module @@ -15,13 +15,13 @@ function action_help($route_name, RouteMatchInterface $route_match) { case 'help.page.action': $output = ''; $output .= '' . t('The Actions module provides tasks that can be executed by the site such as unpublishing content, sending email messages, or blocking a user. Other modules can trigger these actions when specific system events happen; for example, when new content is posted or when a user logs in. Modules can also provide additional actions. For more information, see the online documentation for the Action module.', array('!documentation' => 'https://www.drupal.org/documentation/modules/action')) . '
'; + $output .= '' . t('The Actions module provides tasks that can be executed by the site such as unpublishing content, sending email messages, or blocking a user. Other modules can trigger these actions when specific system events happen; for example, when new content is posted or when a user logs in. Modules can also provide additional actions. For more information, see the online documentation for the Action module.', array('@documentation' => 'https://www.drupal.org/documentation/modules/action')) . '
'; $output .= '' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the online documentation for the Aggregator module.', array('!aggregator-module' => 'https://www.drupal.org/documentation/modules/aggregator')) . '
'; + $output .= '' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the online documentation for the Aggregator module.', array('@aggregator-module' => 'https://www.drupal.org/documentation/modules/aggregator')) . '
'; $output .= '' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports RSS, RDF, and Atom.') . '
'; - $output .= '' . t('Current feeds are listed below, and new feeds may be added. For each feed, the latest items block may be enabled at the blocks administration page.', array('!addfeed' => \Drupal::url('aggregator.feed_add'), '!block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '' . t('Current feeds are listed below, and new feeds may be added. For each feed, the latest items block may be enabled at the blocks administration page.', array('@addfeed' => \Drupal::url('aggregator.feed_add'), '@block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; return $output; case 'aggregator.feed_add': diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php index a5ed081..8e68b4d 100644 --- a/core/modules/aggregator/src/Entity/Feed.php +++ b/core/modules/aggregator/src/Entity/Feed.php @@ -218,7 +218,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['description'] = BaseFieldDefinition::create('string_long') ->setLabel(t('Description')) - ->setDescription(t("The parent website's description that comes from the !description element in the feed.", array('!description' => '' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see the online documentation for the Ban module.', array('!url' => 'https://www.drupal.org/documentation/modules/ban')) . '
'; + $output .= '' . t('The Ban module allows administrators to ban visits to their site from individual IP addresses. For more information, see the online documentation for the Ban module.', array('@url' => 'https://www.drupal.org/documentation/modules/ban')) . '
'; $output .= '' . t('The HTTP Basic Authentication module supplies an HTTP Basic authentication provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the RESTful Web Services module). For more information, see the online documentation for the HTTP Basic Authentication module.', array('!hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', '!rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '
'; + $output .= '' . t('The HTTP Basic Authentication module supplies an HTTP Basic authentication provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the RESTful Web Services module). For more information, see the online documentation for the HTTP Basic Authentication module.', array('@hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', '@rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '
'; return $output; } } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 2d40d78..75d7b22 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -22,21 +22,21 @@ function block_help($route_name, RouteMatchInterface $route_match) { $block_content = \Drupal::moduleHandler()->moduleExists('block_content') ? \Drupal::url('help.page', array('name' => 'block_content')) : '#'; $output = ''; $output .= '' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the online documentation for the Block module.', array('!blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/')) . '
'; + $output .= '' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the online documentation for the Block module.', array('@blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/')) . '
'; $output .= '' . t('The Custom Block module allows you to create custom block types and content-containing blocks, and provides a Custom block library listing all of them. Custom block types have fields; see the Field module help for more information. Once created, custom blocks can be placed in regions just like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('!block-library' => \Drupal::url('entity.block_content.collection'), '!block-content' => \Drupal::url('entity.block_content.collection'), '!field-help' => \Drupal::url('help.page', array('name' => 'field')), '!blocks' => \Drupal::url('help.page', array('name' => 'block')), '!online-help' => 'https://www.drupal.org/documentation/modules/block_content')) . '
'; + $output .= '' . t('The Custom Block module allows you to create custom block types and content-containing blocks, and provides a Custom block library listing all of them. Custom block types have fields; see the Field module help for more information. Once created, custom blocks can be placed in regions just like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('@block-library' => \Drupal::url('entity.block_content.collection'), '@block-content' => \Drupal::url('entity.block_content.collection'), '@field-help' => \Drupal::url('help.page', array('name' => 'field')), '@blocks' => \Drupal::url('help.page', array('name' => 'block')), '@online-help' => 'https://www.drupal.org/documentation/modules/block_content')) . '
'; $output .= '' . t('Blocks in the block library belong to block types, each with its own fields and display settings. After creating a block, place it in a region from the Block layout page.', array('!types' => \Drupal::url('entity.block_content_type.collection'), '!blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output = '' . t('Blocks in the block library belong to block types, each with its own fields and display settings. After creating a block, place it in a region from the Block layout page.', array('@types' => \Drupal::url('entity.block_content_type.collection'), '@blocks' => \Drupal::url('block.admin_display'))) . '
'; return $output; case 'entity.block_content_type.collection': - $output = '' . t('Each block type has its own fields and display settings. Create blocks of each type on the Block library page.', array('!block-library' => \Drupal::url('entity.block_content.collection'))) . '
'; + $output = '' . t('Each block type has its own fields and display settings. Create blocks of each type on the Block library page.', array('@block-library' => \Drupal::url('entity.block_content.collection'))) . '
'; return $output; } diff --git a/core/modules/block_content/src/Controller/BlockContentController.php b/core/modules/block_content/src/Controller/BlockContentController.php index f712367..fc71070 100644 --- a/core/modules/block_content/src/Controller/BlockContentController.php +++ b/core/modules/block_content/src/Controller/BlockContentController.php @@ -86,8 +86,8 @@ public function add(Request $request) { } if (count($types) === 0) { return array( - '#markup' => $this->t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ - '!url' => Url::fromRoute('block_content.type_add')->toString(), + '#markup' => $this->t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ + '@url' => Url::fromRoute('block_content.type_add')->toString(), ]), ); } diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php index b4596f1..22d3680 100644 --- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php +++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php @@ -156,9 +156,9 @@ public function build() { } else { return array( - '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', array( + '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', array( '%uuid' => $this->getDerivativeId(), - '!url' => $this->urlGenerator->generate('block_content.add_page') + '@url' => $this->urlGenerator->generate('block_content.add_page') )), '#access' => $this->account->hasPermission('administer blocks') ); diff --git a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php index 0e25190..9ee05ec 100644 --- a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php +++ b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php @@ -78,7 +78,7 @@ public function render($empty = FALSE) { /** @var \Drupal\Core\Access\AccessResultInterface|\Drupal\Core\Cache\CacheableDependencyInterface $access_result */ $access_result = $this->accessManager->checkNamedRoute('block_content.add_page', array(), $this->currentUser, TRUE); $element = array( - '#markup' => $this->t('Add a custom block.', array('!url' => Url::fromRoute('block_content.add_page')->toString())), + '#markup' => $this->t('Add a custom block.', array('@url' => Url::fromRoute('block_content.add_page')->toString())), '#access' => $access_result->isAllowed(), '#cache' => [ 'contexts' => $access_result->getCacheContexts(), diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/src/Tests/BlockContentCreationTest.php index 6bf250c..84f8e7f 100644 --- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php +++ b/core/modules/block_content/src/Tests/BlockContentCreationTest.php @@ -48,8 +48,8 @@ public function testBlockContentCreation() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -95,8 +95,8 @@ public function testBlockContentCreationMultipleViewModes() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -144,8 +144,8 @@ public function testDefaultBlockContentCreation() { $this->drupalPostForm('block/add', $edit, t('Save')); // Check that the block has been created and that it is a basic block. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'], )), 'Basic block created.'); diff --git a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php index 8da9c54..15e7a10 100644 --- a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php +++ b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php @@ -69,8 +69,8 @@ public function testRevisions() { // Confirm the correct revision text appears. $loaded = entity_revision_load('block_content', $revision_id); // Verify revision log is the same. - $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision !revision', array( - '!revision' => $loaded->getRevisionId(), + $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision @revision', array( + '@revision' => $loaded->getRevisionId(), ))); } diff --git a/core/modules/block_content/src/Tests/BlockContentTypeTest.php b/core/modules/block_content/src/Tests/BlockContentTypeTest.php index 20dc1a2..422f59c 100644 --- a/core/modules/block_content/src/Tests/BlockContentTypeTest.php +++ b/core/modules/block_content/src/Tests/BlockContentTypeTest.php @@ -52,8 +52,8 @@ public function testBlockContentTypeCreation() { // Test the page with no block-types. $this->drupalGet('block/add'); $this->assertResponse(200); - $this->assertRaw(t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ - '!url' => Url::fromRoute('block_content.type_add')->toString(), + $this->assertRaw(t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ + '@url' => Url::fromRoute('block_content.type_add')->toString(), ])); // Now create an initial block-type. $this->createBlockContentType('basic', TRUE); diff --git a/core/modules/block_content/src/Tests/PageEditTest.php b/core/modules/block_content/src/Tests/PageEditTest.php index fdd1743..e2ce38f 100644 --- a/core/modules/block_content/src/Tests/PageEditTest.php +++ b/core/modules/block_content/src/Tests/PageEditTest.php @@ -64,7 +64,7 @@ public function testPageEdit() { // Test deleting the block. $this->drupalGet("block/" . $revised_block->id()); $this->clickLink(t('Delete')); - $this->assertText(format_string('Are you sure you want to delete the custom block !label?', array('!label' => $revised_block->label()))); + $this->assertText(format_string('Are you sure you want to delete the custom block @label?', array('@label' => $revised_block->label()))); } } diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 3a48671..31f3be7 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -26,17 +26,17 @@ function book_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.book': $output = '' . t('The Book module is used for creating structured, multi-page content, such as site resource guides, manuals, and wikis. It allows you to create content that has chapters, sections, subsections, or any similarly-tiered structure. Enabling the module creates a new content type Book page. For more information, see the online documentation for the Book module.', array('!book' => 'https://www.drupal.org/documentation/modules/book')) . '
'; + $output .= '' . t('The Book module is used for creating structured, multi-page content, such as site resource guides, manuals, and wikis. It allows you to create content that has chapters, sections, subsections, or any similarly-tiered structure. Enabling the module creates a new content type Book page. For more information, see the online documentation for the Book module.', array('@book' => 'https://www.drupal.org/documentation/modules/book')) . '
'; $output .= '' . t('The book module offers a means to organize a collection of related content pages, collectively known as a book. When viewed, this content automatically displays links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.') . '
'; case 'entity.node.book_outline_form': - return '' . t('The outline feature allows you to include pages in the Book hierarchy, as well as move them within the hierarchy or to reorder an entire book.', array('!book' => \Drupal::url('book.render'), '!book-admin' => \Drupal::url('book.admin'))) . '
'; + return '' . t('The outline feature allows you to include pages in the Book hierarchy, as well as move them within the hierarchy or to reorder an entire book.', array('@book' => \Drupal::url('book.render'), '@book-admin' => \Drupal::url('book.admin'))) . '
'; } } diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module index 1fec3ed..c6aa95f 100644 --- a/core/modules/breakpoint/breakpoint.module +++ b/core/modules/breakpoint/breakpoint.module @@ -15,13 +15,13 @@ function breakpoint_help($route_name, RouteMatchInterface $route_match) { case 'help.page.breakpoint': $output = ''; $output .= '' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the online documentation for the Breakpoint module.', array('!docs' => 'https://www.drupal.org/documentation/modules/breakpoint')) . '
'; + $output .= '' . t('The Breakpoint module keeps track of the height, width, and resolution breakpoints where a responsive design needs to change in order to respond to different devices being used to view the site. This module does not have a user interface. For more information, see the online documentation for the Breakpoint module.', array('@docs' => 'https://www.drupal.org/documentation/modules/breakpoint')) . '
'; $output .= '' . t('The CKEditor module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the Text Editor module. It requires JavaScript to be enabled in the browser. For more information, see the online documentation for the CKEditor module and the CKEditor website.', array( '!doc_url' => 'https://www.drupal.org/documentation/modules/ckeditor', '!cke_url' => 'http://ckeditor.com', '!text_editor' => \Drupal::url('help.page', array('name' => 'editor')))) . '
'; + $output .= '' . t('The CKEditor module provides a highly-accessible, highly-usable visual text editor and adds a toolbar to text fields. Users can use buttons to format content and to create semantically correct and valid HTML. The CKEditor module uses the framework provided by the Text Editor module. It requires JavaScript to be enabled in the browser. For more information, see the online documentation for the CKEditor module and the CKEditor website.', array( '@doc_url' => 'https://www.drupal.org/documentation/modules/ckeditor', '@cke_url' => 'http://ckeditor.com', '@text_editor' => \Drupal::url('help.page', array('name' => 'editor')))) . '
'; $output .= '' . t('The Color module allows users with the Administer site configuration permission to change the color scheme (color of links, backgrounds, text, and other theme elements) of compatible themes. For more information, see the online documentation for the Color module.', array('!color_do' => 'https://www.drupal.org/documentation/modules/color')) . '
'; + $output .= '' . t('The Color module allows users with the Administer site configuration permission to change the color scheme (color of links, backgrounds, text, and other theme elements) of compatible themes. For more information, see the online documentation for the Color module.', array('@color_do' => 'https://www.drupal.org/documentation/modules/color')) . '
'; $output .= '' . t('To change the color settings, select the Settings link for your theme on the Appearance page. If the color picker does not appear then the theme is not compatible with the Color module.', array('!appearance' => \Drupal::url('system.themes_page'))) . '
'; + $output .= '' . t('To change the color settings, select the Settings link for your theme on the Appearance page. If the color picker does not appear then the theme is not compatible with the Color module.', array('@appearance' => \Drupal::url('system.themes_page'))) . '
'; $output .= '' . t('The Color module saves a modified copy of the theme\'s specified stylesheets in the files directory. If you make any manual changes to your theme\'s stylesheet, you must save your color settings again, even if you haven\'t changed the colors. This step is required because the module stylesheets in the files directory need to be recreated to reflect your changes.') . '
' . t('The Comment module allows users to comment on site content, set commenting defaults and permissions, and moderate comments. For more information, see the online documentation for the Comment module.', array('!comment' => 'https://www.drupal.org/documentation/modules/comment')) . '
'; + $output .= '' . t('The Comment module allows users to comment on site content, set commenting defaults and permissions, and moderate comments. For more information, see the online documentation for the Comment module.', array('@comment' => 'https://www.drupal.org/documentation/modules/comment')) . '
'; $output .= '' . t('The Configuration Manager module provides a user interface for importing and exporting configuration changes between installations of your website in different environments. Configuration is stored in YAML format. For more information, see the online documentation for the Configuration Manager module.', array('!url' => 'https://www.drupal.org/documentation/administer/config')) . '
'; + $output .= '' . t('The Configuration Manager module provides a user interface for importing and exporting configuration changes between installations of your website in different environments. Configuration is stored in YAML format. For more information, see the online documentation for the Configuration Manager module.', array('@url' => 'https://www.drupal.org/documentation/administer/config')) . '
'; $output .= '' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules Language, Content Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Configuration Translation module.', array('!doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', '!config' => \Drupal::url('help.page', array('name' => 'config')), '!language' => \Drupal::url('help.page', array('name' => 'language')), '!locale' => \Drupal::url('help.page', array('name' => 'locale')), '!content-translation' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#')) . '
'; + $output .= '' . t('The Configuration Translation module allows you to translate configuration text; for example, the site name, vocabularies, menus, or date formats. Together with the modules Language, Content Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Configuration Translation module.', array('@doc_url' => 'https://www.drupal.org/documentation/modules/config_translation', '@config' => \Drupal::url('help.page', array('name' => 'config')), '@language' => \Drupal::url('help.page', array('name' => 'language')), '@locale' => \Drupal::url('help.page', array('name' => 'locale')), '@content-translation' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#')) . '
'; $output .= '' . t('The Contact module allows visitors to contact registered users on your site, using the personal contact form, and also allows you to set up site-wide contact forms. For more information, see the online documentation for the Contact module.', array('!contact' => 'https://www.drupal.org/documentation/modules/contact')) . '
'; + $output .= '' . t('The Contact module allows visitors to contact registered users on your site, using the personal contact form, and also allows you to set up site-wide contact forms. For more information, see the online documentation for the Contact module.', array('@contact' => 'https://www.drupal.org/documentation/modules/contact')) . '
'; $output .= '' . t('The Personal contact form is the form for site visitors to contact registered users; the name and recipients of this form cannot be edited. Other forms listed here are your configured site-wide contact forms, which site visitors can use to send mail to a centralized email address or addresses. You can edit the name and recipients of site-wide forms by choosing the Edit operation. You can also configure the fields and display of both personal and site-wide forms.') . '
'; - $output .= '' . t('If you have configured a default site-wide contact form, a Contact menu link in the Footer menu will link to it. You can modify this link from the Menus page if you have the Menu UI module installed. You can also create links to other contact forms; the URL has format contact/machine_name_of_form.', array('!menu-settings' => $menu_page)) . '
'; - $output .= '' . t('If you would like additional text to appear on a site-wide contact page, beyond field labels, use a block. You can create and edit blocks on the Block layout page, if you have the Block module installed.', array('!blocks' => $block_page)) . '
'; + $output .= '' . t('If you have configured a default site-wide contact form, a Contact menu link in the Footer menu will link to it. You can modify this link from the Menus page if you have the Menu UI module installed. You can also create links to other contact forms; the URL has format contact/machine_name_of_form.', array('@menu-settings' => $menu_page)) . '
'; + $output .= '' . t('If you would like additional text to appear on a site-wide contact page, beyond field labels, use a block. You can create and edit blocks on the Block layout page, if you have the Block module installed.', array('@blocks' => $block_page)) . '
'; return $output; } } @@ -122,17 +122,17 @@ function contact_mail($key, &$message, $params) { $language = \Drupal::languageManager()->getLanguage($message['langcode']); $variables = array( - '!site-name' => \Drupal::config('system.site')->get('name'), - '!subject' => $contact_message->getSubject(), - '!form' => !empty($params['contact_form']) ? $params['contact_form']->label() : NULL, - '!form-url' => \Drupal::url('' . t('The Content Translation module allows you to translate content, comments, custom blocks, taxonomy terms, users and other content entities. Together with the modules Language, Configuration Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Content Translation module.', array('!locale' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#', '!config-trans' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? \Drupal::url('help.page', array('name' => 'config_translation')) : '#', '!language' => \Drupal::url('help.page', array('name' => 'language')), '!translation-entity' => 'https://www.drupal.org/documentation/modules/translation', '!field_help' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '' . t('The Content Translation module allows you to translate content, comments, custom blocks, taxonomy terms, users and other content entities. Together with the modules Language, Configuration Translation, and Interface Translation, it allows you to build multilingual websites. For more information, see the online documentation for the Content Translation module.', array('@locale' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#', '@config-trans' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? \Drupal::url('help.page', array('name' => 'config_translation')) : '#', '@language' => \Drupal::url('help.page', array('name' => 'language')), '@translation-entity' => 'https://www.drupal.org/documentation/modules/translation', '@field_help' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '' . t('The Contextual links module gives users with the Use contextual links permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the online documentation for the Contextual Links module.', array('!contextual' => 'https://www.drupal.org/documentation/modules/contextual')) . '
'; + $output .= '' . t('The Contextual links module gives users with the Use contextual links permission quick access to tasks associated with certain areas of pages on your site. For example, a menu displayed as a block has links to edit the menu and configure the block. For more information, see the online documentation for the Contextual Links module.', array('@contextual' => 'https://www.drupal.org/documentation/modules/contextual')) . '
'; $output .= '' . t('The Datetime module provides a Date field that stores dates and times. It also provides the Form API elements datetime and datelist for use in programming modules. See the Field module help and the Field UI module help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Datetime module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '!datetime_do' => 'https://www.drupal.org/documentation/modules/datetime')) . '
'; + $output .= '' . t('The Datetime module provides a Date field that stores dates and times. It also provides the Form API elements datetime and datelist for use in programming modules. See the Field module help and the Field UI module help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Datetime module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '@datetime_do' => 'https://www.drupal.org/documentation/modules/datetime')) . '
'; $output .= '' . t('The Database Logging module logs system events in the Drupal database. For more information, see the online handbook entry for the Database Logging module.', array('!dblog' => 'https://www.drupal.org/documentation/modules/dblog')) . '
'; + $output .= '' . t('The Database Logging module logs system events in the Drupal database. For more information, see the online handbook entry for the Database Logging module.', array('@dblog' => 'https://www.drupal.org/documentation/modules/dblog')) . '
'; $output .= '' . t('The Text Editor module provides a framework that other modules (such as CKEditor module) can use to provide toolbars and other functionality that allow users to format text more easily than typing HTML tags directly. For more information, see the online documentation for the Text Editor module.', array('!documentation' => 'https://www.drupal.org/documentation/modules/editor', '!ckeditor' => (\Drupal::moduleHandler()->moduleExists('ckeditor')) ? \Drupal::url('help.page', array('name' => 'ckeditor')) : '#')) . '
'; + $output .= '' . t('The Text Editor module provides a framework that other modules (such as CKEditor module) can use to provide toolbars and other functionality that allow users to format text more easily than typing HTML tags directly. For more information, see the online documentation for the Text Editor module.', array('@documentation' => 'https://www.drupal.org/documentation/modules/editor', '@ckeditor' => (\Drupal::moduleHandler()->moduleExists('ckeditor')) ? \Drupal::url('help.page', array('name' => 'ckeditor')) : '#')) . '
'; $output .= '' . t('The Entity Reference module allows you to create fields that contain links to other entities (such as content items, taxonomy terms, etc.) within the site. This allows you, for example, to include a link to a user within a content item. For more information, see the online documentation for the Entity Reference module and the Field module help page.', array('!field_help' => \Drupal::url('help.page', array('name' => 'field')), '!er_do' => 'https://www.drupal.org/documentation/modules/entityreference')) . '
'; + $output .= '' . t('The Entity Reference module allows you to create fields that contain links to other entities (such as content items, taxonomy terms, etc.) within the site. This allows you, for example, to include a link to a user within a content item. For more information, see the online documentation for the Entity Reference module and the Field module help page.', array('@field_help' => \Drupal::url('help.page', array('name' => 'field')), '@er_do' => 'https://www.drupal.org/documentation/modules/entityreference')) . '
'; $output .= '' . t('The Field module allows custom data fields to be defined for entity types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the Field UI module user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the online documentation for the Field module.', array('!field-ui-help' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '!field' => 'https://www.drupal.org/documentation/modules/field')). '
'; + $output .= '' . t('The Field module allows custom data fields to be defined for entity types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the Field UI module user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the online documentation for the Field module.', array('@field-ui-help' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '@field' => 'https://www.drupal.org/documentation/modules/field')). '
'; $output .= '' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules enabled on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the Field module help page. For more information about the Field UI, see the online documentation for the Field UI module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui_docs' => 'https://www.drupal.org/documentation/modules/field-ui')) . '
'; + $output .= '' . t('The Field UI module provides an administrative user interface (UI) for managing and displaying fields. Fields can be attached to most content entity sub-types. Different field types, widgets, and formatters are provided by the modules enabled on your site, and managed by the Field module. For background information and terminology related to fields and entities, see the Field module help page. For more information about the Field UI, see the online documentation for the Field UI module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui_docs' => 'https://www.drupal.org/documentation/modules/field-ui')) . '
'; $output .= '' . t('The File module allows you to create fields that contain files. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the File module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '!file_documentation' => 'https://www.drupal.org/documentation/modules/file')) . '
'; + $output .= '' . t('The File module allows you to create fields that contain files. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the File module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '@file_documentation' => 'https://www.drupal.org/documentation/modules/file')) . '
'; $output .= '' . t('The Filter module allows administrators to configure text formats. Text formats define the HTML tags, codes, and other input allowed in text entered in the site and they defend your web site against potentially damaging input from malicious users. A visual text editor can be associated with the text formats by using the Text Editor module. For more information, see the online documentation for the Filter module.', array('!filter_do' => 'https://www.drupal.org/documentation/modules/filter/','!editor_help' => (\Drupal::moduleHandler()->moduleExists('editor')) ? \Drupal::url('help.page', array('name' => 'editor')) : '#')) . '
'; + $output .= '' . t('The Filter module allows administrators to configure text formats. Text formats define the HTML tags, codes, and other input allowed in text entered in the site and they defend your web site against potentially damaging input from malicious users. A visual text editor can be associated with the text formats by using the Text Editor module. For more information, see the online documentation for the Filter module.', array('@filter_do' => 'https://www.drupal.org/documentation/modules/filter/','@editor_help' => (\Drupal::moduleHandler()->moduleExists('editor')) ? \Drupal::url('help.page', array('name' => 'editor')) : '#')) . '
'; $output .= '' . t('The Forum module lets you create threaded discussion forums with functionality similar to other message board systems. In a forum, users post topics and threads in nested hierarchies, allowing discussions to be categorized and grouped.') . '
'; - $output .= '' . t('The Forum module adds and uses a content type called Forum topic. For background information on content types, see the Node module help page.', array('!node_help'=>\Drupal::url('help.page', array('name' => 'node')))) . '
'; + $output .= '' . t('The Forum module adds and uses a content type called Forum topic. For background information on content types, see the Node module help page.', array('@node_help'=>\Drupal::url('help.page', array('name' => 'node')))) . '
'; $output .= '' . t('A forum is represented by a hierarchical structure, consisting of:'); $output .= '
' . t('For more information, see the online documentation for the Forum module.', array('!forum' => 'https://www.drupal.org/documentation/modules/forum')) . '
'; + $output .= '' . t('For more information, see the online documentation for the Forum module.', array('@forum' => 'https://www.drupal.org/documentation/modules/forum')) . '
'; $output .= '' . t('A forum holds related forum topics.') . '
'; case 'forum.settings': - return '' . t('Adjust the display of your forum topics. Organize the forums on the forum structure page.', array('!forum-structure' => \Drupal::url('forum.overview'))) . '
'; + return '' . t('Adjust the display of your forum topics. Organize the forums on the forum structure page.', array('@forum-structure' => \Drupal::url('forum.overview'))) . '
'; } } diff --git a/core/modules/hal/hal.module b/core/modules/hal/hal.module index cc56e72..24852ae 100644 --- a/core/modules/hal/hal.module +++ b/core/modules/hal/hal.module @@ -15,9 +15,9 @@ function hal_help($route_name, RouteMatchInterface $route_match) { case 'help.page.hal': $output = ''; $output .= '' . t('Hypertext Application Language (HAL) is a format that supports the linking required for hypermedia APIs.', array('!hal_spec' => 'http://stateless.co/hal_specification.html')) . '
'; - $output .= '' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the link relations between them, enabling API consumers to follow links to discover API functionality.', array('!link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '
'; - $output .= '' . t('This module adds support for serializing entities (such as content items, taxonomy terms, etc.) to the JSON version of HAL. For more information, see the online documentation for the HAL module.', array('!hal_do' => 'https://www.drupal.org/documentation/modules/hal')) . '
'; + $output .= '' . t('Hypertext Application Language (HAL) is a format that supports the linking required for hypermedia APIs.', array('@hal_spec' => 'http://stateless.co/hal_specification.html')) . '
'; + $output .= '' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the link relations between them, enabling API consumers to follow links to discover API functionality.', array('@link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '
'; + $output .= '' . t('This module adds support for serializing entities (such as content items, taxonomy terms, etc.) to the JSON version of HAL. For more information, see the online documentation for the HAL module.', array('@hal_do' => 'https://www.drupal.org/documentation/modules/hal')) . '
'; return $output; } } diff --git a/core/modules/help/help.api.php b/core/modules/help/help.api.php index a88a218..ff995a2 100644 --- a/core/modules/help/help.api.php +++ b/core/modules/help/help.api.php @@ -47,7 +47,7 @@ function hook_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_ switch ($route_name) { // Main module help for the block module. case 'help.page.block': - return '' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + return '' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; // Help for another path in the block module. case 'block.admin_display': diff --git a/core/modules/help/help.module b/core/modules/help/help.module index 3ec6fd8..b35ac57 100644 --- a/core/modules/help/help.module +++ b/core/modules/help/help.module @@ -17,27 +17,27 @@ function help_help($route_name, RouteMatchInterface $route_match) { $output = '' . t('Follow these steps to set up and start using your website:') . '
'; $output .= '' . t('For more information, refer to the subjects listed in the Help Topics section or to the online documentation and support pages at drupal.org.', array('!docs' => 'https://www.drupal.org/documentation', '!support' => 'https://www.drupal.org/support', '!drupal' => 'https://www.drupal.org')) . '
'; + $output .= '' . t('For more information, refer to the subjects listed in the Help Topics section or to the online documentation and support pages at drupal.org.', array('@docs' => 'https://www.drupal.org/documentation', '@support' => 'https://www.drupal.org/support', '@drupal' => 'https://www.drupal.org')) . '
'; return $output; case 'help.page.help': $output = ''; $output .= '' . t('The Help module generates Help reference pages to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for Drupal.org online documentation pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the online documentation for the Help module.', array('!help' => 'https://www.drupal.org/documentation/modules/help/', '!handbook' => 'https://www.drupal.org/documentation', '!help-page' => \Drupal::url('help.main'))) . '
'; + $output .= '' . t('The Help module generates Help reference pages to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for Drupal.org online documentation pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the online documentation for the Help module.', array('@help' => 'https://www.drupal.org/documentation/modules/help/', '@handbook' => 'https://www.drupal.org/documentation', '@help-page' => \Drupal::url('help.main'))) . '
'; $output .= '' . t('Help is available on the following items:') . '
', 'Help topics text correctly appears.'); @@ -113,6 +113,11 @@ protected function verifyHelp($response = 200) { foreach ($admin_tasks as $task) { $this->assertLink($task['title']); } + // Ensure there are no double escaped '&' or '<' characters. + $this->assertNoEscaped('&'); + $this->assertNoEscaped('<'); + // Ensure there are no escaped '<' characters. + $this->assertNoEscaped('<'); } } } diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 61def3e..32ba96f 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -28,7 +28,7 @@ function history_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.history': $output = '' . t('The History module keeps track of which content a user has read. It marks content as new or updated depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered read. The History module does not have a user interface but it provides a filter to Views to show new or updated content. For more information, see the online documentation for the History module.', array('!views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array ('name' => 'views')): '#', '!url' => 'https://www.drupal.org/documentation/modules/history')) . '
'; + $output .= '' . t('The History module keeps track of which content a user has read. It marks content as new or updated depending on the last time the user viewed it. History records that are older than one month are removed during cron, which means that content older than one month is always considered read. The History module does not have a user interface but it provides a filter to Views to show new or updated content. For more information, see the online documentation for the History module.', array('@views-help' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array ('name' => 'views')): '#', '@url' => 'https://www.drupal.org/documentation/modules/history')) . '
'; return $output; } } diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 69aabb6..4878be0 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -55,18 +55,18 @@ function image_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '' . t('The Image module allows you to create fields that contain image files and to configure Image styles that can be used to manipulate the display of images. See the Field module help and the Field UI help pages for terminology and general information on entities, fields, and how to create and manage fields. For more information, see the online documentation for the Image module.', array('!image_styles' => \Drupal::url('entity.image_style.collection'), '!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => $field_ui_url, '!image_documentation' => 'https://www.drupal.org/documentation/modules/image')) . '
'; + $output .= '' . t('The Image module allows you to create fields that contain image files and to configure Image styles that can be used to manipulate the display of images. See the Field module help and the Field UI help pages for terminology and general information on entities, fields, and how to create and manage fields. For more information, see the online documentation for the Image module.', array('@image_styles' => \Drupal::url('entity.image_style.collection'), '@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => $field_ui_url, '@image_documentation' => 'https://www.drupal.org/documentation/modules/image')) . '
'; $output .= '' . t('The Language module allows you to configure the languages used on your site, and provides information for the for Content Translation, Interface Translation, and Configuration Translation modules, if they are enabled. For more information, see the online documentation for the Language module.', array('!doc_url' => 'https://www.drupal.org/documentation/modules/language', '!content' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#', '!interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#', '!configuration' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? \Drupal::url('help.page', array('name' => 'config_translation')) : '#')) . '
'; + $output .= '' . t('The Language module allows you to configure the languages used on your site, and provides information for the for Content Translation, Interface Translation, and Configuration Translation modules, if they are enabled. For more information, see the online documentation for the Language module.', array('@doc_url' => 'https://www.drupal.org/documentation/modules/language', '@content' => (\Drupal::moduleHandler()->moduleExists('content_translation')) ? \Drupal::url('help.page', array('name' => 'content_translation')) : '#', '@interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#', '@configuration' => (\Drupal::moduleHandler()->moduleExists('config_translation')) ? \Drupal::url('help.page', array('name' => 'config_translation')) : '#')) . '
'; $output .= '' . t('Add a language to be supported by your site. If your desired language is not available, pick Custom language... at the end and provide a language code and other details manually.') . '
'; case 'language.negotiation': - $output = '' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language detection methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the list of languages.', array('!admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output = '' . t('Define how to decide which language is used to display page elements (primarily text provided by modules, such as field labels and help text). This decision is made by evaluating a series of detection methods for languages; the first detection method that gets a result will determine which language is used for that type of text. Be aware that some language detection methods are unreliable under certain conditions, such as browser detection when page-caching is enabled and a user is not currently logged in. Define the order of evaluation of language detection methods on this page. The default language can be changed in the list of languages.', array('@admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; return $output; case 'language.negotiation_session': @@ -72,11 +72,11 @@ function language_help($route_name, RouteMatchInterface $route_match) { return $output; case 'language.negotiation_browser': - $output = '' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to site languages.', array('!configure-languages' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output = '' . t('Browsers use different language codes to refer to the same languages. Internally, a best effort is made to determine the correct language based on the code that the browser sends. You can add and edit additional mappings from browser language codes to site languages.', array('@configure-languages' => \Drupal::url('entity.configurable_language.collection'))) . '
'; return $output; case 'language.negotiation_selected': - $output = '' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). Changing the site\'s default language itself might have other undesired side effects.', array('!admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output = '' . t('Changing the selected language here (and leaving this option as the last among the detection and selection options) is the easiest way to change the fallback language for the website, if you need to change how your site works by default (e.g., when using an empty path prefix or using the default domain). Changing the site\'s default language itself might have other undesired side effects.', array('@admin-change-language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; return $output; case 'entity.block.edit_form': diff --git a/core/modules/language/src/Element/LanguageConfiguration.php b/core/modules/language/src/Element/LanguageConfiguration.php index fc5263e..5fe723b 100644 --- a/core/modules/language/src/Element/LanguageConfiguration.php +++ b/core/modules/language/src/Element/LanguageConfiguration.php @@ -96,7 +96,7 @@ public static function processLanguageConfiguration(&$element, FormStateInterfac */ protected static function getDefaultOptions() { $language_options = array( - LanguageInterface::LANGCODE_SITE_DEFAULT => t("Site's default language (!language)", array('!language' => static::languageManager()->getDefaultLanguage()->getName())), + LanguageInterface::LANGCODE_SITE_DEFAULT => t("Site's default language (@language)", array('@language' => static::languageManager()->getDefaultLanguage()->getName())), 'current_interface' => t('Interface text language selected for page'), 'authors_default' => t("Author's preferred language"), ); diff --git a/core/modules/language/src/Plugin/Derivative/LanguageBlock.php b/core/modules/language/src/Plugin/Derivative/LanguageBlock.php index 3c54c25..34313c4 100644 --- a/core/modules/language/src/Plugin/Derivative/LanguageBlock.php +++ b/core/modules/language/src/Plugin/Derivative/LanguageBlock.php @@ -26,7 +26,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $configurable_types = $language_manager->getLanguageTypes(); foreach ($configurable_types as $type) { $this->derivatives[$type] = $base_plugin_definition; - $this->derivatives[$type]['admin_label'] = t('Language switcher (!type)', array('!type' => $info[$type]['name'])); + $this->derivatives[$type]['admin_label'] = t('Language switcher (@type)', array('@type' => $info[$type]['name'])); } // If there is just one configurable type then change the title of the // block. diff --git a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php index 0927c2d..1a093c2 100644 --- a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php @@ -40,8 +40,8 @@ public function testLanguageConfiguration() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); // Test validation on missing values. - $this->assertText(t('!name field is required.', array('!name' => t('Language code')))); - $this->assertText(t('!name field is required.', array('!name' => t('Language name')))); + $this->assertText(t('@name field is required.', array('@name' => t('Language code')))); + $this->assertText(t('@name field is required.', array('@name' => t('Language name')))); $empty_language = new Language(); $this->assertFieldChecked('edit-direction-' . $empty_language->getDirection(), 'Consistent usage of language direction.'); $this->assertUrl(\Drupal::url('language.add', array(), array('absolute' => TRUE)), [], 'Correct page redirection.'); diff --git a/core/modules/link/link.module b/core/modules/link/link.module index e8d53f8..53e3adf 100644 --- a/core/modules/link/link.module +++ b/core/modules/link/link.module @@ -15,11 +15,11 @@ function link_help($route_name, RouteMatchInterface $route_match) { case 'help.page.link': $output = ''; $output .= '' . t('The Link module allows you to create fields that contain internal or external URLs and optional link text. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Link module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '!link_documentation' => 'https://www.drupal.org/documentation/modules/link')) . '
'; + $output .= '' . t('The Link module allows you to create fields that contain internal or external URLs and optional link text. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Link module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '@link_documentation' => 'https://www.drupal.org/documentation/modules/link')) . '
'; $output .= '' . t('The Interface Translation module allows you to translate interface text (strings) into different languages, and to switch between them for the display of interface text. It uses the functionality provided by the Language module. For more information, see the online documentation for the Interface Translation module.', array('!doc-url' => 'https://www.drupal.org/documentation/modules/locale/', '!language' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; + $output .= '' . t('The Interface Translation module allows you to translate interface text (strings) into different languages, and to switch between them for the display of interface text. It uses the functionality provided by the Language module. For more information, see the online documentation for the Interface Translation module.', array('@doc-url' => 'https://www.drupal.org/documentation/modules/locale/', '@language' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; $output .= '' . t('Interface translations are automatically imported when a language is added, or when new modules or themes are enabled. The report Available translation updates shows the status. Interface text can be customized in the user interface translation page.', array('!update' => \Drupal::url('locale.translate_status'), '!translate' => \Drupal::url('locale.translate_page'))) . '
'; + return '' . t('Interface translations are automatically imported when a language is added, or when new modules or themes are enabled. The report Available translation updates shows the status. Interface text can be customized in the user interface translation page.', array('@update' => \Drupal::url('locale.translate_status'), '@translate' => \Drupal::url('locale.translate_page'))) . '
'; case 'locale.translate_page': - $output = '' . t('This page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations. (Note: Because translation tasks involve many strings, it may be more convenient to export strings for offline editing in a desktop Gettext translation editor.) Searches may be limited to strings in a specific language.', array('!export' => \Drupal::url('locale.translate_export'))) . '
'; + $output = '' . t('This page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations. (Note: Because translation tasks involve many strings, it may be more convenient to export strings for offline editing in a desktop Gettext translation editor.) Searches may be limited to strings in a specific language.', array('@export' => \Drupal::url('locale.translate_export'))) . '
'; return $output; case 'locale.translate_import': - $output = '' . t('Translation files are automatically downloaded and imported when languages are added, or when modules or themes are enabled.', array('!language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; - $output .= '' . t('This page allows translators to manually import translated strings contained in a Gettext Portable Object (.po) file. Manual import may be used for customized translations or for the translation of custom modules and themes. To customize translations you can download a translation file from the Drupal translation server or export translations from the site, customize the translations using a Gettext translation editor, and import the result using this page.', array('!url' => 'https://localize.drupal.org', '!export' => \Drupal::url('locale.translate_export'))) . '
'; + $output = '' . t('Translation files are automatically downloaded and imported when languages are added, or when modules or themes are enabled.', array('@language' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output .= '' . t('This page allows translators to manually import translated strings contained in a Gettext Portable Object (.po) file. Manual import may be used for customized translations or for the translation of custom modules and themes. To customize translations you can download a translation file from the Drupal translation server or export translations from the site, customize the translations using a Gettext translation editor, and import the result using this page.', array('@url' => 'https://localize.drupal.org', '@export' => \Drupal::url('locale.translate_export'))) . '
'; $output .= '' . t('Note that importing large .po files may take several minutes.') . '
'; return $output; diff --git a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php b/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php index 1436527..3ba4858 100644 --- a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php @@ -58,7 +58,7 @@ public function testFileParsing() { "Double Quote \\\"Escaped\\\" t" => '', 'Double Quote Concat strings t' => '', - 'Context !key Args t' => 'Context string', + 'Context @key Args t' => 'Context string', 'Context Unquoted t' => 'Context string unquoted', 'Context Single Quoted t' => 'Context string single quoted', @@ -73,7 +73,7 @@ public function testFileParsing() { "Double Quote plural{$etx}Double Quote @count plural" => '', "Double Quote \\\"Escaped\\\" plural{$etx}Double Quote \\\"Escaped\\\" @count plural" => '', - "Context !key Args plural{$etx}Context !key Args @count plural" => 'Context string', + "Context @key Args plural{$etx}Context @key Args @count plural" => 'Context string', "Context Unquoted plural{$etx}Context Unquoted @count plural" => 'Context string unquoted', "Context Single Quoted plural{$etx}Context Single Quoted @count plural" => 'Context string single quoted', diff --git a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php index dcade86..ad49550 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/locale/tests/locale_test.js b/core/modules/locale/tests/locale_test.js index ba62b75..b600803 100644 --- a/core/modules/locale/tests/locale_test.js +++ b/core/modules/locale/tests/locale_test.js @@ -26,7 +26,7 @@ Drupal.t("Context Unquoted t", {}, {context: "Context string unquoted"}); Drupal.t("Context Single Quoted t", {}, {'context': "Context string single quoted"}); Drupal.t("Context Double Quoted t", {}, {"context": "Context string double quoted"}); -Drupal.t("Context !key Args t", {'!key': 'value'}, {context: "Context string"}); +Drupal.t("Context @key Args t", {'@key': 'value'}, {context: "Context string"}); Drupal.formatPlural(1, "Standard Call plural", "Standard Call @count plural"); Drupal @@ -49,4 +49,4 @@ Drupal.formatPlural(1, "Context Unquoted plural", "Context Unquoted @count plura Drupal.formatPlural(1, "Context Single Quoted plural", "Context Single Quoted @count plural", {}, {'context': "Context string single quoted"}); Drupal.formatPlural(1, "Context Double Quoted plural", "Context Double Quoted @count plural", {}, {"context": "Context string double quoted"}); -Drupal.formatPlural(1, "Context !key Args plural", "Context !key Args @count plural", {'!key': 'value'}, {context: "Context string"}); +Drupal.formatPlural(1, "Context @key Args plural", "Context @key Args @count plural", {'@key': 'value'}, {context: "Context string"}); diff --git a/core/modules/menu_link_content/menu_link_content.module b/core/modules/menu_link_content/menu_link_content.module index aee8424..9e8ed22 100644 --- a/core/modules/menu_link_content/menu_link_content.module +++ b/core/modules/menu_link_content/menu_link_content.module @@ -18,10 +18,10 @@ function menu_link_content_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('The Custom Menu Links module allows users to create menu links. These links can be translated if multiple languages are used for the site.'); if (\Drupal::moduleHandler()->moduleExists('menu_ui')) { - $output .= ' ' . t('It is required by the Menu UI module, which provides an interface for managing menus and menu links. For more information, see the Menu UI module help page and the online documentation for the Custom Menu Links module.', array('!menu-help' => \Drupal::url('help.page', array('name' => 'menu_ui')), '!drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link')); + $output .= ' ' . t('It is required by the Menu UI module, which provides an interface for managing menus and menu links. For more information, see the Menu UI module help page and the online documentation for the Custom Menu Links module.', array('@menu-help' => \Drupal::url('help.page', array('name' => 'menu_ui')), '@drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link')); } else { - $output .= ' ' . t('For more information, see the online documentation for the Custom Menu Links module. If you enable the Menu UI module, it provides an interface for managing menus and menu links.', array('!drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link')); + $output .= ' ' . t('For more information, see the online documentation for the Custom Menu Links module. If you enable the Menu UI module, it provides an interface for managing menus and menu links.', array('@drupal-org-help' => 'https://www.drupal.org/documentation/modules/menu_link')); } $output .= '
'; return $output; diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 9baf1e7..41e42fa 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -37,21 +37,21 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) { case 'help.page.menu_ui': $output = ''; $output .= '' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the online documentation for the Menu UI module.', array('!menu' => 'https://www.drupal.org/documentation/modules/menu/')) . '
'; + $output .= '' . t('The Menu UI module provides an interface for managing menus. A menu is a hierarchical collection of links, which can be within or external to the site, generally used for navigation. For more information, see the online documentation for the Menu UI module.', array('@menu' => 'https://www.drupal.org/documentation/modules/menu/')) . '
'; $output .= '' . t('You can enable the newly-created block for this menu on the Block layout page.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + return '' . t('You can enable the newly-created block for this menu on the Block layout page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; } elseif ($route_name == 'entity.menu.collection' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { - return '' . t('Each menu has a corresponding block that is managed on the Block layout page.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + return '' . t('Each menu has a corresponding block that is managed on the Block layout page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; } } diff --git a/core/modules/migrate/migrate.module b/core/modules/migrate/migrate.module index 89a5a4d..1d62706 100644 --- a/core/modules/migrate/migrate.module +++ b/core/modules/migrate/migrate.module @@ -15,7 +15,7 @@ function migrate_help($route_name, RouteMatchInterface $route_match) { case 'help.page.migrate': $output = ''; - $output .= t('The Migrate module provides a framework for migrating data, usually from an external source into your site. It does not provide a user interface. For more information, see the online documentation for the Migrate module.', array('!migrate' => 'https://www.drupal.org/documentation/modules/migrate')); + $output .= t('The Migrate module provides a framework for migrating data, usually from an external source into your site. It does not provide a user interface. For more information, see the online documentation for the Migrate module.', array('@migrate' => 'https://www.drupal.org/documentation/modules/migrate')); $output .= '
'; return $output; } diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php index 5e9f38c..d09b338 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; } @@ -318,8 +318,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; } @@ -462,10 +462,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; @@ -473,19 +473,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/migrate/src/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php index ef2f03e..12bb419 100644 --- a/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php +++ b/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php @@ -507,8 +507,8 @@ public function saveIdMapping(Row $row, array $destination_id_values, $source_ro // A NULL key value will fail. if (!isset($source_id_values[$field_name])) { $this->message->display(t( - 'Could not save to map table due to NULL value for key field !field', - array('!field' => $field_name)), 'error'); + 'Could not save to map table due to NULL value for key field @field', + array('@field' => $field_name)), 'error'); return; } $keys[$key_name] = $source_id_values[$field_name]; diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index 97d7662..a31d16f 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -59,7 +59,7 @@ protected function setUp() { * Tests an import with an incomplete rewinding. */ public function testImportWithFailingRewind() { - $exception_message = $this->getRandomGenerator()->string(); + $exception_message = $this->getRandomGenerator()->name(); $source = $this->getMock('Drupal\migrate\Plugin\MigrateSourceInterface'); $source->expects($this->once()) ->method('rewind') diff --git a/core/modules/migrate_drupal/migrate_drupal.module b/core/modules/migrate_drupal/migrate_drupal.module index 88ceba9..8f5b5d4 100644 --- a/core/modules/migrate_drupal/migrate_drupal.module +++ b/core/modules/migrate_drupal/migrate_drupal.module @@ -15,7 +15,7 @@ function migrate_drupal_help($route_name, RouteMatchInterface $route_match) { case 'help.page.migrate_drupal': $output = ''; $output .= '' . t('The Migrate Drupal module provides a framework based on the Migrate module to facilitate migration from a Drupal (6, 7, or 8) site to your website. It does not provide a user interface. For more information, see the online documentation for the Migrate Drupal module.', array('!migrate' => \Drupal::url('help.page', array('name' => 'migrate')), '!migrate_drupal' => 'https://www.drupal.org/documentation/modules/migrate_drupal')) . '
'; + $output .= '' . t('The Migrate Drupal module provides a framework based on the Migrate module to facilitate migration from a Drupal (6, 7, or 8) site to your website. It does not provide a user interface. For more information, see the online documentation for the Migrate Drupal module.', array('@migrate' => \Drupal::url('help.page', array('name' => 'migrate')), '@migrate_drupal' => 'https://www.drupal.org/documentation/modules/migrate_drupal')) . '
'; return $output; } } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 7c371d6..748c5dc 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -82,19 +82,19 @@ function node_help($route_name, RouteMatchInterface $route_match) { case 'help.page.node': $output = ''; $output .= '' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the Field module). For more information, see the online documentation for the Node module.', array('!node' => 'https://www.drupal.org/documentation/modules/node', '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '' . t('The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the Field module). For more information, see the online documentation for the Node module.', array('@node' => 'https://www.drupal.org/documentation/modules/node', '@field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '' . $revision_log . '
'; $this->assertRaw($current_revision_message); diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module index 7f2cd53..b78e489 100644 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ b/core/modules/node/tests/modules/node_test/node_test.module @@ -20,12 +20,12 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl // Add RSS elements and namespaces when building the RSS feed. $node->rss_elements[] = array( 'key' => 'testElement', - 'value' => t('Value of testElement RSS element for node !nid.', array('!nid' => $node->id())), + 'value' => t('Value of testElement RSS element for node @nid.', array('@nid' => $node->id())), ); // Add content that should be displayed only in the RSS feed. $build['extra_feed_content'] = array( - '#markup' => '' . t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->id())) . '
', + '#markup' => '' . t('Extra data that should appear only in the RSS feed for node @nid.', array('@nid' => $node->id())) . '
', '#weight' => 10, ); } @@ -33,7 +33,7 @@ function node_test_node_view(array &$build, NodeInterface $node, EntityViewDispl if ($view_mode != 'rss') { // Add content that should NOT be displayed in the RSS feed. $build['extra_non_feed_content'] = array( - '#markup' => '' . t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->id())) . '
', + '#markup' => '' . t('Extra data that should appear everywhere except the RSS feed for node @nid.', array('@nid' => $node->id())) . '
', ); } } diff --git a/core/modules/options/options.module b/core/modules/options/options.module index aa2074d..676596d 100644 --- a/core/modules/options/options.module +++ b/core/modules/options/options.module @@ -19,11 +19,11 @@ function options_help($route_name, RouteMatchInterface $route_match) { case 'help.page.options': $output = ''; $output .= '' . t('The Options module allows you to create fields where data values are selected from a fixed list of options. Usually these items are entered through a select list, checkboxes, or radio buttons. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Options module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '!options_do' => 'https://www.drupal.org/documentation/modules/options')) . '
'; + $output .= '' . t('The Options module allows you to create fields where data values are selected from a fixed list of options. Usually these items are entered through a select list, checkboxes, or radio buttons. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Options module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '@options_do' => 'https://www.drupal.org/documentation/modules/options')) . '
'; $output .= '' . t('The Internal Page Cache module caches pages for anonymous users in the database. For more information, see the online documentation for the Internal Page Cache module.', array('!pagecache-documentation' => 'https://www.drupal.org/documentation/modules/internal_page_cache')) . '
'; + $output .= '' . t('The Internal Page Cache module caches pages for anonymous users in the database. For more information, see the online documentation for the Internal Page Cache module.', array('@pagecache-documentation' => 'https://www.drupal.org/documentation/modules/internal_page_cache')) . '
'; $output .= '' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module Pathauto. For more information, see the online documentation for the Path module.', array('!path' => 'https://www.drupal.org/documentation/modules/path', '!pathauto' => 'https://www.drupal.org/project/pathauto')) . '
'; + $output .= '' . t('The Path module allows you to specify an alias, or custom URL, for any existing internal system path. Aliases should not be confused with URL redirects, which allow you to forward a changed or inactive URL to a new URL. In addition to making URLs more readable, aliases also help search engines index content more effectively. Multiple aliases may be used for a single internal system path. To automate the aliasing of paths, you can install the contributed module Pathauto. For more information, see the online documentation for the Path module.', array('@path' => 'https://www.drupal.org/documentation/modules/path', '@pathauto' => 'https://www.drupal.org/project/pathauto')) . '
'; $output .= '' . t('The Quick Edit module allows users with the Access in-place editing and Use contextual links permissions to edit field content without visiting a separate page. For more information, see the online documentation for the Quick Edit module.', array('!handbook_url' => 'https://www.drupal.org/documentation/modules/edit', '!quickedit_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-quickedit')), '!contextual_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-contextual')))) . '
'; + $output .= '' . t('The Quick Edit module allows users with the Access in-place editing and Use contextual links permissions to edit field content without visiting a separate page. For more information, see the online documentation for the Quick Edit module.', array('@handbook_url' => 'https://www.drupal.org/documentation/modules/edit', '@quickedit_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-quickedit')), '@contextual_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-contextual')))) . '
'; $output .= '' . t('To edit content in place, you need to activate quick edit mode for a content item. Activate quick edit mode by choosing Quick edit from the contextual links for an area displaying the content (see the Contextual Links module help for more information about how to use contextual links).', array('!contextual' => \Drupal::url('help.page', array('name' => 'contextual')))) . '
'; + $output .= '' . t('To edit content in place, you need to activate quick edit mode for a content item. Activate quick edit mode by choosing Quick edit from the contextual links for an area displaying the content (see the Contextual Links module help for more information about how to use contextual links).', array('@contextual' => \Drupal::url('help.page', array('name' => 'contextual')))) . '
'; $output .= '' . t('Once quick edit mode is activated, you will be able to edit the individual fields of your content. In the default theme, with a JavaScript-enabled browser and a mouse, the output of different fields in your content is outlined in blue, a pop-up gives the field name as you hover over the field output, and clicking on a field activates the editor. Closing the pop-up window ends quick edit mode.') . '
'; $output .= '' . t('The RDF module enriches your content with metadata to let other applications (e.g., search engines, aggregators, and so on) better understand its relationships and attributes. This semantically enriched, machine-readable output for your website uses the RDFa specification, which allows RDF data to be embedded in HTML markup. Other modules can define mappings of their data to RDF terms, and the RDF module makes this RDF data available to the theme. The core modules define RDF mappings for their data model, and the core themes output this RDF metadata information along with the human-readable visual information. For more information, see the online documentation for the RDF module.', array('!rdfa' => 'http://www.w3.org/TR/xhtml-rdfa-primer/', '!rdf' => 'https://www.drupal.org/documentation/modules/rdf')) . '
'; + $output .= '' . t('The RDF module enriches your content with metadata to let other applications (e.g., search engines, aggregators, and so on) better understand its relationships and attributes. This semantically enriched, machine-readable output for your website uses the RDFa specification, which allows RDF data to be embedded in HTML markup. Other modules can define mappings of their data to RDF terms, and the RDF module makes this RDF data available to the theme. The core modules define RDF mappings for their data model, and the core themes output this RDF metadata information along with the human-readable visual information. For more information, see the online documentation for the RDF module.', array('@rdfa' => 'http://www.w3.org/TR/xhtml-rdfa-primer/', '@rdf' => 'https://www.drupal.org/documentation/modules/rdf')) . '
'; return $output; } } diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index 29ab66f..bea1dc7 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -27,25 +27,25 @@ function responsive_image_help($route_name, RouteMatchInterface $route_match) { case 'help.page.responsive_image': $output = ''; $output .= '' . t('The Responsive Image module provides an image formatter that allows browsers to select which image file to display based on media queries or which image file types the browser supports, using the HTML 5 picture and source elements and/or the sizes, srcset and type attributes. For more information, see the online documentation for the Responsive Image module.', array( '!responsive_image' => 'https://www.drupal.org/documentation/modules/responsive_image')) . '
'; + $output .= '' . t('The Responsive Image module provides an image formatter that allows browsers to select which image file to display based on media queries or which image file types the browser supports, using the HTML 5 picture and source elements and/or the sizes, srcset and type attributes. For more information, see the online documentation for the Responsive Image module.', array( '@responsive_image' => 'https://www.drupal.org/documentation/modules/responsive_image')) . '
'; $output .= '' . t('The RESTful Web Services module provides a framework for exposing REST resources on your site. It provides support for content entities (see the Field module help page for more information about entities) such as content, users, taxonomy terms, etc.; REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. Other modules may add support for other types of REST resources. For more information, see the online documentation for the RESTful Web Services module.', array('!rest' => 'https://www.drupal.org/documentation/modules/rest', '!field' => (\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', array('name' => 'field')) : '#')) . '
'; + $output .= '' . t('The RESTful Web Services module provides a framework for exposing REST resources on your site. It provides support for content entities (see the Field module help page for more information about entities) such as content, users, taxonomy terms, etc.; REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. Other modules may add support for other types of REST resources. For more information, see the online documentation for the RESTful Web Services module.', array('@rest' => 'https://www.drupal.org/documentation/modules/rest', '@field' => (\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', array('name' => 'field')) : '#')) . '
'; $output .= '' . t('The Search module provides the ability to set up search pages based on plugins provided by other modules. In Drupal core, there are two page-type plugins: the Content page type provides keyword searching for content managed by the Node module, and the Users page type provides keyword searching for registered users. Contributed modules may provide other page-type plugins. For more information, see the online documentation for the Search module.', array('!search-module' => 'https://www.drupal.org/documentation/modules/search')) . '
'; + $output .= '' . t('The Search module provides the ability to set up search pages based on plugins provided by other modules. In Drupal core, there are two page-type plugins: the Content page type provides keyword searching for content managed by the Node module, and the Users page type provides keyword searching for registered users. Contributed modules may provide other page-type plugins. For more information, see the online documentation for the Search module.', array('@search-module' => 'https://www.drupal.org/documentation/modules/search')) . '
'; $output .= '' . t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the settings below.', array('!cron' => \Drupal::url('system.status'))) . '
'; + return '' . t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the settings below.', array('@cron' => \Drupal::url('system.status'))) . '
'; } } @@ -776,7 +776,7 @@ function search_excerpt($keys, $text, $langcode = NULL) { // Combine the text chunks with "…" separators. The "…" needs to be // translated. Let translators have the … separator text as one chunk. - $ellipses = explode('!excerpt', t('… !excerpt … !excerpt …')); + $ellipses = explode('@excerpt', t('… @excerpt … @excerpt …')); $text = (isset($new_ranges[0]) ? '' : $ellipses[0]) . implode($ellipses[1], $out) . (($max_end < strlen($text) - 1) ? $ellipses[2] : ''); $text = Html::escape($text); diff --git a/core/modules/serialization/serialization.module b/core/modules/serialization/serialization.module index 81be3ac..90685c5 100644 --- a/core/modules/serialization/serialization.module +++ b/core/modules/serialization/serialization.module @@ -18,8 +18,8 @@ function serialization_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('The Serialization module provides a service for serializing and deserializing data to and from formats such as JSON and XML.') . '
'; $output .= '' . t('Serialization is the process of converting data structures like arrays and objects into a string. This allows the data to be represented in a way that is easy to exchange and store (for example, for transmission over the Internet or for storage in a local file system). These representations can then be deserialized to get back to the original data structures.') . '
'; $output .= '' . t('The serializer splits this process into two parts. Normalization converts an object to a normalized array structure. Encoding takes that array and converts it to a string.') . '
'; - $output .= '' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as REST.', array('!rest' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '
'; - $output .= '' . t('For more information, see the online documentation for the Serialization module.', array('!doc_url' => 'https://www.drupal.org/documentation/modules/serialization')) . '
'; + $output .= '' . t('This module does not have a user interface. It is used by other modules which need to serialize data, such as REST.', array('@rest' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '
'; + $output .= '' . t('For more information, see the online documentation for the Serialization module.', array('@doc_url' => 'https://www.drupal.org/documentation/modules/serialization')) . '
'; return $output; } } diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index be83839..1bc3577 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -20,16 +20,16 @@ function shortcut_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.shortcut': $output = '' . t('The Shortcut module allows users to create sets of shortcut links to commonly-visited pages of the site. Shortcuts are contained within sets. Each user with Select any shortcut set permission can select a shortcut set created by anyone at the site. For more information, see the online documentation for the Shortcut module.', array('!shortcut' => 'https://www.drupal.org/documentation/modules/shortcut')) . '
'; + $output .= '' . t('The Shortcut module allows users to create sets of shortcut links to commonly-visited pages of the site. Shortcuts are contained within sets. Each user with Select any shortcut set permission can select a shortcut set created by anyone at the site. For more information, see the online documentation for the Shortcut module.', array('@shortcut' => 'https://www.drupal.org/documentation/modules/shortcut')) . '
'; $output .= '' . t('The Testing module provides a framework for running automated tests. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules. For more information, see the online documentation for the Testing module.', array('!simpletest' => 'https://www.drupal.org/documentation/modules/simpletest')) . '
'; + $output .= '' . t('The Testing module provides a framework for running automated tests. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules. For more information, see the online documentation for the Testing module.', array('@simpletest' => 'https://www.drupal.org/documentation/modules/simpletest')) . '
'; $output .= '' . t('Visit the Testing page to display a list of available tests. For comprehensive testing, select all tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.', array('!admin-simpletest' => \Drupal::url('simpletest.test_form'))) . '
'; + $output .= '' . t('Visit the Testing page to display a list of available tests. For comprehensive testing, select all tests, or individually select tests for more targeted testing. Note that it might take several minutes for all tests to complete.', array('@admin-simpletest' => \Drupal::url('simpletest.test_form'))) . '
'; $output .= '' . t('After the tests run, a message will be displayed next to each test group indicating whether tests within it passed, failed, or had exceptions. A pass means that the test returned the expected results, while fail means that it did not. An exception normally indicates an error outside of the test, such as a PHP warning or notice. If there were failures or exceptions, the results will be expanded to show details, and the tests that had failures or exceptions will be indicated in red or pink rows. You can then use these results to refine your code and tests, until all tests pass.') . '
' . t('The Statistics module shows you how often content is viewed. This is useful in determining which pages of your site are most popular. For more information, see the online documentation for the Statistics module.', array('!statistics_do' => 'https://www.drupal.org/documentation/modules/statistics/')) . '
'; + $output .= '' . t('The Statistics module shows you how often content is viewed. This is useful in determining which pages of your site are most popular. For more information, see the online documentation for the Statistics module.', array('@statistics_do' => 'https://www.drupal.org/documentation/modules/statistics/')) . '
'; $output .= '' . t("The Syslog module logs events by sending messages to the logging facility of your web server's operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the online documentation for the Syslog module, as well as PHP's documentation pages for the openlog and syslog functions.", array('!syslog' => 'https://www.drupal.org/documentation/modules/syslog', '!php_openlog' => 'http://www.php.net/manual/function.openlog.php', '!php_syslog' => 'http://www.php.net/manual/function.syslog.php')) . '
'; + $output .= '' . t("The Syslog module logs events by sending messages to the logging facility of your web server's operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the online documentation for the Syslog module, as well as PHP's documentation pages for the openlog and syslog functions.", array('@syslog' => 'https://www.drupal.org/documentation/modules/syslog', '@php_openlog' => 'http://www.php.net/manual/function.openlog.php', '@php_syslog' => 'http://www.php.net/manual/function.syslog.php')) . '
'; $output .= '' . t('The System module is integral to the site: it provides user interfaces for many core systems and settings, as well as the basic administrative menu structure. For more information, see the online documentation for the System module.', array('!system' => 'https://www.drupal.org/documentation/modules/system')) . '
'; + $output .= '' . t('The System module is integral to the site: it provides user interfaces for many core systems and settings, as well as the basic administrative menu structure. For more information, see the online documentation for the System module.', array('@system' => 'https://www.drupal.org/documentation/modules/system')) . '
'; $output .= '' . t('This page shows you all available administration tasks for each module.') . '
'; case 'system.themes_page': - $output = '' . t('Set and configure the default theme for your website. Alternative themes are available.', array('!themes' => 'https://www.drupal.org/project/themes')) . '
'; + $output = '' . t('Set and configure the default theme for your website. Alternative themes are available.', array('@themes' => 'https://www.drupal.org/project/themes')) . '
'; if (\Drupal::moduleHandler()->moduleExists('block')) { $output .= '' . t('You can place blocks for each theme on the block layout page.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; } @@ -119,9 +119,9 @@ function system_help($route_name, RouteMatchInterface $route_match) { return '' . t('These options control the default display settings for your entire site, across all themes. Unless they have been overridden by a specific theme, these settings will be used.') . '
'; case 'system.modules_list': - $output = '' . t('Download additional contributed modules to extend your site\'s functionality.', array('!modules' => 'https://www.drupal.org/project/modules')) . '
'; + $output = '' . t('Download additional contributed modules to extend your site\'s functionality.', array('@modules' => 'https://www.drupal.org/project/modules')) . '
'; if (!\Drupal::moduleHandler()->moduleExists('update')) { - $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated. Enable the Update Manager module to update and install modules and themes.', array('!update-php' => \Drupal::url('system.db_update'), '!update-manager' => \Drupal::url('system.modules_list', [], ['fragment' => 'module-update']))) . '
'; + $output .= '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated. Enable the Update Manager module to update and install modules and themes.', array('@update-php' => \Drupal::url('system.db_update'), '@update-manager' => \Drupal::url('system.modules_list', [], ['fragment' => 'module-update']))) . '
'; } return $output; @@ -147,7 +147,7 @@ function system_help($route_name, RouteMatchInterface $route_match) { break; case 'system.status': - return '' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on Drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the system requirements.", array('!system-requirements' => 'https://www.drupal.org/requirements')) . '
'; + return '' . t("Here you can find a short overview of your site's parameters as well as any problems detected with your installation. It may be useful to copy and paste this information into support requests filed on Drupal.org's support forums and project issue queues. Before filing a support request, ensure that your web server meets the system requirements.", array('@system-requirements' => 'https://www.drupal.org/requirements')) . '
'; } } diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index f7c8c0e..8c6cc95 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -41,20 +41,20 @@ function taxonomy_help($route_name, RouteMatchInterface $route_match) { $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#'; $output = ''; $output .= '' . t('The Taxonomy module allows users who have permission to create and edit content to categorize (tag) content of that type. Users who have the Administer vocabularies and terms permission can add vocabularies that contain a set of related terms. The terms in a vocabulary can either be pre-set by an administrator or built gradually as content is added and edited. Terms may be organized hierarchically if desired.', array('!permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-taxonomy')))) . '
'; - $output .= '' . t('For more information, see the online documentation for the Taxonomy module.', array('!taxonomy' => 'https://www.drupal.org/documentation/modules/taxonomy/')) . '
'; + $output .= '' . t('The Taxonomy module allows users who have permission to create and edit content to categorize (tag) content of that type. Users who have the Administer vocabularies and terms permission can add vocabularies that contain a set of related terms. The terms in a vocabulary can either be pre-set by an administrator or built gradually as content is added and edited. Terms may be organized hierarchically if desired.', array('@permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-taxonomy')))) . '
'; + $output .= '' . t('For more information, see the online documentation for the Taxonomy module.', array('@taxonomy' => 'https://www.drupal.org/documentation/modules/taxonomy/')) . '
'; $output .= '' . t('The Telephone module allows you to create fields that contain telephone numbers. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Telephone module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '!telephone_documentation' => 'https://www.drupal.org/documentation/modules/telephone')) . '
'; + $output .= '' . t('The Telephone module allows you to create fields that contain telephone numbers. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Telephone module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '@telephone_documentation' => 'https://www.drupal.org/documentation/modules/telephone')) . '
'; $output .= '' . t('The Text module allows you to create short and long text fields with optional summaries. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Text module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '!text_documentation' => 'https://www.drupal.org/documentation/modules/text')) . '
'; + $output .= '' . t('The Text module allows you to create short and long text fields with optional summaries. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Text module.', array('@field' => \Drupal::url('help.page', array('name' => 'field')), '@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) :'#', '@text_documentation' => 'https://www.drupal.org/documentation/modules/text')) . '
'; $output .= '' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the online documentation for the Toolbar module.', array('!toolbar_docs' => 'https://www.drupal.org/documentation/modules/toolbar')) . '
'; + $output .= '' . t('The Toolbar module provides a toolbar for site administrators, which displays tabs and trays provided by the Toolbar module itself and other modules. For more information, see the online documentation for the Toolbar module.', array('@toolbar_docs' => 'https://www.drupal.org/documentation/modules/toolbar')) . '
'; $output .= '' . t("The Tour module provides users with guided tours of the site interface. Each tour consists of several tips that highlight elements of the user interface, guide the user through a workflow, or explain key concepts of the website. For more information, see the online documentation for the Tour module.", array('!tour' => 'https://www.drupal.org/documentation/modules/tour')) . '
'; + $output .= '' . t("The Tour module provides users with guided tours of the site interface. Each tour consists of several tips that highlight elements of the user interface, guide the user through a workflow, or explain key concepts of the website. For more information, see the online documentation for the Tour module.", array('@tour' => 'https://www.drupal.org/documentation/modules/tour')) . '
'; $output .= '' . t('The Activity Tracker module displays the most recently added and updated content on your site, and allows you to follow new content created by each user. This module has no configuration options. For more information, see the online documentation for the Tracker module.', array('!tracker' => 'https://www.drupal.org/documentation/modules/tracker')) . '
'; + $output .= '' . t('The Activity Tracker module displays the most recently added and updated content on your site, and allows you to follow new content created by each user. This module has no configuration options. For more information, see the online documentation for the Tracker module.', array('@tracker' => 'https://www.drupal.org/documentation/modules/tracker')) . '
'; $output .= '' . t('The Update Manager module periodically checks for new versions of your site\'s software (including contributed modules and themes), and alerts administrators to available updates. The Update Manager system is also used by some other modules to manage updates and downloads; for example, the Interface Translation module uses the Update Manager to download translations from the localization server. Note that whenever the Update Manager system is used, anonymous usage statistics are sent to Drupal.org. If desired, you may disable the Update Manager module from the Extend page; if you do so, functionality that depends on the Update Manager system will not work. For more information, see the online documentation for the Update Manager module.', array('!update' => 'https://www.drupal.org/documentation/modules/update', '!modules' => \Drupal::url('system.modules_list'))) . '
'; + $output .= '' . t('The Update Manager module periodically checks for new versions of your site\'s software (including contributed modules and themes), and alerts administrators to available updates. The Update Manager system is also used by some other modules to manage updates and downloads; for example, the Interface Translation module uses the Update Manager to download translations from the localization server. Note that whenever the Update Manager system is used, anonymous usage statistics are sent to Drupal.org. If desired, you may disable the Update Manager module from the Extend page; if you do so, functionality that depends on the Update Manager system will not work. For more information, see the online documentation for the Update Manager module.', array('@update' => 'https://www.drupal.org/documentation/modules/update', '@modules' => \Drupal::url('system.modules_list'))) . '
'; // Only explain the Update manager if it has not been disabled. if (_update_manager_access()) { $output .= '' . t('The Update Manager also allows administrators to update and install modules and themes through the administration interface.') . '
'; @@ -80,13 +80,13 @@ function update_help($route_name, RouteMatchInterface $route_match) { $output .= '' . t('Regularly review and install available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('!update-php' => \Drupal::url('system.db_update'), '!updates' => \Drupal::url('update.status'))) . '
'; + $output = '' . t('Regularly review and install available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => \Drupal::url('system.db_update'), '@updates' => \Drupal::url('update.status'))) . '
'; } else { - $output = '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('!update-php' => \Drupal::url('system.db_update'), '!updates' => \Drupal::url('update.status'))) . '
'; + $output = '' . t('Regularly review available updates to maintain a secure and current site. Always run the update script each time a module is updated.', array('@update-php' => \Drupal::url('system.db_update'), '@updates' => \Drupal::url('update.status'))) . '
'; } return $output; } @@ -623,9 +623,9 @@ function update_verify_update_archive($project, $archive_file, $directory) { elseif (!$compatible_project) { $errors[] = \Drupal::translation()->formatPlural( count($incompatible), - '%archive_file contains a version of %names that is not compatible with Drupal !version.', - '%archive_file contains versions of modules or themes that are not compatible with Drupal !version: %names', - array('!version' => \Drupal::CORE_COMPATIBILITY, '%archive_file' => drupal_basename($archive_file), '%names' => implode(', ', $incompatible)) + '%archive_file contains a version of %names that is not compatible with Drupal @version.', + '%archive_file contains versions of modules or themes that are not compatible with Drupal @version: %names', + array('@version' => \Drupal::CORE_COMPATIBILITY, '%archive_file' => drupal_basename($archive_file), '%names' => implode(', ', $incompatible)) ); } diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php index 57f5ced..2f91651 100644 --- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php +++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php @@ -73,7 +73,7 @@ public function validate($items, Constraint $constraint) { $required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users')); if ($required && (!isset($items) || $items->isEmpty())) { - $this->context->addViolation($this->message, ['!name' => Html::escape($account->getFieldDefinition('mail')->getLabel())]); + $this->context->addViolation($this->message, ['!name' => $account->getFieldDefinition('mail')->getLabel()]); } } 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)); diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php index c2d2db1..55c6ea4 100644 --- a/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -122,7 +122,7 @@ function hook_user_cancel_methods_alter(&$methods) { function hook_user_format_name_alter(&$name, $account) { // Display the user's uid instead of name. if ($account->id()) { - $name = t('User !uid', array('!uid' => $account->id())); + $name = t('User @uid', array('@uid' => $account->id())); } } diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 4b4bd6f..2cb7376 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -54,19 +54,19 @@ function user_help($route_name, RouteMatchInterface $route_match) { case 'help.page.user': $output = ''; $output .= '' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the online documentation for the User module.', array('!user_docs' => 'https://www.drupal.org/documentation/modules/user')) . '
'; + $output .= '' . t('The User module allows users to register, log in, and log out. It also allows users with proper permissions to manage user roles and permissions. For more information, see the online documentation for the User module.', array('@user_docs' => 'https://www.drupal.org/documentation/modules/user')) . '
'; $output .= '' . t("This web page allows administrators to register new users. Users' email addresses and usernames must be unique.") . '
'; case 'user.admin_permissions': - return '' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('!role' => \Drupal::url('entity.user_role.collection'), '!settings' => \Drupal::url('entity.user.admin_form'))) . '
'; + return '' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role.) Any permissions granted to the Authenticated user role will be given to any user who is logged in to your site. From the Account settings page, you can make any role into an Administrator role for the site, meaning that role will be granted all new permissions automatically. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('@role' => \Drupal::url('entity.user_role.collection'), '@settings' => \Drupal::url('entity.user.admin_form'))) . '
'; case 'entity.user_role.collection': - return '' . t('A role defines a group of users that have certain privileges. These privileges are defined on the Permissions page. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', array('!permissions' => \Drupal::url('user.admin_permissions'))) . '
'; + return '' . t('A role defines a group of users that have certain privileges. These privileges are defined on the Permissions page. Here, you can define the names and the display sort order of the roles on your site. It is recommended to order roles from least permissive (for example, Anonymous user) to most permissive (for example, Administrator user). Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.', array('@permissions' => \Drupal::url('user.admin_permissions'))) . '
'; case 'entity.user.field_ui_fields': return '' . t('This form lets administrators add and edit fields for storing user data.') . '
'; diff --git a/core/modules/views/src/Plugin/Derivative/ViewsBlock.php b/core/modules/views/src/Plugin/Derivative/ViewsBlock.php index 3ebfc5f..9b0947c 100644 --- a/core/modules/views/src/Plugin/Derivative/ViewsBlock.php +++ b/core/modules/views/src/Plugin/Derivative/ViewsBlock.php @@ -93,10 +93,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { if (empty($desc)) { if ($display->display['display_title'] == $display->definition['title']) { - $desc = t('!view', array('!view' => $view->label())); + $desc = t('@view', array('@view' => $view->label())); } else { - $desc = t('!view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title'])); + $desc = t('@view: @display', array('@view' => $view->label(), '@display' => $display->display['display_title'])); } } $this->derivatives[$delta] = array( diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index f2e5604..0d001a4 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -185,7 +185,7 @@ public function adminLabel($short = FALSE) { return $title; } $title = ($short && isset($this->definition['title short'])) ? $this->definition['title short'] : $this->definition['title']; - return $this->t('!group: !title', array('!group' => $this->definition['group'], '!title' => $title)); + return $this->t('@group: @title', array('@group' => $this->definition['group'], '@title' => $title)); } /** diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 49b7f1d..11f54ac 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -568,7 +568,7 @@ protected function listLanguages($flags = LanguageInterface::STATE_ALL, array $c $name = $types_info[$id]['name']; // Surround IDs by '***LANGUAGE_...***', to avoid query collisions. $id = '***LANGUAGE_' . $id . '***'; - $list[$id] = $this->t('!type language selected for page', array('!type' => $name)); + $list[$id] = $this->t('@type language selected for page', array('@type' => $name)); } } if (!empty($current_values)) { @@ -578,7 +578,7 @@ protected function listLanguages($flags = LanguageInterface::STATE_ALL, array $c // add that option too, so it is not lost. If not among the current // values, skip displaying it to avoid user confusion. if (isset($type['name']) && !isset($list[$id]) && in_array($id, $current_values)) { - $list[$id] = $this->t('!type language selected for page', array('!type' => $type['name'])); + $list[$id] = $this->t('@type language selected for page', array('@type' => $type['name'])); } } } diff --git a/core/modules/views/src/Plugin/views/area/HTTPStatusCode.php b/core/modules/views/src/Plugin/views/area/HTTPStatusCode.php index 036e369..cadb796 100644 --- a/core/modules/views/src/Plugin/views/area/HTTPStatusCode.php +++ b/core/modules/views/src/Plugin/views/area/HTTPStatusCode.php @@ -48,7 +48,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { // Add the HTTP status code, so it's easier for people to find it. array_walk($options, function($title, $code) use(&$options) { - $options[$code] = $this->t('@code (!title)', array('@code' => $code, '!title' => $title)); + $options[$code] = $this->t('@code (@title)', array('@code' => $code, '@title' => $title)); }); $form['status_code'] = array( diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 35e9b92..9ec7876 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1544,7 +1544,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { if ($access_plugin->usesOptions()) { $form['markup'] = array( '#prefix' => '' . t('The Views module provides a back end to fetch information from content, user accounts, taxonomy terms, and other entities from the database and present it to the user as a grid, HTML list, table, unformatted list, etc. The resulting displays are known generally as views.') . '
'; - $output .= '' . t('For more information, see the online documentation for the Views module.', array('!views' => 'https://www.drupal.org/documentation/modules/views')) . '
'; - $output .= '' . t('In order to create and modify your own views using the administration and configuration user interface, you will need to enable either the Views UI module in core or a contributed module that provides a user interface for Views. See the Views UI module help page for more information.', array('!views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; + $output .= '' . t('For more information, see the online documentation for the Views module.', array('@views' => 'https://www.drupal.org/documentation/modules/views')) . '
'; + $output .= '' . t('In order to create and modify your own views using the administration and configuration user interface, you will need to enable either the Views UI module in core or a contributed module that provides a user interface for Views. See the Views UI module help page for more information.', array('@views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; $output .= '