diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 3467c01..2a121b3 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2155,7 +2155,7 @@ function install_display_requirements($install_state, $requirements) { } else { $build['#title'] = t('Requirements problem'); - $build['#suffix'] = t('Check the messages and try again.', array('@url' => UrlHelper::stripDangerousProtocols(drupal_requirements_url($severity)))); + $build['#suffix'] = t('Check the messages and try again.', array('!url' => UrlHelper::stripDangerousProtocols(drupal_requirements_url($severity)))); } return $build; } diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc index 56ffd76..ffe0a36 100644 --- a/core/includes/unicode.inc +++ b/core/includes/unicode.inc @@ -29,26 +29,26 @@ function unicode_requirements() { 'value' => $libraries[$library], 'severity' => $severities[$library], ); - $t_args = array('@url' => 'http://www.php.net/mbstring'); + $t_args = array('!url' => 'http://www.php.net/mbstring'); switch ($failed_check) { case 'mb_strlen': - $requirements['unicode']['description'] = t('Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.', $t_args); + $requirements['unicode']['description'] = t('Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.', $t_args); break; case 'mbstring.func_overload': - $requirements['unicode']['description'] = t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini mbstring.func_overload setting. Please refer to the PHP mbstring documentation for more information.', $t_args); + $requirements['unicode']['description'] = t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini mbstring.func_overload setting. Please refer to the PHP mbstring documentation for more information.', $t_args); break; case 'mbstring.encoding_translation': - $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.encoding_translation setting. Please refer to the PHP mbstring documentation for more information.', $t_args); + $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.encoding_translation setting. Please refer to the PHP mbstring documentation for more information.', $t_args); break; case 'mbstring.http_input': - $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentation for more information.', $t_args); + $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentation for more information.', $t_args); break; case 'mbstring.http_output': - $requirements['unicode']['description'] = t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_output setting. Please refer to the PHP mbstring documentation for more information.', $t_args); + $requirements['unicode']['description'] = t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_output setting. Please refer to the PHP mbstring documentation for more information.', $t_args); break; } diff --git a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php index 92071da..471b150 100644 --- a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php @@ -116,7 +116,7 @@ public function onKernelRequestMaintenance(GetResponseEvent $event) { // settings page. if ($route_match->getRouteName() != 'system.site_maintenance_mode') { if ($this->account->hasPermission('administer site configuration')) { - $this->drupalSetMessage($this->t('Operating in maintenance mode. Go online.', array('@url' => $this->urlGenerator->generate('system.site_maintenance_mode'))), 'status', FALSE); + $this->drupalSetMessage($this->t('Operating in maintenance mode. Go online.', array('!url' => $this->urlGenerator->generate('system.site_maintenance_mode'))), 'status', FALSE); } else { $this->drupalSetMessage($this->t('Operating in maintenance mode.'), 'status', FALSE); diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index fef4c32..6aaeced 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -950,7 +950,7 @@ function hook_requirements($phase) { } else { $requirements['cron'] = array( - 'description' => t('Cron has not run. It appears cron jobs have not been setup on your system. Check the help pages for configuring cron jobs.', array('@url' => 'https://www.drupal.org/cron')), + 'description' => t('Cron has not run. It appears cron jobs have not been setup on your system. Check the help pages for configuring cron jobs.', array('!url' => 'https://www.drupal.org/cron')), 'severity' => REQUIREMENT_ERROR, 'value' => t('Never run'), ); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php index 36bfe15..bcb6bcf 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php @@ -126,7 +126,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { $elements['custom_date_format'] = array( '#type' => 'textfield', '#title' => $this->t('Custom date format'), - '#description' => $this->t('See the documentation for PHP date formats.', ['@url' => 'http://php.net/manual/function.date.php']), + '#description' => $this->t('See the documentation for PHP date formats.', ['!url' => 'http://php.net/manual/function.date.php']), '#default_value' => $this->getSetting('custom_date_format') ?: '', ); diff --git a/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php b/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php index 733c449..f106244 100644 --- a/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php +++ b/core/lib/Drupal/Core/Utility/LinkGeneratorInterface.php @@ -31,7 +31,7 @@ * However, for links enclosed in translatable text you should use t() and * embed the HTML anchor tag directly in the translated string. For example: * @code - * $text = t('Visit the content types page', array('@url' => \Drupal::url('entity.node_type.collection'))); + * $text = t('Visit the content types page', array('!url' => \Drupal::url('entity.node_type.collection'))); * @endcode * This keeps the context of the link title ('settings' in the example) for * translators. diff --git a/core/modules/action/src/Plugin/Action/GotoAction.php b/core/modules/action/src/Plugin/Action/GotoAction.php index 770f424..af493e7 100644 --- a/core/modules/action/src/Plugin/Action/GotoAction.php +++ b/core/modules/action/src/Plugin/Action/GotoAction.php @@ -101,7 +101,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta $form['url'] = array( '#type' => 'textfield', '#title' => t('URL'), - '#description' => t('The URL to which the user should be redirected. This can be an internal URL like node/1234 or an external URL like @url.', array('@url' => 'http://example.com')), + '#description' => t('The URL to which the user should be redirected. This can be an internal URL like node/1234 or an external URL like !url.', array('!url' => 'http://example.com')), '#default_value' => $this->configuration['url'], '#required' => TRUE, ); diff --git a/core/modules/color/color.install b/core/modules/color/color.install index c3f9a74..109ced8 100644 --- a/core/modules/color/color.install +++ b/core/modules/color/color.install @@ -22,14 +22,14 @@ function color_requirements($phase) { // Check for PNG support. if (!function_exists('imagecreatefrompng')) { $requirements['color_gd']['severity'] = REQUIREMENT_WARNING; - $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the PHP image documentation for information on how to correct this.', array('@url' => 'http://www.php.net/manual/ref.image.php')); + $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the PHP image documentation for information on how to correct this.', array('!url' => 'http://www.php.net/manual/ref.image.php')); } } else { $requirements['color_gd'] = array( 'value' => t('Not installed'), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The GD library for PHP is missing or outdated. Check the PHP image documentation for information on how to correct this.', array('@url' => 'http://www.php.net/manual/book.image.php')), + 'description' => t('The GD library for PHP is missing or outdated. Check the PHP image documentation for information on how to correct this.', array('!url' => 'http://www.php.net/manual/book.image.php')), ); } $requirements['color_gd']['title'] = t('GD library PNG support'); diff --git a/core/modules/color/color.module b/core/modules/color/color.module index a8fe26b..a6ebebf 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -410,7 +410,7 @@ function color_scheme_form_submit($form, FormStateInterface $form_state) { $memory_limit = ini_get('memory_limit'); $size = Bytes::toInt($memory_limit); if (!Environment::checkMemoryLimit($usage + $required, $memory_limit)) { - drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the PHP documentation for more information.', array('%size' => format_size($usage + $required - $size), '@url' => 'http://www.php.net/manual/ini.core.php#ini.sect.resource-limits')), 'error'); + drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the PHP documentation for more information.', array('%size' => format_size($usage + $required - $size), '!url' => 'http://www.php.net/manual/ini.core.php#ini.sect.resource-limits')), 'error'); return; } } diff --git a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php index c9e23e9..da5ea06 100644 --- a/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php +++ b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php @@ -187,7 +187,7 @@ public function storageSettingsForm(array &$form, FormStateInterface $form_state '#title' => t('Comment type'), '#options' => $options, '#required' => TRUE, - '#description' => $this->t('Select the Comment type to use for this comment field. Manage the comment types from the administration overview page.', array('@url' => $this->url('entity.comment_type.collection'))), + '#description' => $this->t('Select the Comment type to use for this comment field. Manage the comment types from the administration overview page.', array('!url' => $this->url('entity.comment_type.collection'))), '#default_value' => $this->getSetting('comment_type'), '#disabled' => $has_data, ); diff --git a/core/modules/config_translation/src/Controller/ConfigTranslationController.php b/core/modules/config_translation/src/Controller/ConfigTranslationController.php index 2dc7603..3d33a56 100644 --- a/core/modules/config_translation/src/Controller/ConfigTranslationController.php +++ b/core/modules/config_translation/src/Controller/ConfigTranslationController.php @@ -129,7 +129,7 @@ public function itemPage(Request $request, RouteMatchInterface $route_match, $pl $languages = $this->languageManager->getLanguages(); if (count($languages) == 1) { - drupal_set_message($this->t('In order to translate configuration, the website must have at least two languages.', array('@url' => $this->url('entity.configurable_language.collection'))), 'warning'); + drupal_set_message($this->t('In order to translate configuration, the website must have at least two languages.', array('!url' => $this->url('entity.configurable_language.collection'))), 'warning'); } $original_langcode = $mapper->getLangcode(); if (!isset($languages[$original_langcode])) { diff --git a/core/modules/config_translation/src/FormElement/DateFormat.php b/core/modules/config_translation/src/FormElement/DateFormat.php index db291f7..3f7b31d 100644 --- a/core/modules/config_translation/src/FormElement/DateFormat.php +++ b/core/modules/config_translation/src/FormElement/DateFormat.php @@ -20,7 +20,7 @@ class DateFormat extends FormElementBase { public function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) { /** @var \Drupal\Core\Datetime\DateFormatter $date_formatter */ $date_formatter = \Drupal::service('date.formatter'); - $description = $this->t('A user-defined date format. See the PHP manual for available options.', array('@url' => 'http://php.net/manual/function.date.php')); + $description = $this->t('A user-defined date format. See the PHP manual for available options.', array('!url' => 'http://php.net/manual/function.date.php')); $format = $this->t('Displayed as %date_format', array('%date_format' => $date_formatter->format(REQUEST_TIME, 'custom', $translation_config))); return [ diff --git a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php index 9b3669e..5624920 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php +++ b/core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php @@ -84,7 +84,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { $form['date_format'] = array( '#type' => 'textfield', '#title' => $this->t('Date/time format'), - '#description' => $this->t('See the documentation for PHP date formats.', ['@url' => 'http://php.net/manual/function.date.php']), + '#description' => $this->t('See the documentation for PHP date formats.', ['!url' => 'http://php.net/manual/function.date.php']), '#default_value' => $this->getSetting('date_format'), ); diff --git a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php index e277c14..27507a0 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state) 'default_date' => array( '#type' => 'textfield', '#title' => t('Relative default value'), - '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See @strtotime for more details.", array('@strtotime' => 'strtotime', '@url' => 'http://www.php.net/manual/en/function.strtotime.php')), + '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See @strtotime for more details.", array('@strtotime' => 'strtotime', '!url' => 'http://www.php.net/manual/en/function.strtotime.php')), '#default_value' => (isset($default_value[0]['default_date_type']) && $default_value[0]['default_date_type'] == static::DEFAULT_VALUE_CUSTOM) ? $default_value[0]['default_date'] : '', '#states' => array( 'visible' => array( diff --git a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php index e807073..165fc67 100644 --- a/core/modules/field_ui/src/Form/EntityDisplayFormBase.php +++ b/core/modules/field_ui/src/Form/EntityDisplayFormBase.php @@ -530,7 +530,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $display_mode_label = $display_modes[$mode]['label']; $url = $this->getOverviewUrl($mode); - drupal_set_message($this->t('The %display_mode mode now uses custom display settings. You might want to configure them.', ['%display_mode' => $display_mode_label, '@url' => $url->toString()])); + drupal_set_message($this->t('The %display_mode mode now uses custom display settings. You might want to configure them.', ['%display_mode' => $display_mode_label, '!url' => $url->toString()])); } $statuses[$mode] = !empty($value); } diff --git a/core/modules/file/file.install b/core/modules/file/file.install index fd3503c..49788c1 100644 --- a/core/modules/file/file.install +++ b/core/modules/file/file.install @@ -98,18 +98,18 @@ function file_requirements($phase) { } elseif (!$implementation && extension_loaded('apc')) { $value = t('Not enabled'); - $description = t('Your server is capable of displaying file upload progress through APC, but it is not enabled. Add apc.rfc1867 = 1 to your php.ini configuration. Alternatively, it is recommended to use PECL uploadprogress, which supports more than one simultaneous upload.', array('@url' => 'http://pecl.php.net/package/uploadprogress')); + $description = t('Your server is capable of displaying file upload progress through APC, but it is not enabled. Add apc.rfc1867 = 1 to your php.ini configuration. Alternatively, it is recommended to use PECL uploadprogress, which supports more than one simultaneous upload.', array('!url' => 'http://pecl.php.net/package/uploadprogress')); } elseif (!$implementation) { $value = t('Not enabled'); $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library (preferred) or to install APC.', array('@uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress', '@apc_url' => 'http://php.net/apc')); } elseif ($implementation == 'apc') { - $value = t('Enabled (APC RFC1867)', array('@url' => 'http://php.net/manual/apc.configuration.php#ini.apc.rfc1867')); - $description = t('Your server is capable of displaying file upload progress using APC RFC1867. Note that only one upload at a time is supported. It is recommended to use the PECL uploadprogress library if possible.', array('@url' => 'http://pecl.php.net/package/uploadprogress')); + $value = t('Enabled (APC RFC1867)', array('!url' => 'http://php.net/manual/apc.configuration.php#ini.apc.rfc1867')); + $description = t('Your server is capable of displaying file upload progress using APC RFC1867. Note that only one upload at a time is supported. It is recommended to use the PECL uploadprogress library if possible.', array('!url' => 'http://pecl.php.net/package/uploadprogress')); } elseif ($implementation == 'uploadprogress') { - $value = t('Enabled (PECL uploadprogress)', array('@url' => 'http://pecl.php.net/package/uploadprogress')); + $value = t('Enabled (PECL uploadprogress)', array('!url' => 'http://pecl.php.net/package/uploadprogress')); } $requirements['file_progress'] = array( 'title' => t('Upload progress'), diff --git a/core/modules/filter/src/FilterPermissions.php b/core/modules/filter/src/FilterPermissions.php index 1055fde..c31a5ea 100644 --- a/core/modules/filter/src/FilterPermissions.php +++ b/core/modules/filter/src/FilterPermissions.php @@ -58,7 +58,7 @@ public function permissions() { foreach ($formats as $format) { if ($permission = $format->getPermissionName()) { $permissions[$permission] = [ - 'title' => $this->t('Use the @label text format', ['@url' => $format->url(), '@label' => $format->label()]), + 'title' => $this->t('Use the @label text format', ['!url' => $format->url(), '@label' => $format->label()]), 'description' => [ '#prefix' => '', '#markup' => $this->t('Warning: This permission may have security implications depending on how the text format is configured.'), diff --git a/core/modules/forum/src/ForumUninstallValidator.php b/core/modules/forum/src/ForumUninstallValidator.php index 9c6220d..73a540c 100644 --- a/core/modules/forum/src/ForumUninstallValidator.php +++ b/core/modules/forum/src/ForumUninstallValidator.php @@ -76,9 +76,9 @@ public function validate($module) { $vocabulary = $this->getForumVocabulary(); if ($this->hasTermsForVocabulary($vocabulary)) { if ($vocabulary->access('view')) { - $reasons[] = $this->t('To uninstall Forum, first delete all %vocabulary terms', [ + $reasons[] = $this->t('To uninstall Forum, first delete all %vocabulary terms', [ '%vocabulary' => $vocabulary->label(), - '@url' => $vocabulary->url('overview-form'), + '!url' => $vocabulary->url('overview-form'), ]); } else { diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php index dbccf77..d696016 100644 --- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php +++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php @@ -212,7 +212,7 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) { '#weight' => 4.1, '#field_prefix' => '
', '#field_suffix' => '
', - '#description' => t('The maximum allowed image size expressed as WIDTH×HEIGHT (e.g. 640×480). Leave blank for no restriction. If a larger image is uploaded, it will be resized to reflect the given width and height. Resizing images on upload will cause the loss of EXIF data in the image.', array('@url' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')), + '#description' => t('The maximum allowed image size expressed as WIDTH×HEIGHT (e.g. 640×480). Leave blank for no restriction. If a larger image is uploaded, it will be resized to reflect the given width and height. Resizing images on upload will cause the loss of EXIF data in the image.', array('!url' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')), ); $element['max_resolution']['x'] = array( '#type' => 'number', diff --git a/core/modules/language/src/Form/LanguageFormBase.php b/core/modules/language/src/Form/LanguageFormBase.php index bbafe0e..209d8bf 100644 --- a/core/modules/language/src/Form/LanguageFormBase.php +++ b/core/modules/language/src/Form/LanguageFormBase.php @@ -101,9 +101,9 @@ public function commonForm(array &$form) { public function validateCommon(array $form, FormStateInterface $form_state) { // Ensure sane field values for langcode and name. if (!isset($form['langcode_view']) && !preg_match('@^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$@', $form_state->getValue('langcode'))) { - $form_state->setErrorByName('langcode', $this->t('%field must be a valid language tag as defined by the W3C.', array( + $form_state->setErrorByName('langcode', $this->t('%field must be a valid language tag as defined by the W3C.', array( '%field' => $form['langcode']['#title'], - '@url' => 'http://www.w3.org/International/articles/language-tags/', + '!url' => 'http://www.w3.org/International/articles/language-tags/', ))); } if ($form_state->getValue('label') != Html::escape($form_state->getValue('label'))) { diff --git a/core/modules/language/src/Form/NegotiationUrlForm.php b/core/modules/language/src/Form/NegotiationUrlForm.php index 588df30..0255d81 100644 --- a/core/modules/language/src/Form/NegotiationUrlForm.php +++ b/core/modules/language/src/Form/NegotiationUrlForm.php @@ -153,8 +153,8 @@ public function validateForm(array &$form, FormStateInterface $form_state) { if (!($default_langcode == $langcode) && $form_state->getValue('language_negotiation_url_part') == LanguageNegotiationUrl::CONFIG_PATH_PREFIX) { // Throw a form error if the prefix is blank for a non-default language, // although it is required for selected negotiation type. - $form_state->setErrorByName("prefix][$langcode", $this->t('The prefix may only be left blank for the selected detection fallback language.', [ - '@url' => $this->getUrlGenerator()->generate('language.negotiation_selected'), + $form_state->setErrorByName("prefix][$langcode", $this->t('The prefix may only be left blank for the selected detection fallback language.', [ + '!url' => $this->getUrlGenerator()->generate('language.negotiation_selected'), ])); } } diff --git a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php index 0927c2d..3504e13 100644 --- a/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageCustomLanguageConfigurationTest.php @@ -55,9 +55,9 @@ public function testLanguageConfiguration() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); - $this->assertRaw(t('%field must be a valid language tag as defined by the W3C.', array( + $this->assertRaw(t('%field must be a valid language tag as defined by the W3C.', array( '%field' => t('Language code'), - '@url' => 'http://www.w3.org/International/articles/language-tags/', + '!url' => 'http://www.w3.org/International/articles/language-tags/', ))); $this->assertRaw(t('%field cannot contain any markup.', array('%field' => t('Language name')))); diff --git a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php index 4645d68..5fdb583 100644 --- a/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php +++ b/core/modules/language/src/Tests/LanguageUILanguageNegotiationTest.php @@ -471,19 +471,19 @@ function testLanguageDomain() { $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString(); $url_scheme = \Drupal::request()->isSecure() ? 'https://' : 'http://'; $correct_link = $url_scheme . $link; - $this->assertEqual($italian_url, $correct_link, format_string('The right URL (@url) in accordance with the chosen language', array('@url' => $italian_url))); + $this->assertEqual($italian_url, $correct_link, format_string('The right URL (!url) in accordance with the chosen language', array('!url' => $italian_url))); // Test HTTPS via options. $italian_url = Url::fromRoute('system.admin', [], ['https' => TRUE, 'language' => $languages['it']])->toString(); $correct_link = 'https://' . $link; - $this->assertTrue($italian_url == $correct_link, format_string('The right HTTPS URL (via options) (@url) in accordance with the chosen language', array('@url' => $italian_url))); + $this->assertTrue($italian_url == $correct_link, format_string('The right HTTPS URL (via options) (!url) in accordance with the chosen language', array('!url' => $italian_url))); // Test HTTPS via current URL scheme. $request = Request::create('', 'GET', array(), array(), array(), array('HTTPS' => 'on')); $this->container->get('request_stack')->push($request); $italian_url = Url::fromRoute('system.admin', [], ['language' => $languages['it']])->toString(); $correct_link = 'https://' . $link; - $this->assertTrue($italian_url == $correct_link, format_string('The right URL (via current URL scheme) (@url) in accordance with the chosen language', array('@url' => $italian_url))); + $this->assertTrue($italian_url == $correct_link, format_string('The right URL (via current URL scheme) (!url) in accordance with the chosen language', array('!url' => $italian_url))); } /** diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc index 4b67ddb..2d7f115 100644 --- a/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -99,7 +99,7 @@ function locale_translation_batch_status_finished($success, $results) { if ($success) { if (isset($results['failed_files'])) { if (\Drupal::moduleHandler()->moduleExists('dblog') && \Drupal::currentUser()->hasPermission('access site reports')) { - $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation file could not be checked. See the log for details.', '@count translation files could not be checked. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))); + $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation file could not be checked. See the log for details.', '@count translation files could not be checked. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))); } else { $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation files could not be checked. See the log for details.', '@count translation files could not be checked. See the log for details.'); @@ -265,7 +265,7 @@ function locale_translation_http_check($uri) { $logger->notice('Translation file not found: @uri.', array('@uri' => $uri)); return TRUE; } - $logger->notice('HTTP request to @url failed with error: @error.', array('@url' => $uri, '@error' => $response->getStatusCode() . ' ' . $response->getReasonPhrase())); + $logger->notice('HTTP request to !url failed with error: @error.', array('!url' => $uri, '@error' => $response->getStatusCode() . ' ' . $response->getReasonPhrase())); } } diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 43c0d6c..f7bf8f1 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -367,7 +367,7 @@ function locale_translate_batch_finished($success, array $results) { $additions = $updates = $deletes = $skips = $config = 0; if (isset($results['failed_files'])) { if (\Drupal::moduleHandler()->moduleExists('dblog') && \Drupal::currentUser()->hasPermission('access site reports')) { - $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation file could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))); + $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation file could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))); } else { $message = \Drupal::translation()->formatPlural(count($results['failed_files']), 'One translation file could not be imported. See the log for details.', '@count translation files could not be imported. See the log for details.'); @@ -398,7 +398,7 @@ function locale_translate_batch_finished($success, array $results) { if ($skips) { if (\Drupal::moduleHandler()->moduleExists('dblog') && \Drupal::currentUser()->hasPermission('access site reports')) { - $message = \Drupal::translation()->formatPlural($skips, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))); + $message = \Drupal::translation()->formatPlural($skips, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))); } else { $message = \Drupal::translation()->formatPlural($skips, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.'); diff --git a/core/modules/locale/src/Form/LocaleSettingsForm.php b/core/modules/locale/src/Form/LocaleSettingsForm.php index a875800..3b5b8ef 100644 --- a/core/modules/locale/src/Form/LocaleSettingsForm.php +++ b/core/modules/locale/src/Form/LocaleSettingsForm.php @@ -43,14 +43,14 @@ public function buildForm(array $form, FormStateInterface $form_state) { '7' => $this->t('Weekly'), '30' => $this->t('Monthly'), ), - '#description' => $this->t('Select how frequently you want to check for new interface translations for your currently installed modules and themes. Check updates now.', array('@url' => $this->url('locale.check_translation'))), + '#description' => $this->t('Select how frequently you want to check for new interface translations for your currently installed modules and themes. Check updates now.', array('!url' => $this->url('locale.check_translation'))), ); if ($directory = $config->get('translation.path')) { - $description = $this->t('Translation files are stored locally in the %path directory. You can change this directory on the File system configuration page.', array('%path' => $directory, '@url' => $this->url('system.file_system_settings'))); + $description = $this->t('Translation files are stored locally in the %path directory. You can change this directory on the File system configuration page.', array('%path' => $directory, '!url' => $this->url('system.file_system_settings'))); } else { - $description = $this->t('Translation files will not be stored locally. Change the Interface translation directory on the File system configuration page.', array('@url' => $this->url('system.file_system_settings'))); + $description = $this->t('Translation files will not be stored locally. Change the Interface translation directory on the File system configuration page.', array('!url' => $this->url('system.file_system_settings'))); } $form['#translation_directory'] = $directory; $form['use_source'] = array( @@ -95,7 +95,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { parent::validateForm($form, $form_state); if (empty($form['#translation_directory']) && $form_state->getValue('use_source') == LOCALE_TRANSLATION_USE_SOURCE_LOCAL) { - $form_state->setErrorByName('use_source', $this->t('You have selected local translation source, but no Interface translation directory was configured.', array('@url' => $this->url('system.file_system_settings')))); + $form_state->setErrorByName('use_source', $this->t('You have selected local translation source, but no Interface translation directory was configured.', array('!url' => $this->url('system.file_system_settings')))); } } diff --git a/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php b/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php index 05af294..088a442 100644 --- a/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php +++ b/core/modules/locale/src/Tests/LocaleImportFunctionalTest.php @@ -90,7 +90,7 @@ public function testStandalonePoFile() { // The import should have created 1 string and rejected 2. $this->assertRaw(t('One translation file imported. %number translations were added, %update translations were updated and %delete translations were removed.', array('%number' => 1, '%update' => 0, '%delete' => 0)), 'The translation file was successfully imported.'); - $skip_message = \Drupal::translation()->formatPlural(2, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))); + $skip_message = \Drupal::translation()->formatPlural(2, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))); $this->assertRaw($skip_message, 'Unsafe strings were skipped.'); // Repeat the process with a user that can access site reports, and this @@ -102,7 +102,7 @@ public function testStandalonePoFile() { 'langcode' => 'fr', )); - $skip_message = \Drupal::translation()->formatPlural(2, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))); + $skip_message = \Drupal::translation()->formatPlural(2, 'One translation string was skipped because of disallowed or malformed HTML. See the log for details.', '@count translation strings were skipped because of disallowed or malformed HTML. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))); $this->assertRaw($skip_message, 'Unsafe strings were skipped.'); // Check empty files import with a user that cannot access site reports.. @@ -122,7 +122,7 @@ public function testStandalonePoFile() { 'langcode' => 'fr', )); // The import should have created 0 string and rejected 0. - $this->assertRaw(t('One translation file could not be imported. See the log for details.', array('@url' => \Drupal::url('dblog.overview'))), 'The empty translation file import reported no translations imported.'); + $this->assertRaw(t('One translation file could not be imported. See the log for details.', array('!url' => \Drupal::url('dblog.overview'))), 'The empty translation file import reported no translations imported.'); // Try importing a .po file which doesn't exist. $name = $this->randomMachineName(16); diff --git a/core/modules/menu_ui/src/MenuForm.php b/core/modules/menu_ui/src/MenuForm.php index 8b4f6e7..6c2d66c 100644 --- a/core/modules/menu_ui/src/MenuForm.php +++ b/core/modules/menu_ui/src/MenuForm.php @@ -277,8 +277,8 @@ protected function buildOverviewForm(array &$form, FormStateInterface $form_stat ), ); - $form['links']['#empty'] = $this->t('There are no menu links yet. Add link.', [ - '@url' => $this->url('entity.menu.add_link_form', ['menu' => $this->entity->id()], [ + $form['links']['#empty'] = $this->t('There are no menu links yet. Add link.', [ + '!url' => $this->url('entity.menu.add_link_form', ['menu' => $this->entity->id()], [ 'query' => ['destination' => $this->entity->url('edit-form')], ]), ]); diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install index 3b13162..ed86c2b 100644 --- a/core/modules/simpletest/simpletest.install +++ b/core/modules/simpletest/simpletest.install @@ -57,7 +57,7 @@ function simpletest_requirements($phase) { $memory_limit = ini_get('memory_limit'); if (!Environment::checkMemoryLimit(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) { $requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING; - $requirements['php_memory_limit']['description'] = t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. Follow these steps to continue.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '@url' => 'https://www.drupal.org/node/207036')); + $requirements['php_memory_limit']['description'] = t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. Follow these steps to continue.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '!url' => 'https://www.drupal.org/node/207036')); } $site_directory = 'sites/simpletest'; diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index fcdb00a..c8ea109 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -1422,11 +1422,11 @@ protected function curlExec($curl_options, $redirect = FALSE) { $message_vars = array( '@method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), - '@url' => isset($original_url) ? $original_url : $url, + '!url' => isset($original_url) ? $original_url : $url, '@status' => $status, '@length' => format_size(strlen($this->getRawContent())) ); - $message = SafeMarkup::format('@method @url returned @status (@length).', $message_vars); + $message = SafeMarkup::format('@method !url returned @status (@length).', $message_vars); $this->assertTrue($this->getRawContent() !== FALSE, $message, 'Browser'); return $this->getRawContent(); } @@ -2469,10 +2469,10 @@ protected function clickLinkHelper($label, $index, $pattern) { $urls = $this->xpath($pattern, array(':label' => $label)); if (isset($urls[$index])) { $url_target = $this->getAbsoluteUrl($urls[$index]['href']); - $this->pass(SafeMarkup::format('Clicked link %label (@url_target) from @url_before', array('%label' => $label, '@url_target' => $url_target, '@url_before' => $url_before)), 'Browser'); + $this->pass(SafeMarkup::format('Clicked link %label (!url_target) from !url_before', array('%label' => $label, '!url_target' => $url_target, '!url_before' => $url_before)), 'Browser'); return $this->drupalGet($url_target); } - $this->fail(SafeMarkup::format('Link %label does not exist on @url_before', array('%label' => $label, '@url_before' => $url_before)), 'Browser'); + $this->fail(SafeMarkup::format('Link %label does not exist on !url_before', array('%label' => $label, '!url_before' => $url_before)), 'Browser'); return FALSE; } @@ -2695,8 +2695,8 @@ protected function assertUrl($path, array $options = array(), $message = '', $gr $url = $this->container->get('url_generator')->generateFromPath($path, $options); } if (!$message) { - $message = SafeMarkup::format('Expected @url matches current URL (@current_url).', array( - '@url' => var_export($url, TRUE), + $message = SafeMarkup::format('Expected !url matches current URL (@current_url).', array( + '!url' => var_export($url, TRUE), '@current_url' => $this->getUrl(), )); } diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 61e89a2..cdb2952 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -222,8 +222,8 @@ protected function info(Request $request) { ); $info[] = $this->t("Back up your code. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism."); - $info[] = $this->t('Put your site into maintenance mode.', array( - '@url' => Url::fromRoute('system.site_maintenance_mode')->toString(TRUE)->getGeneratedUrl(), + $info[] = $this->t('Put your site into maintenance mode.', array( + '!url' => Url::fromRoute('system.site_maintenance_mode')->toString(TRUE)->getGeneratedUrl(), )); $info[] = $this->t('Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.'); $info[] = $this->t('Install your new files in the appropriate location, as described in the handbook.'); @@ -401,8 +401,8 @@ protected function results(Request $request) { // Report end result. $dblog_exists = $this->moduleHandler->moduleExists('dblog'); if ($dblog_exists && $this->account->hasPermission('access site reports')) { - $log_message = $this->t('All errors have been logged.', array( - '@url' => Url::fromRoute('dblog.overview')->setOption('base_url', $base_url)->toString(TRUE)->getGeneratedUrl(), + $log_message = $this->t('All errors have been logged.', array( + '!url' => Url::fromRoute('dblog.overview')->setOption('base_url', $base_url)->toString(TRUE)->getGeneratedUrl(), )); } else { @@ -410,7 +410,7 @@ protected function results(Request $request) { } if (!empty($_SESSION['update_success'])) { - $message = '

' . $this->t('Updates were attempted. If you see no failures below, you may proceed happily back to your site. Otherwise, you may need to update your database manually.', array('@url' => Url::fromRoute('')->setOption('base_url', $base_url)->toString(TRUE)->getGeneratedUrl())) . ' ' . $log_message . '

'; + $message = '

' . $this->t('Updates were attempted. If you see no failures below, you may proceed happily back to your site. Otherwise, you may need to update your database manually.', array('!url' => Url::fromRoute('')->setOption('base_url', $base_url)->toString(TRUE)->getGeneratedUrl())) . ' ' . $log_message . '

'; } else { $last = reset($_SESSION['updates_remaining']); @@ -528,7 +528,7 @@ public function requirements($severity, array $requirements, Request $request) { $build['status_report'] = array( '#theme' => 'status_report', '#requirements' => $requirements, - '#suffix' => $this->t('Check the messages and try again.', array('@url' => $try_again_url)) + '#suffix' => $this->t('Check the messages and try again.', array('!url' => $try_again_url)) ); $build['#title'] = $this->t('Requirements problem'); diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php index c57ceae..c852788 100644 --- a/core/modules/system/src/Form/CronForm.php +++ b/core/modules/system/src/Form/CronForm.php @@ -119,7 +119,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['cron']['cron_safe_threshold'] = array( '#type' => 'select', '#title' => t('Run cron every'), - '#description' => t('More information about setting up scheduled tasks can be found by reading the cron tutorial on drupal.org.', array('@url' => 'https://www.drupal.org/cron')), + '#description' => t('More information about setting up scheduled tasks can be found by reading the cron tutorial on drupal.org.', array('!url' => 'https://www.drupal.org/cron')), '#default_value' => $config->get('threshold.autorun'), '#options' => array(0 => t('Never')) + array_map(array($this->dateFormatter, 'formatInterval'), array_combine($options, $options)), ); diff --git a/core/modules/system/src/Form/DateFormatFormBase.php b/core/modules/system/src/Form/DateFormatFormBase.php index bf78cc4..9edb67b 100644 --- a/core/modules/system/src/Form/DateFormatFormBase.php +++ b/core/modules/system/src/Form/DateFormatFormBase.php @@ -104,7 +104,7 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'textfield', '#title' => t('Format string'), '#maxlength' => 100, - '#description' => $this->t('A user-defined date format. See the PHP manual for available options.', array('@url' => 'http://php.net/manual/function.date.php')), + '#description' => $this->t('A user-defined date format. See the PHP manual for available options.', array('!url' => 'http://php.net/manual/function.date.php')), '#required' => TRUE, '#attributes' => [ 'data-drupal-date-formatter' => 'source', diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php index d607303..e27c814 100644 --- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php +++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php @@ -377,7 +377,7 @@ public function getRequirements() { // Check for filter and rotate support. if (!function_exists('imagefilter') || !function_exists('imagerotate')) { $requirements['version']['severity'] = REQUIREMENT_WARNING; - $requirements['version']['description'] = t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See the PHP manual.', array('@url' => 'http://www.php.net/manual/book.image.php')); + $requirements['version']['description'] = t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See the PHP manual.', array('!url' => 'http://www.php.net/manual/book.image.php')); } return $requirements; diff --git a/core/modules/system/src/Tests/System/SiteMaintenanceTest.php b/core/modules/system/src/Tests/System/SiteMaintenanceTest.php index 54ab8b7..d018833 100644 --- a/core/modules/system/src/Tests/System/SiteMaintenanceTest.php +++ b/core/modules/system/src/Tests/System/SiteMaintenanceTest.php @@ -54,7 +54,7 @@ protected function testSiteMaintenance() { ); $this->drupalPostForm('admin/config/development/maintenance', $edit, t('Save configuration')); - $admin_message = t('Operating in maintenance mode. Go online.', array('@url' => \Drupal::url('system.site_maintenance_mode'))); + $admin_message = t('Operating in maintenance mode. Go online.', array('!url' => \Drupal::url('system.site_maintenance_mode'))); $user_message = t('Operating in maintenance mode.'); $offline_message = t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => $this->config('system.site')->get('name'))); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 6155a6c..cb5b6fd 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -154,7 +154,7 @@ function system_requirements($phase) { $phpversion = $phpversion_label = phpversion(); if (function_exists('phpinfo')) { if ($phase === 'runtime') { - $phpversion_label = t('@phpversion (more information)', ['@phpversion' => $phpversion, '@url' => (new Url('system.php'))->toString()]); + $phpversion_label = t('@phpversion (more information)', ['@phpversion' => $phpversion, '!url' => (new Url('system.php'))->toString()]); } $requirements['php'] = array( 'title' => t('PHP'), @@ -434,7 +434,7 @@ function system_requirements($phase) { 'title' => $info['title'], 'value' => t('Not fully protected'), 'severity' => REQUIREMENT_ERROR, - 'description' => t('See @url for information about the recommended .htaccess file which should be added to the %directory directory to help protect against arbitrary code execution.', array('@url' => 'https://www.drupal.org/SA-CORE-2013-003', '%directory' => $info['directory'])), + 'description' => t('See !url for information about the recommended .htaccess file which should be added to the %directory directory to help protect against arbitrary code execution.', array('!url' => 'https://www.drupal.org/SA-CORE-2013-003', '%directory' => $info['directory'])), ); } } @@ -759,7 +759,7 @@ function system_requirements($phase) { $requirements['trusted_host_patterns'] = array( 'title' => t('Trusted Host Settings'), 'value' => t('Not enabled'), - 'description' => t('The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.', array('@url' => 'https://www.drupal.org/node/1992030')), + 'description' => t('The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.', array('!url' => 'https://www.drupal.org/node/1992030')), 'severity' => REQUIREMENT_ERROR, ); } @@ -781,10 +781,10 @@ function system_requirements($phase) { ]; if (!function_exists('twig_template_get_attributes')) { $requirements['twig_c_extension']['value'] = t('Not available'); - $requirements['twig_c_extension']['description'] = t('Enabling the Twig C extension can greatly increase rendering performance. See the installation instructions for more detail.', ['@url' => $url]); + $requirements['twig_c_extension']['description'] = t('Enabling the Twig C extension can greatly increase rendering performance. See the installation instructions for more detail.', ['!url' => $url]); } else { - $requirements['twig_c_extension']['description'] = t('The Twig C extension is available', ['@url' => $url]); + $requirements['twig_c_extension']['description'] = t('The Twig C extension is available', ['!url' => $url]); } } diff --git a/core/modules/user/src/Form/UserLoginForm.php b/core/modules/user/src/Form/UserLoginForm.php index 1c7a342..46e6333 100644 --- a/core/modules/user/src/Form/UserLoginForm.php +++ b/core/modules/user/src/Form/UserLoginForm.php @@ -224,11 +224,11 @@ public function validateFinal(array &$form, FormStateInterface $form_state) { if ($flood_control_triggered = $form_state->get('flood_control_triggered')) { if ($flood_control_triggered == 'user') { - $form_state->setErrorByName('name', $this->formatPlural($flood_config->get('user_limit'), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('@url' => $this->url('user.pass')))); + $form_state->setErrorByName('name', $this->formatPlural($flood_config->get('user_limit'), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('!url' => $this->url('user.pass')))); } else { // We did not find a uid, so the limit is IP-based. - $form_state->setErrorByName('name', $this->t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('@url' => $this->url('user.pass')))); + $form_state->setErrorByName('name', $this->t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('!url' => $this->url('user.pass')))); } } else { diff --git a/core/modules/user/src/RegisterForm.php b/core/modules/user/src/RegisterForm.php index 53dad45..e54e3a6 100644 --- a/core/modules/user/src/RegisterForm.php +++ b/core/modules/user/src/RegisterForm.php @@ -116,7 +116,7 @@ public function save(array $form, FormStateInterface $form_state) { // New administrative account without notification. if ($admin && !$notify) { - drupal_set_message($this->t('Created a new user account for %name. No email has been sent.', array('@url' => $account->url(), '%name' => $account->getUsername()))); + drupal_set_message($this->t('Created a new user account for %name. No email has been sent.', array('!url' => $account->url(), '%name' => $account->getUsername()))); } // No email verification required; log in user immediately. elseif (!$admin && !\Drupal::config('user.settings')->get('verify_mail') && $account->isActive()) { @@ -128,13 +128,13 @@ public function save(array $form, FormStateInterface $form_state) { // No administrator approval required. elseif ($account->isActive() || $notify) { if (!$account->getEmail() && $notify) { - drupal_set_message($this->t('The new user %name was created without an email address, so no welcome message was sent.', array('@url' => $account->url(), '%name' => $account->getUsername()))); + drupal_set_message($this->t('The new user %name was created without an email address, so no welcome message was sent.', array('!url' => $account->url(), '%name' => $account->getUsername()))); } else { $op = $notify ? 'register_admin_created' : 'register_no_approval_required'; if (_user_mail_notify($op, $account)) { if ($notify) { - drupal_set_message($this->t('A welcome message with further instructions has been emailed to the new user %name.', array('@url' => $account->url(), '%name' => $account->getUsername()))); + drupal_set_message($this->t('A welcome message with further instructions has been emailed to the new user %name.', array('!url' => $account->url(), '%name' => $account->getUsername()))); } else { drupal_set_message($this->t('A welcome message with further instructions has been sent to your email address.')); diff --git a/core/modules/user/src/Tests/UserLoginTest.php b/core/modules/user/src/Tests/UserLoginTest.php index 8a31137..a283602 100644 --- a/core/modules/user/src/Tests/UserLoginTest.php +++ b/core/modules/user/src/Tests/UserLoginTest.php @@ -169,11 +169,11 @@ function assertFailedLogin($account, $flood_trigger = NULL) { $this->assertNoFieldByXPath("//input[@name='pass' and @value!='']", NULL, 'Password value attribute is blank.'); if (isset($flood_trigger)) { if ($flood_trigger == 'user') { - $this->assertRaw(\Drupal::translation()->formatPlural($this->config('user.flood')->get('user_limit'), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('@url' => \Drupal::url('user.pass')))); + $this->assertRaw(\Drupal::translation()->formatPlural($this->config('user.flood')->get('user_limit'), 'Sorry, there has been more than one failed login attempt for this account. It is temporarily blocked. Try again later or request a new password.', 'Sorry, there have been more than @count failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.', array('!url' => \Drupal::url('user.pass')))); } else { // No uid, so the limit is IP-based. - $this->assertRaw(t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('@url' => \Drupal::url('user.pass')))); + $this->assertRaw(t('Sorry, too many failed login attempts from your IP address. This IP address is temporarily blocked. Try again later or request a new password.', array('!url' => \Drupal::url('user.pass')))); } } else { diff --git a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php index d79e4eb..8ab9957 100644 --- a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php +++ b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php @@ -159,7 +159,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta ); if ($this->view->storage->access('edit') && \Drupal::moduleHandler()->moduleExists('views_ui')) { - $form['views_label']['#description'] = $this->t('Changing the title here means it cannot be dynamically altered anymore. (Try changing it directly in @name.)', array('@url' => \Drupal::url('entity.view.edit_display_form', array('view' => $this->view->storage->id(), 'display_id' => $this->displayID)), '@name' => $this->view->storage->label())); + $form['views_label']['#description'] = $this->t('Changing the title here means it cannot be dynamically altered anymore. (Try changing it directly in @name.)', array('!url' => \Drupal::url('entity.view.edit_display_form', array('view' => $this->view->storage->id(), 'display_id' => $this->displayID)), '@name' => $this->view->storage->label())); } else { $form['views_label']['#description'] = $this->t('Changing the title here means it cannot be dynamically altered anymore.'); diff --git a/core/modules/views/src/Plugin/Menu/Form/ViewsMenuLinkForm.php b/core/modules/views/src/Plugin/Menu/Form/ViewsMenuLinkForm.php index ac3aeff..b92b21d 100644 --- a/core/modules/views/src/Plugin/Menu/Form/ViewsMenuLinkForm.php +++ b/core/modules/views/src/Plugin/Menu/Form/ViewsMenuLinkForm.php @@ -61,7 +61,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta $id = $view->storage->id(); $label = $view->storage->label(); if ($this->moduleHandler->moduleExists('views_ui')) { - $message = $this->t('This link is provided by the Views module. The path can be changed by editing the view @label', array('@url' => \Drupal::url('entity.view.edit_form', array('view' => $id)), '@label' => $label)); + $message = $this->t('This link is provided by the Views module. The path can be changed by editing the view @label', array('!url' => \Drupal::url('entity.view.edit_form', array('view' => $id)), '@label' => $label)); } else { $message = $this->t('This link is provided by the Views module from view %label.', array('%label' => $label)); diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 152d4e9..f43a016 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -716,7 +716,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Text'), '#type' => 'textarea', '#default_value' => $this->options['alter']['text'], - '#description' => $this->t('The text to display for this field. You may include HTML or Twig. You may enter data from this view as per the "Replacement patterns" below.', array('@url' => CoreUrl::fromUri('http://twig.sensiolabs.org/documentation')->toString())), + '#description' => $this->t('The text to display for this field. You may include HTML or Twig. You may enter data from this view as per the "Replacement patterns" below.', array('!url' => CoreUrl::fromUri('http://twig.sensiolabs.org/documentation')->toString())), '#states' => array( 'visible' => array( ':input[name="options[alter][alter_text]"]' => array('checked' => TRUE), diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index 1b335de..05a2079 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -141,12 +141,12 @@ public function form(array $form, FormStateInterface $form_state) { $lock_message_substitutions = array( '!user' => drupal_render($username), '!age' => $this->dateFormatter->formatTimeDiffSince($view->lock->updated), - '@url' => $view->url('break-lock-form'), + '!url' => $view->url('break-lock-form'), ); $form['locked'] = array( '#type' => 'container', '#attributes' => array('class' => array('view-locked', 'messages', 'messages--warning')), - '#children' => $this->t('This view is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to break this lock.', $lock_message_substitutions), + '#children' => $this->t('This view is being edited by user !user, and is therefore locked from editing by others. This lock is !age old. Click here to break this lock.', $lock_message_substitutions), '#weight' => -10, ); } diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php index 2cf9c69..7184623 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php @@ -12,7 +12,7 @@ * Constraint that checks if one value is equal to another. * * Equality is checked with PHP's == operator, the operator is explained in - * detail at {@url http://www.php.net/manual/en/types.comparisons.php}. + * detail at {!url http://www.php.net/manual/en/types.comparisons.php}. * Two values are equal if they have the same value disregarding type. * * The expected value is passed in the constructor. diff --git a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php index 981f36c..56662de 100644 --- a/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php +++ b/core/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php @@ -13,7 +13,7 @@ * * Identical check is performed with PHP's === operator, the operator is * explained in detail at - * {@url http://www.php.net/manual/en/types.comparisons.php}. + * {!url http://www.php.net/manual/en/types.comparisons.php}. * Two values are identical if they have the same value and are of the same * type. *