diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 03572a6..dcf4783 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -408,7 +408,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia // The exception message is run through // \Drupal\Component\Utility\SafeMarkup::checkPlain() by // \Drupal\Core\Utility\Error:decodeException(). - $message = '%type: !message in %function (line %line of %file).'; + $message = '%type: @message in %function (line %line of %file).'; } if ($link) { diff --git a/core/includes/errors.inc b/core/includes/errors.inc index 8a27038..52970dc 100644 --- a/core/includes/errors.inc +++ b/core/includes/errors.inc @@ -68,7 +68,7 @@ function _drupal_error_handler_real($error_level, $message, $filename, $line, $c '%type' => isset($types[$error_level]) ? $severity_msg : 'Unknown error', // The standard PHP error handler considers that the error messages // are HTML. We mimick this behavior here. - '!message' => Xss::filterAdmin($message), + '@message' => Xss::filterAdmin($message), '%function' => $caller['function'], '%file' => $caller['file'], '%line' => $caller['line'], @@ -109,9 +109,9 @@ function error_displayable($error = NULL) { * Logs a PHP error or exception and displays an error page in fatal cases. * * @param $error - * An array with the following keys: %type, !message, %function, %file, + * An array with the following keys: %type, @message, %function, %file, * %line, severity_level, and backtrace. All the parameters are plain-text, - * with the exception of !message, which needs to be a safe HTML string, and + * with the exception of @message, which needs to be a safe HTML string, and * backtrace, which is a standard PHP backtrace. * @param $fatal * TRUE if the error is fatal. @@ -130,7 +130,7 @@ function _drupal_log_error($error, $fatal = FALSE) { // as it uniquely identifies each PHP error. static $number = 0; $assertion = array( - $error['!message'], + $error['@message'], $error['%type'], array( 'function' => $error['%function'], @@ -154,12 +154,12 @@ function _drupal_log_error($error, $fatal = FALSE) { // installer. if (\Drupal::hasService('logger.factory')) { try { - \Drupal::logger('php')->log($error['severity_level'], '%type: !message in %function (line %line of %file).', $error); + \Drupal::logger('php')->log($error['severity_level'], '%type: @message in %function (line %line of %file).', $error); } catch (\Exception $e) { // We can't log, for example because the database connection is not // available. At least try to log to PHP error log. - error_log(strtr('Failed to log error: %type: !message in %function (line %line of %file).', $error)); + error_log(strtr('Failed to log error: %type: @message in %function (line %line of %file).', $error)); } } @@ -167,7 +167,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if ($fatal) { // When called from CLI, simply output a plain text message. // Should not translate the string to avoid errors producing more errors. - $response->setContent(html_entity_decode(strip_tags(format_string('%type: !message in %function (line %line of %file).', $error))). "\n"); + $response->setContent(html_entity_decode(strip_tags(format_string('%type: @message in %function (line %line of %file).', $error))). "\n"); $response->send(); exit; } @@ -178,7 +178,7 @@ function _drupal_log_error($error, $fatal = FALSE) { if (error_displayable($error)) { // When called from JavaScript, simply output the error message. // Should not translate the string to avoid errors producing more errors. - $response->setContent(format_string('%type: !message in %function (line %line of %file).', $error)); + $response->setContent(format_string('%type: @message in %function (line %line of %file).', $error)); $response->send(); } exit; @@ -209,7 +209,7 @@ function _drupal_log_error($error, $fatal = FALSE) { } } // Should not translate the string to avoid errors producing more errors. - $message = format_string('%type: !message in %function (line %line of %file).', $error); + $message = format_string('%type: @message in %function (line %line of %file).', $error); // Check if verbose error reporting is on. $error_level = _drupal_get_error_level(); diff --git a/core/includes/file.inc b/core/includes/file.inc index 0740c82..ec1df3a 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -371,8 +371,8 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS return drupal_chmod($htaccess_path, 0444); } else { - $variables = array('%directory' => $directory, '!htaccess' => '
' . nl2br(SafeMarkup::checkPlain($htaccess_lines))); - \Drupal::logger('security')->error("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: !htaccess", $variables); + $variables = array('%directory' => $directory, '@htaccess' => '
' . nl2br(SafeMarkup::checkPlain($htaccess_lines))); + \Drupal::logger('security')->error("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: @htaccess", $variables); return FALSE; } } diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index db35fd7..af7f705 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2027,7 +2027,13 @@ function install_check_translations($langcode, $server_pattern) { 'title' => t('Internet'), 'value' => t('The translation server is offline.'), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The installer requires to contact the translation server to download a translation file. Check your internet connection and verify that your website can reach the translation server at !server_url.', array('!server_url' => $server_url)), + 'description' => t('The installer requires to contact the translation server to download a translation file. Check your internet connection and verify that your website can reach the translation server at @ +@ +@server_url.', array('@ +@ +@server_url' => $server_url)), ); } else { @@ -2042,7 +2048,7 @@ function install_check_translations($langcode, $server_pattern) { 'title' => t('Translation'), 'value' => t('The %language translation is not available.', array('%language' => $language)), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The %language translation file is not available at the translation server. Choose a different language or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))), + 'description' => t('The %language translation file is not available at the translation server. Choose a different language or select English and translate your website later.', array('%language' => $language, '@url' => check_url($_SERVER['SCRIPT_NAME']))), ); } else { @@ -2061,7 +2067,7 @@ function install_check_translations($langcode, $server_pattern) { 'title' => t('Translation'), 'value' => t('The %language translation could not be downloaded.', array('%language' => $language)), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The %language translation file could not be downloaded. Choose a different language or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))), + 'description' => t('The %language translation file could not be downloaded. Choose a different language or select English and translate your website later.', array('%language' => $language, '@url' => check_url($_SERVER['SCRIPT_NAME']))), ); } } @@ -2278,11 +2284,11 @@ function install_display_requirements($install_state, $requirements) { $build['report']['#requirements'] = $requirements; if ($severity == REQUIREMENT_WARNING) { $build['#title'] = t('Requirements review'); - $build['#suffix'] = t('Check the messages and retry, or you may choose to continue anyway.', array('!retry' => check_url(drupal_requirements_url(REQUIREMENT_ERROR)), '!cont' => check_url(drupal_requirements_url($severity)))); + $build['#suffix'] = t('Check the messages and retry, or you may choose to continue anyway.', array('@retry' => check_url(drupal_requirements_url(REQUIREMENT_ERROR)), '@cont' => check_url(drupal_requirements_url($severity)))); } else { $build['#title'] = t('Requirements problem'); - $build['#suffix'] = t('Check the messages and try again.', array('!url' => check_url(drupal_requirements_url($severity)))); + $build['#suffix'] = t('Check the messages and try again.', array('@url' => check_url(drupal_requirements_url($severity)))); } return $build; } diff --git a/core/includes/install.inc b/core/includes/install.inc index 77e0b70..c6ed6c3 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -579,7 +579,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/includes/update.inc b/core/includes/update.inc index 34882c3..5a5e521 100644 --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -191,7 +191,7 @@ function update_do_one($module, $number, $dependency_map, &$context) { // The exception message is run through // \Drupal\Component\Utility\SafeMarkup::checkPlain() by // \Drupal\Core\Utility\Error::decodeException(). - $ret['#abort'] = array('success' => FALSE, 'query' => t('%type: !message in %function (line %line of %file).', $variables)); + $ret['#abort'] = array('success' => FALSE, 'query' => t('%type: @message in %function (line %line of %file).', $variables)); } } @@ -238,7 +238,7 @@ function update_entity_definitions(&$context) { // The exception message is run through // \Drupal\Component\Utility\SafeMarkup::checkPlain() by // \Drupal\Core\Utility\Error::decodeException(). - $ret['#abort'] = array('success' => FALSE, 'query' => t('%type: !message in %function (line %line of %file).', $variables)); + $ret['#abort'] = array('success' => FALSE, 'query' => t('%type: @message in %function (line %line of %file).', $variables)); $context['results']['core']['update_entity_definitions'] = $ret; $context['results']['#abort'][] = 'update_entity_definitions'; } diff --git a/core/lib/Drupal/Core/Annotation/Translation.php b/core/lib/Drupal/Core/Annotation/Translation.php index e1cc845..3738145 100644 --- a/core/lib/Drupal/Core/Annotation/Translation.php +++ b/core/lib/Drupal/Core/Annotation/Translation.php @@ -28,7 +28,7 @@ * * To provide replacement values for placeholders, use the "arguments" array: * @code - * title = @ Translation("Bundle !title", arguments = {"!title" = "Foo"}), + * title = @ Translation("Bundle @title", arguments = {"@title" = "Foo"}), * @endcode * * It is also possible to provide a context with the text, similar to t(): diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index e0d4e0d..93a1e33 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -718,11 +718,11 @@ protected function validate() { $old_entity_type_id = $this->configManager->getEntityTypeIdByName($names['old_name']); $new_entity_type_id = $this->configManager->getEntityTypeIdByName($names['new_name']); if ($old_entity_type_id != $new_entity_type_id) { - $this->logError($this->t('Entity type mismatch on rename. !old_type not equal to !new_type for existing configuration !old_name and staged configuration !new_name.', array('old_type' => $old_entity_type_id, 'new_type' => $new_entity_type_id, 'old_name' => $names['old_name'], 'new_name' => $names['new_name']))); + $this->logError($this->t('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', array('old_type' => $old_entity_type_id, 'new_type' => $new_entity_type_id, 'old_name' => $names['old_name'], 'new_name' => $names['new_name']))); } // Has to be a configuration entity. if (!$old_entity_type_id) { - $this->logError($this->t('Rename operation for simple configuration. Existing configuration !old_name and staged configuration !new_name.', array('old_name' => $names['old_name'], 'new_name' => $names['new_name']))); + $this->logError($this->t('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', array('old_name' => $names['old_name'], 'new_name' => $names['new_name']))); } } $this->eventDispatcher->dispatch(ConfigEvents::IMPORT_VALIDATE, new ConfigImporterEvent($this)); @@ -762,7 +762,7 @@ protected function processConfiguration($collection, $op, $name) { } } catch (\Exception $e) { - $this->logError($this->t('Unexpected error during import with operation @op for @name: !message', array('@op' => $op, '@name' => $name, '!message' => $e->getMessage()))); + $this->logError($this->t('Unexpected error during import with operation @op for @name: @message', array('@op' => $op, '@name' => $name, '@message' => $e->getMessage()))); // Error for that operation was logged, mark it as processed so that // the import can continue. $this->setProcessedConfiguration($collection, $op, $name); diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php index 32f460c..7ff19fa 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php @@ -118,10 +118,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' ))); } } @@ -168,9 +168,9 @@ function checkBinaryOutput() { '%setting' => 'bytea_output', '%current_value' => 'hex', '%needed_value' => 'escape', - '!query' => "" . $query . "", + '@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/EventSubscriber/DefaultExceptionHtmlSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php index e3ec321..770b96f 100644 --- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php @@ -161,7 +161,7 @@ protected function makeSubrequest(GetResponseForExceptionEvent $event, $url, $st // just log it. The DefaultExceptionSubscriber will catch the original // exception and handle it normally. $error = Error::decodeException($e); - $this->logger->log($error['severity_level'], '%type: !message in %function (line %line of %file).', $error); + $this->logger->log($error['severity_level'], '%type: @message in %function (line %line of %file).', $error); } } } diff --git a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php index 741ab0c..cb00045 100644 --- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php @@ -93,7 +93,7 @@ protected function onHtml(GetResponseForExceptionEvent $event) { } // Do not translate the string to avoid errors producing more errors. unset($error['backtrace']); - $message = SafeMarkup::format('%type: !message in %function (line %line of %file).', $error); + $message = SafeMarkup::format('%type: @message in %function (line %line of %file).', $error); // Check if verbose error reporting is on. if ($this->getErrorLevel() == ERROR_REPORTING_DISPLAY_VERBOSE) { diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php index cb2fc31..6a2bd6c 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionLoggingSubscriber.php @@ -68,7 +68,7 @@ public function on404(GetResponseForExceptionEvent $event) { public function onError(GetResponseForExceptionEvent $event) { $exception = $event->getException(); $error = Error::decodeException($exception); - $this->logger->get('php')->log($error['severity_level'], '%type: !message in %function (line %line of %file).', $error); + $this->logger->get('php')->log($error['severity_level'], '%type: @message in %function (line %line of %file).', $error); $is_critical = !$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500; if ($is_critical) { diff --git a/core/lib/Drupal/Core/EventSubscriber/ExceptionTestSiteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ExceptionTestSiteSubscriber.php index d8f1a61..17c87a3 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ExceptionTestSiteSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ExceptionTestSiteSubscriber.php @@ -51,7 +51,7 @@ public function on500(GetResponseForExceptionEvent $event) { // as it uniquely identifies each PHP error. static $number = 0; $assertion = array( - $error['!message'], + $error['@message'], $error['%type'], array( 'function' => $error['%function'], diff --git a/core/lib/Drupal/Core/Extension/InfoParser.php b/core/lib/Drupal/Core/Extension/InfoParser.php index 0bc9676..1a8fcd0 100644 --- a/core/lib/Drupal/Core/Extension/InfoParser.php +++ b/core/lib/Drupal/Core/Extension/InfoParser.php @@ -36,12 +36,12 @@ public function parse($filename) { static::$parsedInfos[$filename] = Yaml::decode(file_get_contents($filename)); } catch (InvalidDataTypeException $e) { - $message = SafeMarkup::format("Unable to parse !file: !error", array('!file' => $filename, '!error' => $e->getMessage())); + $message = SafeMarkup::format("Unable to parse @file: @error", array('@file' => $filename, '@error' => $e->getMessage())); throw new InfoParserException($message); } $missing_keys = array_diff($this->getRequiredKeys(), array_keys(static::$parsedInfos[$filename])); if (!empty($missing_keys)) { - $message = SafeMarkup::format('Missing required keys (!missing_keys) in !file.', array('!missing_keys' => implode(', ', $missing_keys), '!file' => $filename)); + $message = SafeMarkup::format('Missing required keys (@missing_keys) in @file.', array('@missing_keys' => implode(', ', $missing_keys), '@file' => $filename)); throw new InfoParserException($message); } if (isset(static::$parsedInfos[$filename]['version']) && static::$parsedInfos[$filename]['version'] === 'VERSION') { diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index e30fd87..9a76eba 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -857,7 +857,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 8b53b38..6e3c960 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -72,7 +72,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/FormErrorHandler.php b/core/lib/Drupal/Core/Form/FormErrorHandler.php index df736b0..727285f 100644 --- a/core/lib/Drupal/Core/Form/FormErrorHandler.php +++ b/core/lib/Drupal/Core/Form/FormErrorHandler.php @@ -95,8 +95,8 @@ protected function displayErrorMessages(array $form, FormStateInterface $form_st } if (!empty($error_links)) { - $message = $this->formatPlural(count($error_links), '1 error has been found: !errors', '@count errors have been found: !errors', [ - '!errors' => SafeMarkup::set(implode(', ', $error_links)), + $message = $this->formatPlural(count($error_links), '1 error has been found: @errors', '@count errors have been found: @errors', [ + '@errors' => SafeMarkup::set(implode(', ', $error_links)), ]); $this->drupalSetMessage($message, 'error'); } diff --git a/core/lib/Drupal/Core/Form/FormValidator.php b/core/lib/Drupal/Core/Form/FormValidator.php index 96f2320..856cd0f 100644 --- a/core/lib/Drupal/Core/Form/FormValidator.php +++ b/core/lib/Drupal/Core/Form/FormValidator.php @@ -287,7 +287,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); @@ -322,7 +322,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'])) { @@ -337,7 +337,7 @@ protected function performRequiredValidation(&$elements, FormStateInterface &$fo foreach ($value as $v) { if (!isset($options[$v])) { $form_state->setError($elements, $this->t('An illegal choice has been detected. Please contact the site administrator.')); - $this->logger->error('Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])); + $this->logger->error('Illegal choice %choice in @name element.', array('%choice' => $v, '@name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])); } } } 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/Installer/Exception/AlreadyInstalledException.php b/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php index 19436b0..2b54d92 100644 --- a/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php +++ b/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php @@ -26,11 +26,11 @@ public function __construct(TranslationInterface $string_translation) { $title = $this->t('Drupal already installed'); $message = $this->t('', array( - '!base-url' => $GLOBALS['base_url'], - '!update-url' => $GLOBALS['base_path'] . 'update.php', + '@base-url' => $GLOBALS['base_url'], + '@update-url' => $GLOBALS['base_path'] . 'update.php', )); parent::__construct($message, $title); } diff --git a/core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php b/core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php index 91ed3f0..90ad2c6 100644 --- a/core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php @@ -71,8 +71,8 @@ public function buildForm(array $form, FormStateInterface $form_state, $install_ $form['help'] = array( '#type' => 'item', '#markup' => SafeMarkup::format('

Translations will be downloaded from the Drupal Translation website. - If you do not want this, select English.

', array( - '!english' => install_full_redirect_url(array('parameters' => array('langcode' => 'en'))), + If you do not want this, select English.

', array( + '@english' => install_full_redirect_url(array('parameters' => array('langcode' => 'en'))), )), '#states' => array( 'invisible' => array( diff --git a/core/lib/Drupal/Core/Mail/MailManagerInterface.php b/core/lib/Drupal/Core/Mail/MailManagerInterface.php index ded236b..196726e 100644 --- a/core/lib/Drupal/Core/Mail/MailManagerInterface.php +++ b/core/lib/Drupal/Core/Mail/MailManagerInterface.php @@ -67,8 +67,8 @@ * $message['send'] = FALSE; * break; * } - * $message['subject'] = t('Notification from !site', $variables, $options); - * $message['body'][] = t("Dear !username\n\nThere is new content available on the site.", $variables, $options); + * $message['subject'] = t('Notification from @site', $variables, $options); + * $message['body'][] = t("Dear @username\n\nThere is new content available on the site.", $variables, $options); * break; * } * } diff --git a/core/lib/Drupal/Core/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php index e68b795..c063c81 100644 --- a/core/lib/Drupal/Core/Menu/menu.api.php +++ b/core/lib/Drupal/Core/Menu/menu.api.php @@ -536,7 +536,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 d636ee8..3151629 100644 --- a/core/lib/Drupal/Core/Render/Element/Table.php +++ b/core/lib/Drupal/Core/Render/Element/Table.php @@ -165,7 +165,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/lib/Drupal/Core/Utility/Error.php b/core/lib/Drupal/Core/Utility/Error.php index 304763a..9e26d49 100644 --- a/core/lib/Drupal/Core/Utility/Error.php +++ b/core/lib/Drupal/Core/Utility/Error.php @@ -70,7 +70,7 @@ public static function decodeException($exception) { '%type' => get_class($exception), // The standard PHP exception handler considers that the exception message // is plain-text. We mimic this behavior here. - '!message' => SafeMarkup::checkPlain($message), + '@message' => SafeMarkup::checkPlain($message), '%function' => $caller['function'], '%file' => $caller['file'], '%line' => $caller['line'], @@ -95,7 +95,7 @@ public static function renderExceptionSafe($exception) { // Remove 'main()'. array_shift($backtrace); - $output = SafeMarkup::format('%type: !message in %function (line %line of %file).', $decode); + $output = SafeMarkup::format('%type: @message in %function (line %line of %file).', $decode); // Even though it is possible that this method is called on a public-facing // site, it is only called when the exception handler itself threw an // exception, which normally means that a code change caused the system to diff --git a/core/misc/ajax.js b/core/misc/ajax.js index ba10fe8..e625976 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -104,20 +104,20 @@ var responseText; var readyStateText; if (xmlhttp.status) { - statusCode = "\n" + Drupal.t("An AJAX HTTP error occurred.") + "\n" + Drupal.t("HTTP Result Code: !status", {'!status': xmlhttp.status}); + statusCode = "\n" + Drupal.t("An AJAX HTTP error occurred.") + "\n" + Drupal.t("HTTP Result Code: @status", {'@status': xmlhttp.status}); } else { statusCode = "\n" + Drupal.t("An AJAX HTTP request terminated abnormally."); } statusCode += "\n" + Drupal.t("Debugging information follows."); - pathText = "\n" + Drupal.t("Path: !uri", {'!uri': uri}); + pathText = "\n" + Drupal.t("Path: @uri", {'@uri': uri}); statusText = ''; // In some cases, when statusCode === 0, xmlhttp.statusText may not be // defined. Unfortunately, testing for it with typeof, etc, doesn't seem to // catch that and the test causes an exception. So we need to catch the // exception here. try { - statusText = "\n" + Drupal.t("StatusText: !statusText", {'!statusText': $.trim(xmlhttp.statusText)}); + statusText = "\n" + Drupal.t("StatusText: @statusText", {'@statusText': $.trim(xmlhttp.statusText)}); } catch (e) { // Empty. @@ -127,7 +127,7 @@ // Again, we don't have a way to know for sure whether accessing // xmlhttp.responseText is going to throw an exception. So we'll catch it. try { - responseText = "\n" + Drupal.t("ResponseText: !responseText", {'!responseText': $.trim(xmlhttp.responseText)}); + responseText = "\n" + Drupal.t("ResponseText: @responseText", {'@responseText': $.trim(xmlhttp.responseText)}); } catch (e) { // Empty. @@ -138,7 +138,7 @@ responseText = responseText.replace(/[\n]+\s+/g, "\n"); // We don't need readyState except for status == 0. - readyStateText = xmlhttp.status === 0 ? ("\n" + Drupal.t("ReadyState: !readyState", {'!readyState': xmlhttp.readyState})) : ""; + readyStateText = xmlhttp.status === 0 ? ("\n" + Drupal.t("ReadyState: @readyState", {'@readyState': xmlhttp.readyState})) : ""; /** * Formatted and translated error message. 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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Using simple actions') . '
'; - $output .= '
' . t('Simple actions do not require configuration and are listed automatically as available on the Actions page.', array('!actions' => \Drupal::url('entity.action.collection'))) . '
'; + $output .= '
' . t('Simple actions do not require configuration and are listed automatically as available on the Actions page.', array('@actions' => \Drupal::url('entity.action.collection'))) . '
'; $output .= '
' . t('Creating and configuring advanced actions') . '
'; - $output .= '
' . t('Advanced actions are user-created and have to be configured individually. Create an advanced action on the Actions page by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', array('!actions' => \Drupal::url('entity.action.collection'))) . '
'; + $output .= '
' . t('Advanced actions are user-created and have to be configured individually. Create an advanced action on the Actions page by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', array('@actions' => \Drupal::url('entity.action.collection'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 744861c..27f6019 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -23,30 +23,30 @@ function aggregator_help($route_name, RouteMatchInterface $route_match) { $path_validator = \Drupal::pathValidator(); $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; // Check if the aggregator sources View is enabled. if ($url = $path_validator->getUrlIfValid('aggregator/sources')) { $output .= '
' . t('Viewing feeds') . '
'; - $output .= '
' . t('Users view feed content in the main aggregator display, or by their source (usually via an RSS feed reader). The most recent content in a feed can be displayed as a block through the Blocks administration page.', array('!aggregator' => \Drupal::url('aggregator.page_last'), '!aggregator-sources' => $url->toString(), '!admin-block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t('Users view feed content in the main aggregator display, or by their source (usually via an RSS feed reader). The most recent content in a feed can be displayed as a block through the Blocks administration page.', array('@aggregator' => \Drupal::url('aggregator.page_last'), '@aggregator-sources' => $url->toString(), '@admin-block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; } $output .= '
' . t('Adding, editing, and deleting feeds') . '
'; - $output .= '
' . t('Administrators can add, edit, and delete feeds, and choose how often to check each feed for newly updated items on the Feed aggregator administration page.', array('!feededit' => \Drupal::url('aggregator.admin_overview'))) . '
'; + $output .= '
' . t('Administrators can add, edit, and delete feeds, and choose how often to check each feed for newly updated items on the Feed aggregator administration page.', array('@feededit' => \Drupal::url('aggregator.admin_overview'))) . '
'; $output .= '
' . t('OPML integration') . '
'; // Check if the aggregator opml View is enabled. if ($url = $path_validator->getUrlIfValid('aggregator/opml')) { - $output .= '
' . t('A machine-readable OPML file of all feeds is available. OPML is an XML-based file format used to share outline-structured information such as a list of RSS feeds. Feeds can also be imported via an OPML file.', array('!aggregator-opml' => $url->toString(), '!import-opml' => \Drupal::url('aggregator.opml_add'))) . '
'; + $output .= '
' . t('A machine-readable OPML file of all feeds is available. OPML is an XML-based file format used to share outline-structured information such as a list of RSS feeds. Feeds can also be imported via an OPML file.', array('@aggregator-opml' => $url->toString(), '@import-opml' => \Drupal::url('aggregator.opml_add'))) . '
'; } $output .= '
' . t('Configuring cron') . '
'; - $output .= '
' . t('A working cron maintenance task is required to update feeds automatically.', array('!cron' => \Drupal::url('system.cron_settings'))) . '
'; + $output .= '
' . t('A working cron maintenance task is required to update feeds automatically.', array('@cron' => \Drupal::url('system.cron_settings'))) . '
'; $output .= '
'; return $output; case 'aggregator.admin_overview': // Don't use placeholders for possibility to change URLs for translators. $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' => ''))); + ->setDescription(t("The parent website's description that comes from the @description element in the feed.", array('@description' => ''))); $fields['image'] = BaseFieldDefinition::create('uri') ->setLabel(t('Image')) diff --git a/core/modules/aggregator/src/FeedViewBuilder.php b/core/modules/aggregator/src/FeedViewBuilder.php index 8e4152b..50831e5 100644 --- a/core/modules/aggregator/src/FeedViewBuilder.php +++ b/core/modules/aggregator/src/FeedViewBuilder.php @@ -113,7 +113,7 @@ public function buildComponents(array &$build, array $entities, array $displays, $build[$id]['feed_icon'] = array( '#theme' => 'feed_icon', '#url' => $entity->getUrl(), - '#title' => t('!title feed', array('!title' => $entity->label())), + '#title' => t('@title feed', array('@title' => $entity->label())), ); } diff --git a/core/modules/aggregator/src/Tests/AggregatorTestBase.php b/core/modules/aggregator/src/Tests/AggregatorTestBase.php index 3bee7f4..d05e788 100644 --- a/core/modules/aggregator/src/Tests/AggregatorTestBase.php +++ b/core/modules/aggregator/src/Tests/AggregatorTestBase.php @@ -64,7 +64,7 @@ protected function setUp() { public function createFeed($feed_url = NULL, array $edit = array()) { $edit = $this->getFeedEditArray($feed_url, $edit); $this->drupalPostForm('aggregator/sources/add', $edit, t('Save')); - $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed !name has been added.', array('!name' => $edit['title[0][value]']))); + $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed @name has been added.', array('@name' => $edit['title[0][value]']))); $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $edit['title[0][value]'], ':url' => $edit['url[0][value]']))->fetchField(); $this->assertTrue(!empty($fid), 'The feed found in database.'); @@ -164,7 +164,7 @@ public function getDefaultFeedItemCount() { public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { // First, let's ensure we can get to the rss xml. $this->drupalGet($feed->getUrl()); - $this->assertResponse(200, format_string('!url is reachable.', array('!url' => $feed->getUrl()))); + $this->assertResponse(200, format_string('@url is reachable.', array('@url' => $feed->getUrl()))); // Attempt to access the update link directly without an access token. $this->drupalGet('admin/config/services/aggregator/update/' . $feed->id()); @@ -183,7 +183,7 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) { if ($expected_count !== NULL) { $feed->item_count = count($feed->items); - $this->assertEqual($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (!val1 != !val2)', array('!val1' => $expected_count, '!val2' => $feed->item_count))); + $this->assertEqual($expected_count, $feed->item_count, format_string('Total items in feed equal to the total items in database (@val1 != @val2)', array('@val1' => $expected_count, '@val2' => $feed->item_count))); } } diff --git a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php index 0e94425..ae3f22b 100644 --- a/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php +++ b/core/modules/aggregator/src/Tests/UpdateFeedItemTest.php @@ -37,10 +37,10 @@ public function testUpdateFeedItem() { ); $this->drupalGet($edit['url[0][value]']); - $this->assertResponse(array(200), format_string('URL !url is accessible', array('!url' => $edit['url[0][value]']))); + $this->assertResponse(array(200), format_string('URL @url is accessible', array('@url' => $edit['url[0][value]']))); $this->drupalPostForm('aggregator/sources/add', $edit, t('Save')); - $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed !name has been added.', array('!name' => $edit['title[0][value]']))); + $this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title[0][value]'])), format_string('The feed @name has been added.', array('@name' => $edit['title[0][value]']))); $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE url = :url", array(':url' => $edit['url[0][value]']))->fetchField(); $feed = Feed::load($fid); @@ -62,7 +62,7 @@ public function testUpdateFeedItem() { $feed->refreshItems(); $after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->id()))->fetchField(); - $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (!before === !after)', array('!before' => $before, '!after' => $after))); + $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (@before === @after)', array('@before' => $before, '@after' => $after))); // Make sure updating items works even after uninstalling a module // that provides the selected plugins. diff --git a/core/modules/ban/ban.module b/core/modules/ban/ban.module index 533ddac..f48c24a 100644 --- a/core/modules/ban/ban.module +++ b/core/modules/ban/ban.module @@ -15,11 +15,11 @@ function ban_help($route_name, RouteMatchInterface $route_match) { case 'help.page.ban': $output = ''; $output .= '

' . t('About') . '

'; - $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 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Banning IP addresses') . '
'; - $output .= '
' . t('Administrators can enter IP addresses to ban on the IP address bans page.', array('!bans' => \Drupal::url('ban.admin_page'))) . '
'; + $output .= '
' . t('Administrators can enter IP addresses to ban on the IP address bans page.', array('@bans' => \Drupal::url('ban.admin_page'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/basic_auth/basic_auth.module b/core/modules/basic_auth/basic_auth.module index 4183bd6..b858fa5 100644 --- a/core/modules/basic_auth/basic_auth.module +++ b/core/modules/basic_auth/basic_auth.module @@ -15,7 +15,7 @@ function basic_auth_help($route_name, RouteMatchInterface $route_match) { case 'help.page.basic_auth': $output = ''; $output .= '

' . t('About') . '

'; - $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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Placing and moving blocks') . '
'; - $output .= '
' . t('You can place a new block by clicking on its title in the Place blocks list on the Block layout page and choosing a region to place it in. Once a block is placed, it can be moved to a different region by dragging or using the drop-down Region list, and then clicking Save blocks.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('You can place a new block by clicking on its title in the Place blocks list on the Block layout page and choosing a region to place it in. Once a block is placed, it can be moved to a different region by dragging or using the drop-down Region list, and then clicking Save blocks.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Toggling between different themes') . '
'; $output .= '
' . t('Blocks are placed and configured specifically for each theme. The Block layout page opens with the default theme, but you can toggle to other installed themes.') . '
'; $output .= '
' . t('Demonstrating block regions for a theme') . '
'; - $output .= '
' . t('You can see where the regions are for the current theme by clicking the Demonstrate block regions link on the Block layout page. Regions are specific to each theme.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('You can see where the regions are for the current theme by clicking the Demonstrate block regions link on the Block layout page. Regions are specific to each theme.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Configuring block settings') . '
'; - $output .= '
' . t('To change the settings of an individual block click on the Configure link on the Block layout page. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', array('!blocks' => Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('To change the settings of an individual block click on the Configure link on the Block layout page. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', array('@blocks' => Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Controlling visibility') . '
'; $output .= '
' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under Visibility settings of the block configuration.') . '
'; $output .= '
' . t('Adding custom blocks') . '
'; - $output .= '
' . t('You can add custom blocks, if the Custom Block module is installed. For more information, see the Custom Block help page.', array('!blockcontent-help' => $block_content)) . '
'; + $output .= '
' . t('You can add custom blocks, if the Custom Block module is installed. For more information, see the Custom Block help page.', array('@blockcontent-help' => $block_content)) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/block/src/Tests/BlockXssTest.php b/core/modules/block/src/Tests/BlockXssTest.php index 3d9bfd3..7b64dd5 100644 --- a/core/modules/block/src/Tests/BlockXssTest.php +++ b/core/modules/block/src/Tests/BlockXssTest.php @@ -80,7 +80,7 @@ protected function doViewTest() { $this->drupalGet(Url::fromRoute('block.admin_display')); $this->clickLinkPartialName('Place block'); // The block admin label is automatically XSS admin filtered. - $this->assertRaw('alert("view");'); + $this->assertRaw('alert("view");'); $this->assertNoRaw(''); } diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module index 04a1e6c..bc61ed5 100644 --- a/core/modules/block_content/block_content.module +++ b/core/modules/block_content/block_content.module @@ -18,22 +18,22 @@ function block_content_help($route_name, RouteMatchInterface $route_match) { $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#'; $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing custom block types') . '
'; - $output .= '
' . t('Users with the Administer blocks permission can create and edit custom block types with fields and display settings, from the Custom block types page in the Custom block library. For more information about managing fields and display settings, see the Field UI module help.', array('!types' => \Drupal::url('entity.block_content_type.collection'), '!field-ui' => $field_ui)) . '
'; + $output .= '
' . t('Users with the Administer blocks permission can create and edit custom block types with fields and display settings, from the Custom block types page in the Custom block library. For more information about managing fields and display settings, see the Field UI module help.', array('@types' => \Drupal::url('entity.block_content_type.collection'), '@field-ui' => $field_ui)) . '
'; $output .= '
' . t('Creating custom blocks') . '
'; - $output .= '
' . t('Users with the Administer blocks permission can create, edit, and delete custom blocks of each custom block type you have defined, from the Custom block library page. Custom blocks are shown in the Place blocks list on the Block layout page; see the Block module help for more information about placing blocks.', array('!blocks' => \Drupal::url('block.admin_display'), '!block-library' => \Drupal::url('entity.block_content.collection'), '!block_help' => \Drupal::url('help.page', array('name' => 'block')))) . '
'; + $output .= '
' . t('Users with the Administer blocks permission can create, edit, and delete custom blocks of each custom block type you have defined, from the Custom block library page. Custom blocks are shown in the Place blocks list on the Block layout page; see the Block module help for more information about placing blocks.', array('@blocks' => \Drupal::url('block.admin_display'), '@block-library' => \Drupal::url('entity.block_content.collection'), '@block_help' => \Drupal::url('help.page', array('name' => 'block')))) . '
'; $output .= '
'; return $output; case 'entity.block_content.collection': - $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 e80b5e3..c4a5c46 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -27,17 +27,17 @@ function book_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.book': $output = '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Adding and managing book content') . '
'; $output .= '
' . t('Books have a hierarchical structure, called a book outline. Each book outline can have nested pages up to nine levels deep. Multiple content types can be configured to behave as a book outline. From the content edit form, it is possible to add a page to a book outline or create a new book.') . '
'; - $output .= '
' . t('You can assign separate permissions for creating new books as well as creating, editing and deleting book content. Users with the Administer book outlines permission can add any type of content to a book by selecting the appropriate book outline while editing the content. They can also view a list of all books, and edit and rearrange section titles on the Book list page.', array('!admin-book' => \Drupal::url('book.admin'))) . '
'; + $output .= '
' . t('You can assign separate permissions for creating new books as well as creating, editing and deleting book content. Users with the Administer book outlines permission can add any type of content to a book by selecting the appropriate book outline while editing the content. They can also view a list of all books, and edit and rearrange section titles on the Book list page.', array('@admin-book' => \Drupal::url('book.admin'))) . '
'; $output .= '
' . t('Configuring content types for books') . '
'; - $output .= '
' . t('The Book page content type is the initial content type enabled for book outlines. On the Book settings page you can configure content types that can used in book outlines.', array('!admin-settings' => \Drupal::url('book.settings'))) . '
'; - $output .= '
' . t('Users with the Add content and child pages to books permission will see a link to Add child page when viewing a content item that is part of a book outline. This link will allow users to create a new content item of the content type you select on the Book settings page. By default this is the Book page content type.', array('!admin-settings' => \Drupal::url('book.settings'))) . '
'; + $output .= '
' . t('The Book page content type is the initial content type enabled for book outlines. On the Book settings page you can configure content types that can used in book outlines.', array('@admin-settings' => \Drupal::url('book.settings'))) . '
'; + $output .= '
' . t('Users with the Add content and child pages to books permission will see a link to Add child page when viewing a content item that is part of a book outline. This link will allow users to create a new content item of the content type you select on the Book settings page. By default this is the Book page content type.', array('@admin-settings' => \Drupal::url('book.settings'))) . '
'; $output .= '
' . t('Book navigation') . '
'; - $output .= '
' . t("Book pages have a default book-specific navigation block. This navigation block contains links that lead to the previous and next pages in the book, and to the level above the current page in the book's structure. This block can be enabled on the Blocks layout page. For book pages to show up in the book navigation, they must be added to a book outline.", array('!admin-block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t("Book pages have a default book-specific navigation block. This navigation block contains links that lead to the previous and next pages in the book, and to the level above the current page in the book's structure. This block can be enabled on the Blocks layout page. For book pages to show up in the book navigation, they must be added to a book outline.", array('@admin-block' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; $output .= '
' . t('Collaboration') . '
'; $output .= '
' . t('Books can be created collaboratively, as they allow users with appropriate permissions to add pages into existing books, and add those pages to a custom table of contents.') . '
'; $output .= '
' . t('Printing books') . '
'; @@ -49,7 +49,7 @@ function book_help($route_name, RouteMatchInterface $route_match) { return '

' . 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/book/src/BookManager.php b/core/modules/book/src/BookManager.php index bd0d419..fcb46a4 100644 --- a/core/modules/book/src/BookManager.php +++ b/core/modules/book/src/BookManager.php @@ -357,7 +357,7 @@ protected function addParentSelectFormElements(array $book_link) { '#type' => 'select', '#title' => $this->t('Parent item'), '#default_value' => $book_link['pid'], - '#description' => $this->t('The parent page in the book. The maximum depth for a book and all child pages is !maxdepth. Some pages in the selected book may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => static::BOOK_MAX_DEPTH)), + '#description' => $this->t('The parent page in the book. The maximum depth for a book and all child pages is @maxdepth. Some pages in the selected book may not be available as parents if selecting them would exceed this limit.', array('@maxdepth' => static::BOOK_MAX_DEPTH)), '#options' => $this->getTableOfContents($book_link['bid'], $book_link['parent_depth_limit'], array($book_link['nid'])), '#attributes' => array('class' => array('book-title-select')), '#prefix' => '
', 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('About') . '

'; - $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('Terminology') . '

'; $output .= '
'; $output .= '
' . t('Breakpoint') . '
'; $output .= '
' . t('A breakpoint separates the height or width of viewports (screens, printers, and other media output types) into steps. For instance, a width breakpoint of 40em creates two steps: one for widths up to 40em and one for widths above 40em. Breakpoints can be used to define when layouts should shift from one form to another, when images should be resized, and other changes that need to respond to changes in viewport height or width.') . '
'; $output .= '
' . t('Media query') . '
'; - $output .= '
' . t('Media queries are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.', array('!w3' => 'http://www.w3.org/TR/css3-mediaqueries/')) . '
'; + $output .= '
' . t('Media queries are a formal way to encode breakpoints. For instance, a width breakpoint at 40em would be written as the media query "(min-width: 40em)". Breakpoints are really just media queries with some additional meta-data, such as a name and multiplier information.', array('@w3' => 'http://www.w3.org/TR/css3-mediaqueries/')) . '
'; $output .= '
' . t('Resolution multiplier') . '
'; $output .= '
' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the device-independent pixel size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '
'; $output .= '
' . t('Breakpoint group') . '
'; diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index c77bcef..69daa5b 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -16,19 +16,19 @@ function ckeditor_help($route_name, RouteMatchInterface $route_match) { case 'help.page.ckeditor': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling CKEditor for individual text formats') . '
'; - $output .= '
' . t('CKEditor has to be enabled and configured separately for individual text formats from the Text formats and editors page because the filter settings for each text format can be different. For more information, see the Text Editor help page and Filter help page.', array('!formats' => \Drupal::url('filter.admin_overview'), '!text_editor' => \Drupal::url('help.page', array('name' => 'editor')), '!filter' => \Drupal::url('help.page', array('name' => 'filter')))) . '
'; + $output .= '
' . t('CKEditor has to be enabled and configured separately for individual text formats from the Text formats and editors page because the filter settings for each text format can be different. For more information, see the Text Editor help page and Filter help page.', array('@formats' => \Drupal::url('filter.admin_overview'), '@text_editor' => \Drupal::url('help.page', array('name' => 'editor')), '@filter' => \Drupal::url('help.page', array('name' => 'filter')))) . '
'; $output .= '
' . t('Configuring the toolbar') . '
'; $output .= '
' . t('When CKEditor is chosen from the Text editor drop-down menu, its toolbar configuration is displayed. You can add and remove buttons from the Active toolbar by dragging and dropping them, and additional rows can be added to organize the buttons.') . '
'; $output .= '
' . t('Formatting content') . '
'; - $output .= '
' . t('CKEditor only allow users to format content in accordance with the filter configuration of the specific text format. If a text format excludes certain HTML tags, the corresponding toolbar buttons are not displayed to users when they edit a text field in this format. For more information see the Filter help page.', array('!filter' => \Drupal::url('help.page', array('name' => 'filter')))) . '
'; + $output .= '
' . t('CKEditor only allow users to format content in accordance with the filter configuration of the specific text format. If a text format excludes certain HTML tags, the corresponding toolbar buttons are not displayed to users when they edit a text field in this format. For more information see the Filter help page.', array('@filter' => \Drupal::url('help.page', array('name' => 'filter')))) . '
'; $output .= '
' . t('Toggling between formatted text and HTML source') . '
'; $output .= '
' . t('If the Source button is available in the toolbar, users can click this button to disable the visual editor and edit the HTML source directly. After toggling back, the visual editor uses the allowed HTML tags to format the text — independent of whether buttons for these tags are available in the toolbar. If the text format is set to limit the use of HTML tags, then all excluded tags will be stripped out of the HTML source when the user toggles back to the text editor.') . '
'; $output .= '
' . t('Accessibility features') . '
'; - $output .= '
' . t('The built in WYSIWYG editor (CKEditor) comes with a number of accessibility features. CKEditor comes with built in keyboard shortcuts, which can be beneficial for both power users and keyboard only users.', array('!features' => 'http://docs.ckeditor.com/#!/guide/dev_a11y', '!shortcuts' => 'http://docs.ckeditor.com/#!/guide/dev_shortcuts')) . '
'; + $output .= '
' . t('The built in WYSIWYG editor (CKEditor) comes with a number of accessibility features. CKEditor comes with built in keyboard shortcuts, which can be beneficial for both power users and keyboard only users.', array('@features' => 'http://docs.ckeditor.com/#!/guide/dev_a11y', '@shortcuts' => 'http://docs.ckeditor.com/#!/guide/dev_shortcuts')) . '
'; $output .= '
' . t('Generating accessible content') . '
'; $output .= '
' . t('HTML tables can be created with both table headers as well as caption/summary elements. Alt text is required by default on images added through CKEditor (note that this can be overridden). Semantic HTML5 figure/figcaption are available to add captions to images.') . '
'; $output .= '
'; diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js index ebd84b2..c0251ec 100644 --- a/core/modules/ckeditor/js/ckeditor.js +++ b/core/modules/ckeditor/js/ckeditor.js @@ -31,7 +31,7 @@ // label so that screen readers say something that is understandable // for end users. var label = $('label[for=' + element.getAttribute('id') + ']').html(); - format.editorSettings.title = Drupal.t("Rich Text Editor, !label field", {'!label': label}); + format.editorSettings.title = Drupal.t("Rich Text Editor, @label field", {'@label': label}); // CKEditor initializes itself in a read-only state if the 'disabled' // attribute is set. It does not respect the 'readonly' attribute, diff --git a/core/modules/color/color.module b/core/modules/color/color.module index fa9499b..0206371 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -22,11 +22,11 @@ function color_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.color': $output = '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Changing colors') . '
'; - $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.') . '

'; $output .= '
'; return $output; diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 20ba4a3..02e057d 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -66,15 +66,15 @@ function comment_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.comment': $output = '

' . t('About') . '

'; - $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 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling commenting and configuring defaults') . '
'; - $output .= '
' . t('Comment functionality can be enabled for any entity sub-type (for example, a content type). On the Manage fields page for each entity sub-type, you can enable commenting by adding a Comments field. The entity sub-types each have their own default comment settings configured as: Open to allow new comments, Closed to view existing comments, but prevent new comments, or Hidden to hide existing comments and prevent new comments. For background information about entities, see the Field module help page.', array('!content-type' => (\Drupal::moduleHandler()->moduleExists('node')) ? \Drupal::url('entity.node_type.collection') : '#', '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '
' . t('Comment functionality can be enabled for any entity sub-type (for example, a content type). On the Manage fields page for each entity sub-type, you can enable commenting by adding a Comments field. The entity sub-types each have their own default comment settings configured as: Open to allow new comments, Closed to view existing comments, but prevent new comments, or Hidden to hide existing comments and prevent new comments. For background information about entities, see the Field module help page.', array('@content-type' => (\Drupal::moduleHandler()->moduleExists('node')) ? \Drupal::url('entity.node_type.collection') : '#', '@field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
' . t('Overriding default settings') . '
'; $output .= '
' . t('When you create an entity item, you can override the default comment settings. Changing the entity sub-type defaults will not affect existing entity items, whether they used the default settings or had overrides.') . '
'; $output .= '
' . t('Approving and managing comments') . '
'; - $output .= '
' . t('Comments from users who have the Skip comment approval permission are published immediately. All other comments are placed in the Unapproved comments queue, until a user who has permission to Administer comments and comment settings publishes or deletes them. Published comments can be bulk managed on the Published comments administration page. When a comment has no replies, it remains editable by its author, as long as the author has Edit own comments permission.', array('!comment-approval' => \Drupal::url('comment.admin_approval'), '!admin-comment' => \Drupal::url('comment.admin'))) . '
'; + $output .= '
' . t('Comments from users who have the Skip comment approval permission are published immediately. All other comments are placed in the Unapproved comments queue, until a user who has permission to Administer comments and comment settings publishes or deletes them. Published comments can be bulk managed on the Published comments administration page. When a comment has no replies, it remains editable by its author, as long as the author has Edit own comments permission.', array('@comment-approval' => \Drupal::url('comment.admin_approval'), '@admin-comment' => \Drupal::url('comment.admin'))) . '
'; $output .= '
'; return $output; @@ -713,8 +713,8 @@ function template_preprocess_comment(&$variables) { $permalink_uri_parent->setOption('attributes', $attributes); $variables['parent_title'] = \Drupal::l($comment_parent->getSubject(), $permalink_uri_parent); $variables['parent_permalink'] = \Drupal::l(t('Parent permalink'), $permalink_uri_parent); - $variables['parent'] = t('In reply to !parent_title by !parent_username', - array('!parent_username' => $variables['parent_author'], '!parent_title' => $variables['parent_title'])); + $variables['parent'] = t('In reply to @parent_title by @parent_username', + array('@parent_username' => $variables['parent_author'], '@parent_title' => $variables['parent_title'])); } else { $variables['parent_comment'] = ''; diff --git a/core/modules/comment/src/Tests/CommentFieldAccessTest.php b/core/modules/comment/src/Tests/CommentFieldAccessTest.php index bd08dfe..fc727da 100644 --- a/core/modules/comment/src/Tests/CommentFieldAccessTest.php +++ b/core/modules/comment/src/Tests/CommentFieldAccessTest.php @@ -205,17 +205,17 @@ public function testAccessToAdministrativeFields() { foreach ($permutations as $set) { $may_view = $set['comment']->{$field}->access('view', $set['user']); $may_update = $set['comment']->{$field}->access('edit', $set['user']); - $this->assertEqual($may_view, $set['user']->hasPermission('administer comments') || ($set['comment']->isPublished() && $set['user']->hasPermission('access comments')), SafeMarkup::format('User @user !state view field !field on comment @comment', [ + $this->assertEqual($may_view, $set['user']->hasPermission('administer comments') || ($set['comment']->isPublished() && $set['user']->hasPermission('access comments')), SafeMarkup::format('User @user @state view field @field on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_update ? 'can' : 'cannot', + '@state' => $may_update ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), - '!field' => $field, + '@field' => $field, ])); - $this->assertEqual($may_update, $set['user']->hasPermission('administer comments'), SafeMarkup::format('User @user !state update field !field on comment @comment', [ + $this->assertEqual($may_update, $set['user']->hasPermission('administer comments'), SafeMarkup::format('User @user @state update field @field on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_update ? 'can' : 'cannot', + '@state' => $may_update ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), - '!field' => $field, + '@field' => $field, ])); } } @@ -223,9 +223,9 @@ public function testAccessToAdministrativeFields() { // Check access to normal field. foreach ($permutations as $set) { $may_update = $set['comment']->access('update', $set['user']) && $set['comment']->subject->access('edit', $set['user']); - $this->assertEqual($may_update, $set['user']->hasPermission('administer comments') || ($set['user']->hasPermission('edit own comments') && $set['user']->id() == $set['comment']->getOwnerId()), SafeMarkup::format('User @user !state update field subject on comment @comment', [ + $this->assertEqual($may_update, $set['user']->hasPermission('administer comments') || ($set['user']->hasPermission('edit own comments') && $set['user']->id() == $set['comment']->getOwnerId()), SafeMarkup::format('User @user @state update field subject on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_update ? 'can' : 'cannot', + '@state' => $may_update ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), ])); } @@ -237,17 +237,17 @@ public function testAccessToAdministrativeFields() { $may_view = $set['comment']->{$field}->access('view', $set['user']); $may_update = $set['comment']->{$field}->access('edit', $set['user']); $this->assertEqual($may_view, $field != 'hostname' && ($set['user']->hasPermission('administer comments') || - ($set['comment']->isPublished() && $set['user']->hasPermission('access comments'))), SafeMarkup::format('User @user !state view field !field on comment @comment', [ + ($set['comment']->isPublished() && $set['user']->hasPermission('access comments'))), SafeMarkup::format('User @user @state view field @field on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_view ? 'can' : 'cannot', + '@state' => $may_view ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), - '!field' => $field, + '@field' => $field, ])); - $this->assertFalse($may_update, SafeMarkup::format('User @user !state update field !field on comment @comment', [ + $this->assertFalse($may_update, SafeMarkup::format('User @user @state update field @field on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_update ? 'can' : 'cannot', + '@state' => $may_update ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), - '!field' => $field, + '@field' => $field, ])); } } @@ -265,11 +265,11 @@ public function testAccessToAdministrativeFields() { $set['comment']->isNew() && $set['user']->hasPermission('post comments') && $set['comment']->getFieldName() == 'comment_other' - ), SafeMarkup::format('User @user !state update field !field on comment @comment', [ + ), SafeMarkup::format('User @user @state update field @field on comment @comment', [ '@user' => $set['user']->getUsername(), - '!state' => $may_update ? 'can' : 'cannot', + '@state' => $may_update ? 'can' : 'cannot', '@comment' => $set['comment']->getSubject(), - '!field' => $field, + '@field' => $field, ])); } } diff --git a/core/modules/config/config.module b/core/modules/config/config.module index f58dff9..4279111 100644 --- a/core/modules/config/config.module +++ b/core/modules/config/config.module @@ -15,19 +15,19 @@ function config_help($route_name, RouteMatchInterface $route_match) { case 'help.page.config': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Exporting the full configuration') . '
'; - $output .= '
' . t('You can create and download an archive consisting of all your site\'s configuration exported as *.yml files on the Export page.' , array('!url' => \Drupal::url('config.export_full'))) . '
'; + $output .= '
' . t('You can create and download an archive consisting of all your site\'s configuration exported as *.yml files on the Export page.' , array('@url' => \Drupal::url('config.export_full'))) . '
'; $output .= '
' . t('Importing a full configuration') . '
'; - $output .= '
' . t('You can upload a full site configuration from an archive file on the Import page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the system.site configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', array('!url' => \Drupal::url('config.import_full'))) . '
'; + $output .= '
' . t('You can upload a full site configuration from an archive file on the Import page. When importing data from a different environment, the site and import files must have matching configuration values for UUID in the system.site configuration item. That means that your other environments should initially be set up as clones of the target site. Migrations are not supported.', array('@url' => \Drupal::url('config.import_full'))) . '
'; $output .= '
' . t('Synchronizing configuration'). '
'; - $output .= '
' . t('You can review differences between the active configuration and an imported configuration archive on the Synchronize page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', array('!synchronize' => \Drupal::url('config.sync'))) . '
'; + $output .= '
' . t('You can review differences between the active configuration and an imported configuration archive on the Synchronize page to ensure that the changes are as expected, before finalizing the import. The Synchronize page also shows configuration items that would be added or removed.', array('@synchronize' => \Drupal::url('config.sync'))) . '
'; $output .= '
' . t('Exporting a single configuration item') . '
'; - $output .= '
' . t('You can export a single configuration item by selecting a Configuration type and Configuration name on the Single export page. The configuration and its corresponding *.yml file name are then displayed on the page for you to copy.', array('!single-export' => \Drupal::url('config.export_single'))) . '
'; + $output .= '
' . t('You can export a single configuration item by selecting a Configuration type and Configuration name on the Single export page. The configuration and its corresponding *.yml file name are then displayed on the page for you to copy.', array('@single-export' => \Drupal::url('config.export_single'))) . '
'; $output .= '
' . t('Importing a single configuration item') . '
'; - $output .= '
' . t('You can import a single configuration item by pasting it in YAML format into the form on the Single import page.', array('!single-import' => \Drupal::url('config.import_single'))) . '
'; + $output .= '
' . t('You can import a single configuration item by pasting it in YAML format into the form on the Single import page.', array('@single-import' => \Drupal::url('config.import_single'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index 7f240e3..c91ed5c 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -222,7 +222,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#items' => $change_list, ); $change_list_html = $this->renderer->renderPlain($change_list_render); - drupal_set_message($this->t('The following items in your active configuration have changes since the last import that may be lost on the next import. !changes', array('!changes' => $change_list_html)), 'warning'); + drupal_set_message($this->t('The following items in your active configuration have changes since the last import that may be lost on the next import. @changes', array('@changes' => $change_list_html)), 'warning'); } } @@ -237,7 +237,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form[$collection]['collection_heading'] = array( '#type' => 'html_tag', '#tag' => 'h2', - '#value' => $this->t('!collection configuration collection', array('!collection' => $collection)), + '#value' => $this->t('@collection configuration collection', array('@collection' => $collection)), ); } foreach ($storage_comparer->getChangelist(NULL, $collection) as $config_change_type => $config_names) { @@ -277,7 +277,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { if ($config_change_type == 'rename') { $names = $storage_comparer->extractRenameNames($config_name); $route_options = array('source_name' => $names['old_name'], 'target_name' => $names['new_name']); - $config_name = $this->t('!source_name to !target_name', array('!source_name' => $names['old_name'], '!target_name' => $names['new_name'])); + $config_name = $this->t('@source_name to @target_name', array('@source_name' => $names['old_name'], '@target_name' => $names['new_name'])); } else { $route_options = array('source_name' => $config_name); diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 6a63df7..e913e0d 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -273,8 +273,8 @@ public function testExportImportCollections() { // Verify that there are configuration differences to import. $this->drupalGet('admin/config/development/configuration'); $this->assertNoText(t('There are no configuration changes to import.')); - $this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test1'))); - $this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test2'))); + $this->assertText(t('@collection configuration collection', array('@collection' => 'collection.test1'))); + $this->assertText(t('@collection configuration collection', array('@collection' => 'collection.test2'))); $this->assertText('config_test.create'); $this->assertLinkByHref('admin/config/development/configuration/sync/diff_collection/collection.test1/config_test.create'); $this->assertText('config_test.update'); diff --git a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php index 118c1cb..ead8441 100644 --- a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php +++ b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php @@ -110,7 +110,7 @@ public function testRenameValidation() { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.'); $expected = array( - SafeMarkup::format('Entity type mismatch on rename. !old_type not equal to !new_type for existing configuration !old_name and staged configuration !new_name.', array('old_type' => 'node_type', 'new_type' => 'config_test', 'old_name' => 'node.type.' . $content_type->id(), 'new_name' => 'config_test.dynamic.' . $test_entity_id)) + SafeMarkup::format('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', array('old_type' => 'node_type', 'new_type' => 'config_test', 'old_name' => 'node.type.' . $content_type->id(), 'new_name' => 'config_test.dynamic.' . $test_entity_id)) ); $this->assertIdentical($expected, $this->configImporter->getErrors()); } @@ -153,7 +153,7 @@ public function testRenameSimpleConfigValidation() { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.'); $expected = array( - SafeMarkup::format('Rename operation for simple configuration. Existing configuration !old_name and staged configuration !new_name.', array('old_name' => 'config_test.old', 'new_name' => 'config_test.new')) + SafeMarkup::format('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', array('old_name' => 'config_test.old', 'new_name' => 'config_test.new')) ); $this->assertIdentical($expected, $this->configImporter->getErrors()); } diff --git a/core/modules/config/src/Tests/ConfigImporterTest.php b/core/modules/config/src/Tests/ConfigImporterTest.php index e39baf6..5d43b78 100644 --- a/core/modules/config/src/Tests/ConfigImporterTest.php +++ b/core/modules/config/src/Tests/ConfigImporterTest.php @@ -296,7 +296,7 @@ function testSecondaryWriteSecondaryFirst() { $logs = $this->configImporter->getErrors(); $this->assertEqual(count($logs), 1); $message = SafeMarkup::format("'config_test' entity with ID '@name' already exists", array('@name' => 'secondary')); - $this->assertEqual($logs[0], SafeMarkup::format('Unexpected error during import with operation @op for @name: !message.', array('@op' => 'create', '@name' => $name_primary, '!message' => $message))); + $this->assertEqual($logs[0], SafeMarkup::format('Unexpected error during import with operation @op for @name: @message.', array('@op' => 'create', '@name' => $name_primary, '@message' => $message))); } /** diff --git a/core/modules/config/src/Tests/SchemaCheckTestTrait.php b/core/modules/config/src/Tests/SchemaCheckTestTrait.php index c7dffe6..c0823d5 100644 --- a/core/modules/config/src/Tests/SchemaCheckTestTrait.php +++ b/core/modules/config/src/Tests/SchemaCheckTestTrait.php @@ -33,13 +33,13 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c if ($errors === FALSE) { // @todo Since the use of this trait is under TestBase, it works. // Can be fixed as part of https://www.drupal.org/node/2260053. - $this->fail(SafeMarkup::format('No schema for !config_name', array('!config_name' => $config_name))); + $this->fail(SafeMarkup::format('No schema for @config_name', array('@config_name' => $config_name))); return; } elseif ($errors === TRUE) { // @todo Since the use of this trait is under TestBase, it works. // Can be fixed as part of https://www.drupal.org/node/2260053. - $this->pass(SafeMarkup::format('Schema found for !config_name and values comply with schema.', array('!config_name' => $config_name))); + $this->pass(SafeMarkup::format('Schema found for @config_name and values comply with schema.', array('@config_name' => $config_name))); } else { foreach ($errors as $key => $error) { diff --git a/core/modules/config_translation/config_translation.api.php b/core/modules/config_translation/config_translation.api.php index f631655..c20294d 100644 --- a/core/modules/config_translation/config_translation.api.php +++ b/core/modules/config_translation/config_translation.api.php @@ -53,7 +53,7 @@ function hook_config_translation_info(&$info) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => 'entity.field_config.' . $entity_type_id . '_field_edit_form', 'entity_type' => 'field_config', - 'title' => t('!label field'), + 'title' => t('@label field'), 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_entity_type' => $entity_type_id, 'weight' => 10, diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index 3c81f78..84881bd 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -19,15 +19,15 @@ function config_translation_help($route_name, RouteMatchInterface $route_match) case 'help.page.config_translation': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling translation') . '
'; - $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('!url' => \Drupal::url('entity.configurable_language.collection'))) . '
'; + $output .= '
' . t('In order to translate configuration, the website must have at least two languages.', array('@url' => \Drupal::url('entity.configurable_language.collection'))) . '
'; $output .= '
' . t('Translating configuration text') . '
'; - $output .= '
' . t('Users with the Translate user edited configuration permission can access the configuration translation overview, and manage translations for specific languages. The Configuration translation page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on Translate, you are provided with a list of all languages. You can add or edit a translation for a specific language. Users with specific configuration permissions can also edit the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', array('!translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; + $output .= '
' . t('Users with the Translate user edited configuration permission can access the configuration translation overview, and manage translations for specific languages. The Configuration translation page shows a list of all configuration text that can be translated, either as individual items or as lists. After you click on Translate, you are provided with a list of all languages. You can add or edit a translation for a specific language. Users with specific configuration permissions can also edit the text for the site\'s default language. For some configuration text items (for example for the site information), the specific translation pages can also be accessed directly from their configuration pages.', array('@translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; $output .= '
' . t('Translating date formats') . '
'; - $output .= '
' . t('You can choose to translate date formats on the Configuration translation page. This allows you not only to translate the label text, but also to set a language-specific PHP date format.', array('!translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; + $output .= '
' . t('You can choose to translate date formats on the Configuration translation page. This allows you not only to translate the label text, but also to set a language-specific PHP date format.', array('@translation-page' => \Drupal::url('config_translation.mapper_list'))) . '
'; $output .= '
'; return $output; @@ -115,7 +115,7 @@ function config_translation_config_translation_info(&$info) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => "entity.field_config.{$entity_type_id}_field_edit_form", 'entity_type' => 'field_config', - 'title' => '!label field', + 'title' => '@label field', 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_entity_type' => $entity_type_id, 'weight' => 10, @@ -144,7 +144,7 @@ function config_translation_config_translation_info(&$info) { $info[$entity_type_id] = array( 'class' => '\Drupal\config_translation\ConfigEntityMapper', 'base_route_name' => $base_route_name, - 'title' => '!label !entity_type', + 'title' => '@label @entity_type', 'names' => array(), 'entity_type' => $entity_type_id, 'weight' => 10, diff --git a/core/modules/config_translation/src/ConfigEntityMapper.php b/core/modules/config_translation/src/ConfigEntityMapper.php index 4a6d275..d454bb8 100644 --- a/core/modules/config_translation/src/ConfigEntityMapper.php +++ b/core/modules/config_translation/src/ConfigEntityMapper.php @@ -158,7 +158,7 @@ public function getTitle() { // current page language. The title placeholder is later escaped for // display. $entity_type_info = $this->entityManager->getDefinition($this->entityType); - return $this->t($this->pluginDefinition['title'], array('!label' => $this->entity->label(), '!entity_type' => $entity_type_info->getLowercaseLabel())); + return $this->t($this->pluginDefinition['title'], array('@label' => $this->entity->label(), '@entity_type' => $entity_type_info->getLowercaseLabel())); } /** diff --git a/core/modules/config_translation/src/FormElement/FormElementBase.php b/core/modules/config_translation/src/FormElement/FormElementBase.php index 7db01e1..acb65c8 100644 --- a/core/modules/config_translation/src/FormElement/FormElementBase.php +++ b/core/modules/config_translation/src/FormElement/FormElementBase.php @@ -100,9 +100,9 @@ protected function getSourceElement(LanguageInterface $source_language, $source_ return array( '#type' => 'item', - '#title' => $this->t('!label (!source_language)', array( - '!label' => $this->t($this->definition->getLabel()), - '!source_language' => $source_language->getName(), + '#title' => $this->t('@label (@source_language)', array( + '@label' => $this->t($this->definition->getLabel()), + '@source_language' => $source_language->getName(), )), '#markup' => $value, ); @@ -162,9 +162,9 @@ protected function getSourceElement(LanguageInterface $source_language, $source_ protected function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) { // Add basic properties that apply to all form elements. return array( - '#title' => $this->t('!label (!source_language)', array( - '!label' => $this->t($this->definition['label']), - '!source_language' => $translation_language->getName(), + '#title' => $this->t('@label (@source_language)', array( + '@label' => $this->t($this->definition['label']), + '@source_language' => $translation_language->getName(), )), '#default_value' => $translation_config, '#attributes' => array('lang' => $translation_language->getId()), diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php index 0916dcd..0dd735a 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php @@ -115,7 +115,7 @@ public function testMapperListPage() { $entity_type = \Drupal::entityManager()->getDefinition($test_entity->getEntityTypeId()); $this->drupalGet($base_url . '/translate'); - $title = t('!label !entity_type', array('!label' => $test_entity->label(), '!entity_type' => $entity_type->getLowercaseLabel())); + $title = t('@label @entity_type', array('@label' => $test_entity->label(), '@entity_type' => $entity_type->getLowercaseLabel())); $title = t('Translations for %label', array('%label' => $title)); $this->assertRaw($title); $this->assertRaw('' . t('Language') . ''); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index a05f7e7..cf31a11 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -365,7 +365,7 @@ public function testContactConfigEntityTranslation() { // Test that delete links work and operations perform properly. foreach ($this->langcodes as $langcode) { - $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); + $replacements = array('%label' => t('@label @entity_type', array('@label' => $label, '@entity_type' => Unicode::strtolower(t('Contact form')))), '@language' => \Drupal::languageManager()->getLanguage($langcode)->getName()); $this->drupalGet("$translation_base_url/$langcode/delete"); $this->assertRaw(t('Are you sure you want to delete the @language translation of %label?', $replacements)); diff --git a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php index 8041931..efbe68d 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php @@ -70,7 +70,7 @@ protected function setUp() { $definition = array( 'class' => '\Drupal\config_translation\ConfigEntityMapper', 'base_route_name' => 'entity.configurable_language.edit_form', - 'title' => '!label language', + 'title' => '@label language', 'names' => array(), 'entity_type' => 'configurable_language', 'route_name' => 'config_translation.item.overview.entity.configurable_language.edit_form', diff --git a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php index 740b722..3a78357 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigFieldMapperTest.php @@ -50,7 +50,7 @@ protected function setUp() { $definition = array( 'class' => '\Drupal\config_translation\ConfigFieldMapper', 'base_route_name' => 'entity.field_config.node_field_edit_form', - 'title' => '!label field', + 'title' => '@label field', 'names' => array(), 'entity_type' => 'field_config', ); diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index 1f479f2..e045e8b 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -21,17 +21,17 @@ function contact_help($route_name, RouteMatchInterface $route_match) { $contact_page = \Drupal::url('entity.contact_form.collection'); $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Using the personal contact form') . '
'; $output .= '
' . t("Site visitors can email registered users on your site by using the personal contact form, without knowing or learning the email address of the recipient. When a site visitor is viewing a user profile, the viewer will see a Contact tab or link, which leads to the personal contact form. The personal contact link is not shown when you are viewing your own profile, and users must have both View user information (to see user profiles) and Use users' personal contact forms permission to see the link. The user whose profile is being viewed must also have their personal contact form enabled (this is a user account setting); viewers with Administer users permission can bypass this setting.") . '
'; $output .= '
' . t('Configuring contact forms') . '
'; - $output .= '
' . t('On the Contact forms page, you can configure the fields and display of the personal contact form, and you can set up one or more site-wide contact forms. Each site-wide contact form has a machine name, a label, and one or more defined recipients; when a site visitor submits the form, the field values are sent to those recipients.', array('!contact_admin' => $contact_page)) . '
'; + $output .= '
' . t('On the Contact forms page, you can configure the fields and display of the personal contact form, and you can set up one or more site-wide contact forms. Each site-wide contact form has a machine name, a label, and one or more defined recipients; when a site visitor submits the form, the field values are sent to those recipients.', array('@contact_admin' => $contact_page)) . '
'; $output .= '
' . t('Linking to contact forms') . '
'; - $output .= '
' . t('One site-wide contact form can be designated as the default contact form. If you choose to designate a default form, the 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 for each form you have set up has format contact/machine_name_of_form.', array('!menu-settings' => $menu_page)) . '

'; + $output .= '
' . t('One site-wide contact form can be designated as the default contact form. If you choose to designate a default form, the 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 for each form you have set up has format contact/machine_name_of_form.', array('@menu-settings' => $menu_page)) . '

'; $output .= '
' . t('Adding content to contact forms') . '
'; - $output .= '
' . t('From the Contact forms page, you can configure the fields to be shown on contact forms, including their labels and help text. If you would like other content (such as text or images) to appear on a contact form, use a block. You can create and edit blocks on the Block layout page, if the Block module is installed.', array('!blocks' => $block_page, '!contact_admin' => $contact_page)) . '
'; + $output .= '
' . t('From the Contact forms page, you can configure the fields to be shown on contact forms, including their labels and help text. If you would like other content (such as text or images) to appear on a contact form, use a block. You can create and edit blocks on the Block layout page, if the Block module is installed.', array('@blocks' => $block_page, '@contact_admin' => $contact_page)) . '
'; $output .= '
'; return $output; @@ -40,8 +40,8 @@ function contact_help($route_name, RouteMatchInterface $route_match) { $block_page = \Drupal::moduleHandler()->moduleExists('block') ? \Drupal::url('block.admin_display') : '#'; $output = ''; $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('', [], ['absolute' => TRUE, 'language' => $language]), - '!sender-name' => user_format_name($sender), + '@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('', [], ['absolute' => TRUE, 'language' => $language]), + '@sender-name' => user_format_name($sender), ); if ($sender->isAuthenticated()) { - $variables['!sender-url'] = $sender->url('canonical', array('absolute' => TRUE, 'language' => $language)); + $variables['@sender-url'] = $sender->url('canonical', array('absolute' => TRUE, 'language' => $language)); } else { - $variables['!sender-url'] = $params['sender']->getEmail(); + $variables['@sender-url'] = $params['sender']->getEmail(); } $options = array('langcode' => $language->getId()); @@ -140,27 +140,27 @@ function contact_mail($key, &$message, $params) { switch ($key) { case 'page_mail': case 'page_copy': - $message['subject'] .= t('[!form] !subject', $variables, $options); - $message['body'][] = t("!sender-name (!sender-url) sent a message using the contact form at !form-url.", $variables, $options); + $message['subject'] .= t('[@form] @subject', $variables, $options); + $message['body'][] = t("@sender-name (@sender-url) sent a message using the contact form at @form-url.", $variables, $options); $build = entity_view($contact_message, 'mail', $language->getId()); $message['body'][] = (string) \Drupal::service('renderer')->renderPlain($build); break; case 'page_autoreply': - $message['subject'] .= t('[!form] !subject', $variables, $options); + $message['subject'] .= t('[@form] @subject', $variables, $options); $message['body'][] = $params['contact_form']->getReply(); break; case 'user_mail': case 'user_copy': $variables += array( - '!recipient-name' => user_format_name($params['recipient']), - '!recipient-edit-url' => $params['recipient']->url('edit-form', array('absolute' => TRUE, 'language' => $language)), + '@recipient-name' => user_format_name($params['recipient']), + '@recipient-edit-url' => $params['recipient']->url('edit-form', array('absolute' => TRUE, 'language' => $language)), ); - $message['subject'] .= t('[!site-name] !subject', $variables, $options); - $message['body'][] = t('Hello !recipient-name,', $variables, $options); - $message['body'][] = t("!sender-name (!sender-url) has sent you a message via your contact form at !site-name.", $variables, $options); - $message['body'][] = t("If you don't want to receive such emails, you can change your settings at !recipient-edit-url.", $variables, $options); + $message['subject'] .= t('[@site-name] @subject', $variables, $options); + $message['body'][] = t('Hello @recipient-name,', $variables, $options); + $message['body'][] = t("@sender-name (@sender-url) has sent you a message via your contact form at @site-name.", $variables, $options); + $message['body'][] = t("If you don't want to receive such emails, you can change your settings at @recipient-edit-url.", $variables, $options); $build = entity_view($contact_message, 'mail', $language->getId()); $message['body'][] = (string) \Drupal::service('renderer')->renderPlain($build); break; diff --git a/core/modules/contact/src/MailHandler.php b/core/modules/contact/src/MailHandler.php index 308acf5..606292c 100644 --- a/core/modules/contact/src/MailHandler.php +++ b/core/modules/contact/src/MailHandler.php @@ -91,7 +91,7 @@ public function sendMailMessages(MessageInterface $message, AccountInterface $se // For the email message, clarify that the sender name is not verified; it // could potentially clash with a username on this site. - $sender_cloned->name = $this->t('!name (not verified)', array('!name' => $message->getSenderName())); + $sender_cloned->name = $this->t('@name (not verified)', array('@name' => $message->getSenderName())); } // Build email parameters. diff --git a/core/modules/contact/src/Tests/ContactPersonalTest.php b/core/modules/contact/src/Tests/ContactPersonalTest.php index 102452e..fb35dfb 100644 --- a/core/modules/contact/src/Tests/ContactPersonalTest.php +++ b/core/modules/contact/src/Tests/ContactPersonalTest.php @@ -74,12 +74,12 @@ function testSendPersonalContactMessage() { $this->assertEqual($mail['reply-to'], $this->webUser->getEmail()); $this->assertEqual($mail['key'], 'user_mail'); $variables = array( - '!site-name' => $this->config('system.site')->get('name'), - '!subject' => $message['subject[0][value]'], - '!recipient-name' => $this->contactUser->getUsername(), + '@site-name' => $this->config('system.site')->get('name'), + '@subject' => $message['subject[0][value]'], + '@recipient-name' => $this->contactUser->getUsername(), ); - $this->assertEqual($mail['subject'], t('[!site-name] !subject', $variables), 'Subject is in sent message.'); - $this->assertTrue(strpos($mail['body'], t('Hello !recipient-name,', $variables)) !== FALSE, 'Recipient name is in sent message.'); + $this->assertEqual($mail['subject'], t('[@site-name] @subject', $variables), 'Subject is in sent message.'); + $this->assertTrue(strpos($mail['body'], t('Hello @recipient-name,', $variables)) !== FALSE, 'Recipient name is in sent message.'); $this->assertTrue(strpos($mail['body'], $this->webUser->getUsername()) !== FALSE, 'Sender name is in sent message.'); $this->assertTrue(strpos($mail['body'], $message['message[0][value]']) !== FALSE, 'Message body is in sent message.'); diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php index 87d693a..626004d 100644 --- a/core/modules/contact/src/Tests/ContactSitewideTest.php +++ b/core/modules/contact/src/Tests/ContactSitewideTest.php @@ -128,7 +128,7 @@ function testSiteWideContact() { $max_length = EntityTypeInterface::BUNDLE_MAX_LENGTH; $max_length_exceeded = $max_length + 1; $this->addContactForm($id = Unicode::strtolower($this->randomMachineName($max_length_exceeded)), $label = $this->randomMachineName($max_length_exceeded), implode(',', array($recipients[0])), '', TRUE); - $this->assertText(format_string('Machine-readable name cannot be longer than !max characters but is currently !exceeded characters long.', array('!max' => $max_length, '!exceeded' => $max_length_exceeded))); + $this->assertText(format_string('Machine-readable name cannot be longer than @max characters but is currently @exceeded characters long.', array('@max' => $max_length, '@exceeded' => $max_length_exceeded))); $this->addContactForm($id = Unicode::strtolower($this->randomMachineName($max_length)), $label = $this->randomMachineName($max_length), implode(',', array($recipients[0])), '', TRUE); $this->assertRaw(t('Contact form %label has been added.', array('%label' => $label))); diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index a8d4c49..941f6ed 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -23,12 +23,12 @@ function content_translation_install() { function content_translation_enable() { // Translation works when at least two languages are added. if (count(\Drupal::languageManager()->getLanguages()) < 2) { - $t_args = array('!language_url' => \Drupal::url('entity.configurable_language.collection')); - $message = t('Be sure to add at least two languages to translate content.', $t_args); + $t_args = array('@language_url' => \Drupal::url('entity.configurable_language.collection')); + $message = t('Be sure to add at least two languages to translate content.', $t_args); drupal_set_message($message, 'warning'); } // Point the user to the content translation settings. - $t_args = array('!settings_url' => \Drupal::url('language.content_settings_page')); - $message = t('Enable translation for content types, taxonomy vocabularies, accounts, or any other element you wish to translate.', $t_args); + $t_args = array('@settings_url' => \Drupal::url('language.content_settings_page')); + $message = t('Enable translation for content types, taxonomy vocabularies, accounts, or any other element you wish to translate.', $t_args); drupal_set_message($message, 'warning'); } diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index da02771..5323352 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -23,11 +23,11 @@ function content_translation_help($route_name, RouteMatchInterface $route_match) case 'help.page.content_translation': $output = ''; $output .= '

' . t('About') . '

'; - $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 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling translation') . '
'; - $output .= '
' . t('In order to translate content, the website must have at least two languages. When that is the case, you can enable translation for the desired content entities on the Content language page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', array('!url' => \Drupal::url('entity.configurable_language.collection'), '!translation-entity' => \Drupal::url('language.content_settings_page'), '!language-help' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; + $output .= '
' . t('In order to translate content, the website must have at least two languages. When that is the case, you can enable translation for the desired content entities on the Content language page. When enabling translation you can choose the default language for content and decide whether to show the language selection field on the content editing forms.', array('@url' => \Drupal::url('entity.configurable_language.collection'), '@translation-entity' => \Drupal::url('language.content_settings_page'), '@language-help' => \Drupal::url('help.page', array('name' => 'language')))) . '
'; $output .= '
' . t('Enabling field translation') . '
'; $output .= '
' . t('You can define which fields of a content entity can be translated. For example, you might want to translate the title and body field while leaving the image field untranslated. If you exclude a field from being translated, it will still show up in the content editing form, but any changes made to that field will be applied to all translations of that content.') . '
'; $output .= '
' . t('Translating content') . '
'; @@ -42,7 +42,7 @@ function content_translation_help($route_name, RouteMatchInterface $route_match) case 'language.content_settings_page': $output = ''; if (!\Drupal::languageManager()->isMultilingual()) { - $output .= '
' . t('Before you can translate content, there must be at least two languages added on the languages administration page.', array('!url' => \Drupal::url('entity.configurable_language.collection'))); + $output .= '
' . t('Before you can translate content, there must be at least two languages added on the languages administration page.', array('@url' => \Drupal::url('entity.configurable_language.collection'))); } return $output; } diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php index 10cf5f3..3979fff 100644 --- a/core/modules/content_translation/src/ContentTranslationHandler.php +++ b/core/modules/content_translation/src/ContentTranslationHandler.php @@ -290,8 +290,8 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En $title = $this->entityFormTitle($entity); // When editing the original values display just the entity label. if ($form_langcode != $entity_langcode) { - $t_args = array('%language' => $languages[$form_langcode]->getName(), '%title' => $entity->label(), '!title' => $title); - $title = empty($source_langcode) ? t('!title [%language translation]', $t_args) : t('Create %language translation of %title', $t_args); + $t_args = array('%language' => $languages[$form_langcode]->getName(), '%title' => $entity->label(), '@title' => $title); + $title = empty($source_langcode) ? t('@title [%language translation]', $t_args) : t('Create %language translation of %title', $t_args); } $form['#title'] = $title; } diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index a672e4e..ef240d9 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -76,7 +76,7 @@ function contextual_help($route_name, RouteMatchInterface $route_match) { case 'help.page.contextual': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Displaying contextual links') . '
'; @@ -84,8 +84,8 @@ function contextual_help($route_name, RouteMatchInterface $route_match) { $output .= t('Contextual links for an area on a page are displayed using a contextual links button. There are two ways to make the contextual links button visible:'); $output .= '
    '; $sample_picture = '' . t('contextual links button') . ''; - $output .= '
  1. ' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: !picture', array('!picture' => $sample_picture)) . '
  2. '; - $output .= '
  3. ' . t('If you have the Toolbar module enabled, clicking the contextual links button in the toolbar (which looks like a pencil) will make all contextual links buttons on the page visible. Clicking this button again will toggle them to invisible.', array('!toolbar' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
  4. '; + $output .= '
  5. ' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: @picture', array('@picture' => $sample_picture)) . '
  6. '; + $output .= '
  7. ' . t('If you have the Toolbar module enabled, clicking the contextual links button in the toolbar (which looks like a pencil) will make all contextual links buttons on the page visible. Clicking this button again will toggle them to invisible.', array('@toolbar' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
  8. '; $output .= '
'; $output .= t('Once the contextual links button for the area of interest is visible, click the button to display the links.'); $output .= ''; diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module index a8a8184..d5d7eb0 100644 --- a/core/modules/datetime/datetime.module +++ b/core/modules/datetime/datetime.module @@ -33,13 +33,13 @@ function datetime_help($route_name, RouteMatchInterface $route_match) { case 'help.page.datetime': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying date fields') . '
'; - $output .= '
' . t('The settings and the display of the Date field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the Date field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Displaying dates') . '
'; - $output .= '
' . t('Dates can be displayed using the Plain or the Default formatter. The Plain formatter displays the date in the ISO 8601 format. If you choose the Default formatter, you can choose a format from a predefined list that can be managed on the Date and time formats page.', array('!date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '
'; + $output .= '
' . t('Dates can be displayed using the Plain or the Default formatter. The Plain formatter displays the date in the ISO 8601 format. If you choose the Default formatter, you can choose a format from a predefined list that can be managed on the Date and time formats page.', array('@date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php index 6b38584..3e4a2ef 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php +++ b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeDatelistWidget.php @@ -141,10 +141,10 @@ function settingsForm(array $form, FormStateInterface $form_state) { public function settingsSummary() { $summary = array(); - $summary[] = t('Date part order: !order', array('!order' => $this->getSetting('date_order'))); + $summary[] = t('Date part order: @order', array('@order' => $this->getSetting('date_order'))); if ($this->getFieldSetting('datetime_type') == 'datetime') { - $summary[] = t('Time type: !time_type', array('!time_type' => $this->getSetting('time_type'))); - $summary[] = t('Time increments: !increment', array('!increment' => $this->getSetting('increment'))); + $summary[] = t('Time type: @time_type', array('@time_type' => $this->getSetting('time_type'))); + $summary[] = t('Time increments: @increment', array('@increment' => $this->getSetting('increment'))); } return $summary; diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index 91c6038..c4b6493 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -21,13 +21,13 @@ function dblog_help($route_name, RouteMatchInterface $route_match) { case 'help.page.dblog': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Monitoring your site') . '
'; - $output .= '
' . t('The Database Logging module allows you to view an event log on the Recent log messages page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', array('!dblog' => \Drupal::url('dblog.overview'))) . '
'; + $output .= '
' . t('The Database Logging module allows you to view an event log on the Recent log messages page. The log is a chronological list of recorded events containing usage data, performance data, errors, warnings and operational information. Administrators should check the log on a regular basis to ensure their site is working properly.', array('@dblog' => \Drupal::url('dblog.overview'))) . '
'; $output .= '
' . t('Debugging site problems') . '
'; - $output .= '
' . t('In case of errors or problems with the site, the Recent log messages page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', array('!dblog' => \Drupal::url('dblog.overview'))) . '
'; + $output .= '
' . t('In case of errors or problems with the site, the Recent log messages page can be useful for debugging, since it shows the sequence of events. The log messages include usage information, warnings, and errors.', array('@dblog' => \Drupal::url('dblog.overview'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 470f269..d65da7e 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -24,13 +24,13 @@ function editor_help($route_name, RouteMatchInterface $route_match) { case 'help.page.editor': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Installing text editors') . '
'; - $output .= '
' . t('The Text Editor module provides a framework for managing editors. To use it, you also need to enable a text editor. This can either be the core CKEditor module, which can be enabled on the Extend page, or a contributed module for any other text editor. When installing a contributed text editor module, be sure to check the installation instructions, because you will most likely need to download and install an external library as well as the Drupal module.', array('!ckeditor' => (\Drupal::moduleHandler()->moduleExists('ckeditor')) ? \Drupal::url('help.page', array('name' => 'ckeditor')) : '#', '!extend' => \Drupal::url('system.modules_list'))) . '
'; + $output .= '
' . t('The Text Editor module provides a framework for managing editors. To use it, you also need to enable a text editor. This can either be the core CKEditor module, which can be enabled on the Extend page, or a contributed module for any other text editor. When installing a contributed text editor module, be sure to check the installation instructions, because you will most likely need to download and install an external library as well as the Drupal module.', array('@ckeditor' => (\Drupal::moduleHandler()->moduleExists('ckeditor')) ? \Drupal::url('help.page', array('name' => 'ckeditor')) : '#', '@extend' => \Drupal::url('system.modules_list'))) . '
'; $output .= '
' . t('Enabling a text editor for a text format') . '
'; - $output .= '
' . t('On the Text formats and editors page you can see which text editor is associated with each text format. You can change this by clicking on the Configure link, and then choosing a text editor or none from the Text editor drop-down list. The text editor will then be displayed with any text field for which this text format is chosen.', array('!formats' => \Drupal::url('filter.admin_overview'))) . '
'; + $output .= '
' . t('On the Text formats and editors page you can see which text editor is associated with each text format. You can change this by clicking on the Configure link, and then choosing a text editor or none from the Text editor drop-down list. The text editor will then be displayed with any text field for which this text format is chosen.', array('@formats' => \Drupal::url('filter.admin_overview'))) . '
'; $output .= '
' . t('Configuring a text editor') . '
'; $output .= '
' . t('Once a text editor is associated with a text format, you can configure it by clicking on the Configure link for this format. Depending on the specific text editor, you can configure it for example by adding buttons to its toolbar. Typically these buttons provide formatting or editing tools, and they often insert HTML tags into the field source. For details, see the help page of the specific text editor.') . '
'; $output .= '
' . t('Using different text editors and formats') . '
'; diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module index e206dee..52a4d45 100644 --- a/core/modules/entity_reference/entity_reference.module +++ b/core/modules/entity_reference/entity_reference.module @@ -23,11 +23,11 @@ function entity_reference_help($route_name, RouteMatchInterface $route_match) { case 'help.page.entity_reference': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying entity reference fields') . '
'; - $output .= '
' . t('The settings and the display of the entity reference field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the entity reference field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Selecting reference type') . '
'; $output .= '
' . t('In the field settings you can select which type of item you want to create a reference to.') . '
'; $output .= '
' . t('Filtering and sorting reference fields') . '
'; diff --git a/core/modules/field/field.module b/core/modules/field/field.module index d09049e..e6acf27 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -66,7 +66,7 @@ function field_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('About') . '

'; - $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('Terminology') . '

'; $output .= '
'; $output .= '
' . t('Entities and entity types') . '
'; @@ -83,7 +83,7 @@ function field_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Enabling field types, widgets, and formatters') . '
'; - $output .= '
' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be enabled from the Extend administration page. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the contributed module section of Drupal.org.', array('!modules' => \Drupal::url('system.modules_list'), '!contrib' => 'https://www.drupal.org/project/modules')) . '
'; + $output .= '
' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be enabled from the Extend administration page. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the contributed module section of Drupal.org.', array('@modules' => \Drupal::url('system.modules_list'), '@contrib' => 'https://www.drupal.org/project/modules')) . '
'; $output .= '

' . t('Field, widget, and formatter information') . '

'; diff --git a/core/modules/field/src/Tests/FieldImportDeleteTest.php b/core/modules/field/src/Tests/FieldImportDeleteTest.php index 721d52b..d4ffb05 100644 --- a/core/modules/field/src/Tests/FieldImportDeleteTest.php +++ b/core/modules/field/src/Tests/FieldImportDeleteTest.php @@ -65,11 +65,11 @@ public function testImportDelete() { $active = $this->container->get('config.storage'); $staging = $this->container->get('config.storage.staging'); $this->copyConfig($active, $staging); - $this->assertTrue($staging->delete($field_storage_config_name), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name))); - $this->assertTrue($staging->delete($field_storage_config_name_2), SafeMarkup::format('Deleted field storage: !field_storage', array('!field_storage' => $field_storage_config_name_2))); - $this->assertTrue($staging->delete($field_config_name), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name))); - $this->assertTrue($staging->delete($field_config_name_2a), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2a))); - $this->assertTrue($staging->delete($field_config_name_2b), SafeMarkup::format('Deleted field: !field', array('!field' => $field_config_name_2b))); + $this->assertTrue($staging->delete($field_storage_config_name), SafeMarkup::format('Deleted field storage: @field_storage', array('@field_storage' => $field_storage_config_name))); + $this->assertTrue($staging->delete($field_storage_config_name_2), SafeMarkup::format('Deleted field storage: @field_storage', array('@field_storage' => $field_storage_config_name_2))); + $this->assertTrue($staging->delete($field_config_name), SafeMarkup::format('Deleted field: @field', array('@field' => $field_config_name))); + $this->assertTrue($staging->delete($field_config_name_2a), SafeMarkup::format('Deleted field: @field', array('@field' => $field_config_name_2a))); + $this->assertTrue($staging->delete($field_config_name_2b), SafeMarkup::format('Deleted field: @field', array('@field' => $field_config_name_2b))); $deletes = $this->configImporter()->getUnprocessedConfiguration('delete'); $this->assertEqual(count($deletes), 5, 'Importing configuration will delete 3 fields and 2 field storages.'); diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index e51cb17..1308241 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -208,7 +208,7 @@ function testFieldFormSingleRequired() { // Submit with missing required value. $edit = array(); $this->drupalPostForm('entity_test/add', $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); // Create an entity $value = mt_rand(1, 127); @@ -228,7 +228,7 @@ function testFieldFormSingleRequired() { "{$field_name}[0][value]" => $value, ); $this->drupalPostForm('entity_test/manage/' . $id, $edit, t('Save')); - $this->assertRaw(t('!name field is required.', array('!name' => $this->field['label'])), 'Required field with no value fails validation'); + $this->assertRaw(t('@name field is required.', array('@name' => $this->field['label'])), 'Required field with no value fails validation'); } // function testFieldFormMultiple() { diff --git a/core/modules/field/src/Tests/String/StringFieldTest.php b/core/modules/field/src/Tests/String/StringFieldTest.php index 40cf424..f59d507 100644 --- a/core/modules/field/src/Tests/String/StringFieldTest.php +++ b/core/modules/field/src/Tests/String/StringFieldTest.php @@ -81,7 +81,7 @@ function _testTextfieldWidgets($field_type, $widget_type) { $this->drupalGet('entity_test/add'); $this->assertFieldByName("{$field_name}[0][value]", '', 'Widget is displayed'); $this->assertNoFieldByName("{$field_name}[0][format]", '1', 'Format selector is not displayed'); - $this->assertRaw(format_string('placeholder="A placeholder on !widget_type"', array('!widget_type' => $widget_type))); + $this->assertRaw(format_string('placeholder="A placeholder on @widget_type"', array('@widget_type' => $widget_type))); // Submit with some value. $value = $this->randomMachineName(); diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index b572c82..cfa85fa 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -24,7 +24,7 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) { case 'help.page.field_ui': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating a field') . '
'; @@ -36,9 +36,9 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Configuring field display') . '
'; $output .= '
' . t('On the Manage display page of your entity type or sub-type, you can configure how each field is displayed by default and in each view mode. If your entity type has multiple view modes, you can toggle between the view modes at the top of the page, and you can toggle whether each view mode uses the default settings or custom settings in the Custom display settings section. For each field in each view mode, you can choose whether and how to display the label of the field from the Label drop-down list. You can also select the formatter to use for display; some formatters have configuration options, which you can edit using the Edit button (which looks like a wheel). You can also change the display order of fields. You can exclude a field from a specific view mode by choosing Hidden from the formatter drop-down list, or by dragging it into the Disabled section.') . '
'; $output .= '
' . t('Configuring view and form modes') . '
'; - $output .= '
' . t('You can add, edit, and delete view modes for entities on the View modes page, and you can add, edit, and delete form modes for entities on the Form modes page. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', array('!view_modes' => \Drupal::url('entity.entity_view_mode.collection'), '!form_modes' => \Drupal::url('entity.entity_form_mode.collection'))) . '
'; + $output .= '
' . t('You can add, edit, and delete view modes for entities on the View modes page, and you can add, edit, and delete form modes for entities on the Form modes page. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', array('@view_modes' => \Drupal::url('entity.entity_view_mode.collection'), '@form_modes' => \Drupal::url('entity.entity_form_mode.collection'))) . '
'; $output .= '
' . t('Listing fields') . '
'; - $output .= '
' . t('There are two reports available that list the fields defined on your site. The Entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', array('!entity-list' => \Drupal::url('entity.field_storage_config.collection'), '!views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', '!views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#','!views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; + $output .= '
' . t('There are two reports available that list the fields defined on your site. The Entities report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the Views and Views UI modules are enabled, the Used in views report lists each field that is used in a view, with a link to edit that view.', array('@entity-list' => \Drupal::url('entity.field_storage_config.collection'), '@views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', '@views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#','@views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '
'; $output .= '
'; return $output; diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc index 3fc93ef..ec23b06 100644 --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -178,7 +178,7 @@ function template_preprocess_file_upload_help(&$variables) { } } if (isset($upload_validators['file_validate_size'])) { - $descriptions[] = t('!size limit.', array('!size' => format_size($upload_validators['file_validate_size'][0]))); + $descriptions[] = t('@size limit.', array('@size' => format_size($upload_validators['file_validate_size'][0]))); } if (isset($upload_validators['file_validate_extensions'])) { $descriptions[] = t('Allowed types: @extensions.', array('@extensions' => $upload_validators['file_validate_extensions'][0])); diff --git a/core/modules/file/file.module b/core/modules/file/file.module index a995916..f0cc01e 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -32,15 +32,15 @@ function file_help($route_name, RouteMatchInterface $route_match) { case 'help.page.file': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying file fields') . '
'; - $output .= '
' . t('The settings and the display of the file field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the file field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Allowing file extensions') . '
'; $output .= '
' . t('In the field settings, you can define the allowed file extensions (for example pdf docx psd) for the files that will be uploaded with the file field.') . '
'; $output .= '
' . t('Storing files ') . '
'; - $output .= '
' . t('Uploaded files can either be stored as public or private, depending on the File system settings. For more information, see the System module help page.', array('!file-system' => \Drupal::url('system.file_system_settings'), '!system-help' => \Drupal::url('help.page', array('name' => 'system')))) . '
'; + $output .= '
' . t('Uploaded files can either be stored as public or private, depending on the File system settings. For more information, see the System module help page.', array('@file-system' => \Drupal::url('system.file_system_settings'), '@system-help' => \Drupal::url('help.page', array('name' => 'system')))) . '
'; $output .= '
' . t('Restricting the maximum file size') . '
'; $output .= '
' . t('The maximum file size that users can upload is limited by PHP settings of the server, but you can restrict by entering the desired value as the Maximum upload size setting. The maximum file size is automatically displayed to users in the help text of the file field.') . '
'; $output .= '
' . t('Displaying files and descriptions') . '
'; @@ -1171,7 +1171,7 @@ function file_managed_file_save_upload($element, FormStateInterface $form_state) $destination = isset($element['#upload_location']) ? $element['#upload_location'] : NULL; if (isset($destination) && !file_prepare_directory($destination, FILE_CREATE_DIRECTORY)) { - \Drupal::logger('file')->notice('The upload directory %directory for the file field !name could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.', array('%directory' => $destination, '!name' => $element['#field_name'])); + \Drupal::logger('file')->notice('The upload directory %directory for the file field @name could not be created or is not accessible. A newly uploaded file could not be saved in this directory as a consequence, and the upload was canceled.', array('%directory' => $destination, '@name' => $element['#field_name'])); $form_state->setError($element, t('The file could not be uploaded.')); return FALSE; } @@ -1182,7 +1182,7 @@ function file_managed_file_save_upload($element, FormStateInterface $form_state) if ($files_uploaded) { if (!$files = file_save_upload($upload_name, $element['#upload_validators'], $destination)) { \Drupal::logger('file')->notice('The file upload failed. %upload', array('%upload' => $upload_name)); - $form_state->setError($element, t('Files in the !name field were unable to be uploaded.', array('!name' => $element['#title']))); + $form_state->setError($element, t('Files in the @name field were unable to be uploaded.', array('@name' => $element['#title']))); return array(); } diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc index 752513a..7fb54b6 100644 --- a/core/modules/file/file.views.inc +++ b/core/modules/file/file.views.inc @@ -24,7 +24,7 @@ function file_field_views_data(FieldStorageConfigInterface $field_storage) { 'base' => 'file_managed', 'entity type' => 'file', 'base field' => 'fid', - 'label' => t('file from !field_name', array('!field_name' => $field_storage->getName())), + 'label' => t('file from @field_name', array('@field_name' => $field_storage->getName())), ); } diff --git a/core/modules/file/src/Element/ManagedFile.php b/core/modules/file/src/Element/ManagedFile.php index c2fa103..799bf25 100644 --- a/core/modules/file/src/Element/ManagedFile.php +++ b/core/modules/file/src/Element/ManagedFile.php @@ -372,19 +372,19 @@ public static function validateManagedFile(&$element, FormStateInterface $form_s if ($file->isPermanent()) { $references = static::fileUsage()->listUsage($file); if (empty($references)) { - $form_state->setError($element, t('The file used in the !name field may not be referenced.', ['!name' => $element['#title']])); + $form_state->setError($element, t('The file used in the @name field may not be referenced.', ['@name' => $element['#title']])); } } } else { - $form_state->setError($element, t('The file referenced by the !name field does not exist.', ['!name' => $element['#title']])); + $form_state->setError($element, t('The file referenced by the @name field does not exist.', ['@name' => $element['#title']])); } } } // Check required property based on the FID. if ($element['#required'] && empty($element['fids']['#value']) && !in_array($clicked_button, ['upload_button', 'remove_button'])) { - $form_state->setError($element, t('!name is required.', ['!name' => $element['#title']])); + $form_state->setError($element, t('@name is required.', ['@name' => $element['#title']])); } // Consolidate the array value of this field to array of FIDs. diff --git a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php index f609b70..d033c08 100644 --- a/core/modules/file/src/Plugin/Field/FieldType/FileItem.php +++ b/core/modules/file/src/Plugin/Field/FieldType/FileItem.php @@ -249,7 +249,7 @@ public static function validateExtensions($element, FormStateInterface $form_sta */ public static function validateMaxFilesize($element, FormStateInterface $form_state) { if (!empty($element['#value']) && !is_numeric(Bytes::toInt($element['#value']))) { - $form_state->setError($element, t('The "!name" option must contain a valid value. You may either leave the text field empty or enter a string like "512" (bytes), "80 KB" (kilobytes) or "50 MB" (megabytes).', array('!name' => t($element['title'])))); + $form_state->setError($element, t('The "@name" option must contain a valid value. You may either leave the text field empty or enter a string like "512" (bytes), "80 KB" (kilobytes) or "50 MB" (megabytes).', array('@name' => t($element['title'])))); } } diff --git a/core/modules/file/src/Tests/SaveUploadTest.php b/core/modules/file/src/Tests/SaveUploadTest.php index baeb443..7c3bd4c 100644 --- a/core/modules/file/src/Tests/SaveUploadTest.php +++ b/core/modules/file/src/Tests/SaveUploadTest.php @@ -220,7 +220,7 @@ function testHandleDangerousFile() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found no security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $this->phpfile->filename)), 'Dangerous file was not renamed when insecure uploads is TRUE.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $this->phpfile->filename)), 'Dangerous file was not renamed when insecure uploads is TRUE.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. @@ -254,7 +254,7 @@ function testHandleFileMunge() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertRaw(t('For security reasons, your upload has been renamed'), 'Found security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $munged_filename)), 'File was successfully munged.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $munged_filename)), 'File was successfully munged.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. @@ -272,7 +272,7 @@ function testHandleFileMunge() { $this->drupalPostForm('file-test/upload', $edit, t('Submit')); $this->assertResponse(200, 'Received a 200 response for posted test file.'); $this->assertNoRaw(t('For security reasons, your upload has been renamed'), 'Found no security message.'); - $this->assertRaw(t('File name is !filename', array('!filename' => $this->image->getFilename())), 'File was not munged when allowing any extension.'); + $this->assertRaw(t('File name is @filename', array('@filename' => $this->image->getFilename())), 'File was not munged when allowing any extension.'); $this->assertRaw(t('You WIN!'), 'Found the success message.'); // Check that the correct hooks were called. diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index c186576..977bbaf 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -25,11 +25,11 @@ function filter_help($route_name, RouteMatchInterface $route_match) { case 'help.page.filter': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing text formats') . '
'; - $output .= '
' . t('You can create and edit text formats on the Text formats page (if the Text Editor module is enabled, this page is named Text formats and editors). One text format is included by default: Plain text (which removes all HTML tags). Additional text formats may be created during installation. You can create a text format by clicking "Add text format".', array('!formats' => \Drupal::url('filter.admin_overview'),'!add_format' => \Drupal::url('filter.format_add'))) . '
'; + $output .= '
' . t('You can create and edit text formats on the Text formats page (if the Text Editor module is enabled, this page is named Text formats and editors). One text format is included by default: Plain text (which removes all HTML tags). Additional text formats may be created during installation. You can create a text format by clicking "Add text format".', array('@formats' => \Drupal::url('filter.admin_overview'),'@add_format' => \Drupal::url('filter.format_add'))) . '
'; $output .= '
' . t('Assigning roles to text formats') . '
'; $output .= '
' . t('You can define which users will be able to use each text format by selecting roles. To ensure security, anonymous and untrusted users should only have access to text formats that restrict them to either plain text or a safe set of HTML tags. This is because HTML tags can allow embedding malicious links or scripts in text. More trusted registered users may be granted permission to use less restrictive text formats in order to create rich text. Improper text format configuration is a security risk.') . '
'; $output .= '
' . t('Selecting filters') . '
'; diff --git a/core/modules/filter/src/Tests/FilterFormatAccessTest.php b/core/modules/filter/src/Tests/FilterFormatAccessTest.php index 029c60b..5613243 100644 --- a/core/modules/filter/src/Tests/FilterFormatAccessTest.php +++ b/core/modules/filter/src/Tests/FilterFormatAccessTest.php @@ -279,7 +279,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); @@ -314,7 +314,7 @@ function testFormatWidgetPermissions() { $edit = array(); $edit['title[0][value]'] = $new_title; $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Text format'))), 'Error message is displayed.'); + $this->assertText(t('@name field is required.', array('@name' => t('Text format'))), 'Error message is displayed.'); $this->drupalGet('node/' . $node->id()); $this->assertText($old_title, 'Old title found.'); $this->assertNoText($new_title, 'New title not found.'); diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 90086a6..acbfebd 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -24,7 +24,7 @@ function forum_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '

' . t('About') . '

'; $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 .= '

    '; $output .= '
  • ' . t('Forums (for example, Recipes for cooking vegetables)') . '
  • '; @@ -33,15 +33,15 @@ function forum_help($route_name, RouteMatchInterface $route_match) { $output .= '
  • ' . t('Optional containers, used to group similar forums. Forums can be placed inside containers, and vice versa.').'
  • '; $output .= '
'; $output .= '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Setting up the forum structure') . '
'; - $output .= '
' . t('Visit the Forums page to set up containers and forums to hold your discussion topics.', array('!forums' => \Drupal::url('forum.overview'))) . '
'; + $output .= '
' . t('Visit the Forums page to set up containers and forums to hold your discussion topics.', array('@forums' => \Drupal::url('forum.overview'))) . '
'; $output .= '
' . t('Starting a discussion') . '
'; - $output .= '
' . t('The Forum topic link on the Add content page creates the first post of a new threaded discussion, or thread.', array('!create-topic' => \Drupal::url('node.add', array('node_type' => 'forum')), '!content-add' => \Drupal::url('node.add_page'))) . '
'; + $output .= '
' . t('The Forum topic link on the Add content page creates the first post of a new threaded discussion, or thread.', array('@create-topic' => \Drupal::url('node.add', array('node_type' => 'forum')), '@content-add' => \Drupal::url('node.add_page'))) . '
'; $output .= '
' . t('Navigating in the forum') . '
'; - $output .= '
' . t('Enabling the Forum module provides a default Forums menu item in the Tools menu that links to the Forums page.', array('!forums' => \Drupal::url('forum.index'))) . '
'; + $output .= '
' . t('Enabling the Forum module provides a default Forums menu item in the Tools menu that links to the Forums page.', array('@forums' => \Drupal::url('forum.index'))) . '
'; $output .= '
' . t('Moving forum topics') . '
'; $output .= '
' . t('A forum topic (and all of its comments) may be moved between forums by selecting a different forum while editing a forum topic. When moving a forum topic between forums, the Leave shadow copy option creates a link in the original forum pointing to the new location.') . '
'; $output .= '
' . t('Locking and disabling comments') . '
'; @@ -76,7 +76,7 @@ function forum_help($route_name, RouteMatchInterface $route_match) { return '

' . 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('About') . '

'; - $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('Getting Started') . '

'; $output .= '

' . t('Follow these steps to set up and start using your website:') . '

'; $output .= '
    '; - $output .= '
  1. ' . t('Configure your website Once logged in, visit the Administration page, where you may customize and configure all aspects of your website.', array('!admin' => \Drupal::url('system.admin'), '!config' => \Drupal::url('system.admin_config'))) . '
  2. '; - $output .= '
  3. ' . t('Enable additional functionality Next, visit the Extend page and enable modules that suit your specific needs. You can find additional modules at the Drupal.org modules page.', array('!modules' => \Drupal::url('system.modules_list'), '!download_modules' => 'https://www.drupal.org/project/modules')) . '
  4. '; - $output .= '
  5. ' . t('Customize your website design To change the "look and feel" of your website, visit the Appearance page. You may choose from one of the included themes or download additional themes from the Drupal.org themes page.', array('!themes' => \Drupal::url('system.themes_page'), '!download_themes' => 'https://www.drupal.org/project/themes')) . '
  6. '; + $output .= '
  7. ' . t('Configure your website Once logged in, visit the Administration page, where you may customize and configure all aspects of your website.', array('@admin' => \Drupal::url('system.admin'), '@config' => \Drupal::url('system.admin_config'))) . '
  8. '; + $output .= '
  9. ' . t('Enable additional functionality Next, visit the Extend page and enable modules that suit your specific needs. You can find additional modules at the Drupal.org modules page.', array('@modules' => \Drupal::url('system.modules_list'), '@download_modules' => 'https://www.drupal.org/project/modules')) . '
  10. '; + $output .= '
  11. ' . t('Customize your website design To change the "look and feel" of your website, visit the Appearance page. You may choose from one of the included themes or download additional themes from the Drupal.org themes page.', array('@themes' => \Drupal::url('system.themes_page'), '@download_themes' => 'https://www.drupal.org/project/themes')) . '
  12. '; // Display a link to the create content page if Node module is enabled. if (\Drupal::moduleHandler()->moduleExists('node')) { - $output .= '
  13. ' . t('Start posting content Finally, you may add new content to your website.', array('!content' => \Drupal::url('node.add_page'))) . '
  14. '; + $output .= '
  15. ' . t('Start posting content Finally, you may add new content to your website.', array('@content' => \Drupal::url('node.add_page'))) . '
  16. '; } $output .= '
'; - $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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Providing a help reference') . '
'; - $output .= '
' . t('The Help module displays explanations for using each module listed on the main Help reference page.', array('!help' => \Drupal::url('help.main'))) . '
'; + $output .= '
' . t('The Help module displays explanations for using each module listed on the main Help reference page.', array('@help' => \Drupal::url('help.main'))) . '
'; $output .= '
' . t('Providing page-specific help') . '
'; - $output .= '
' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the Block layout page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the Block layout page.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/help/src/Tests/HelpTest.php b/core/modules/help/src/Tests/HelpTest.php index 2a423ba..1c91dcc 100644 --- a/core/modules/help/src/Tests/HelpTest.php +++ b/core/modules/help/src/Tests/HelpTest.php @@ -67,7 +67,7 @@ public function testHelp() { // Verify that introductory help text exists, goes for 100% module coverage. $this->drupalLogin($this->adminUser); $this->drupalGet('admin/help'); - $this->assertRaw(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')), 'Help intro text correctly appears.'); + $this->assertRaw(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')), 'Help intro text correctly appears.'); // Verify that help topics text appears. $this->assertRaw('

' . t('Help topics') . '

' . t('Help is available on the following items:') . '

', 'Help topics text correctly appears.'); 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('About') . '

'; - $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('About') . '

'; - $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('Uses') . '

'; $output .= '
' . t('Defining image styles') . '
'; - $output .= '
' . t('The concept of image styles is that you can upload a single image but display it in several ways; each display variation, or image style, is the result of applying one or more effects to the original image. As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects). The Image module provides a way to do this efficiently: you configure an image style with the desired effects on the Image styles page, and the first time a particular image is requested in that style, the effects are applied. The resulting image is saved, and the next time that same style is requested, the saved image is retrieved without the need to recalculate the effects. Drupal core provides several effects that you can use to define styles; others may be provided by contributed modules.', array('!image' => \Drupal::url('entity.image_style.collection'))); + $output .= '
' . t('The concept of image styles is that you can upload a single image but display it in several ways; each display variation, or image style, is the result of applying one or more effects to the original image. As an example, you might upload a high-resolution image with a 4:3 aspect ratio, and display it scaled down, square cropped, or black-and-white (or any combination of these effects). The Image module provides a way to do this efficiently: you configure an image style with the desired effects on the Image styles page, and the first time a particular image is requested in that style, the effects are applied. The resulting image is saved, and the next time that same style is requested, the saved image is retrieved without the need to recalculate the effects. Drupal core provides several effects that you can use to define styles; others may be provided by contributed modules.', array('@image' => \Drupal::url('entity.image_style.collection'))); $output .= '
' . t('Naming image styles') . '
'; $output .= '
' . t('When you define an image style, you will need to choose a displayed name and a machine name. The displayed name is shown in administrative pages, and the machine name is used to generate the URL for accessing an image processed in that style. There are two common approaches to naming image styles: either based on the effects being applied (for example, Square 85x85), or based on where you plan to use it (for example, Profile picture).') . '
'; $output .= '
' . t('Configuring image fields') . '
'; $output .= '
' . t('A few of the settings for image fields are defined once when you create the field and cannot be changed later; these include the choice of public or private file storage and the number of images that can be stored in the field. The rest of the settings can be edited later; these settings include the field label, help text, allowed file extensions, image resolution restrictions, and the subdirectory in the public or private file storage where the images will be stored. The editable settings can also have different values for different entity sub-types; for instance, if your image field is used on both Page and Article content types, you can store the files in a different subdirectory for the two content types.') . '
'; $output .= '
' . t('For accessibility and search engine optimization, all images that convey meaning on web sites should have alternate text. Drupal also allows entry of title text for images, but it can lead to confusion for screen reader users and its use is not recommended. Image fields can be configured so that alternate and title text fields are enabled or disabled; if enabled, the fields can be set to be required. The recommended setting is to enable and require alternate text and disable title text.') . '
'; - $output .= '
' . t('When you create an image field, you will need to choose whether the uploaded images will be stored in the public or private file directory defined in your settings.php file and shown on the File system page. This choice cannot be changed later. You can also configure your field to store files in a subdirectory of the public or private directory; this setting can be changed later and can be different for each entity sub-type using the field. For more information on file storage, see the System module help page.', array('!file-system' => \Drupal::url('system.file_system_settings'), '!system-help' => \Drupal::url('help.page', array('name' => 'system')))) . '
'; + $output .= '
' . t('When you create an image field, you will need to choose whether the uploaded images will be stored in the public or private file directory defined in your settings.php file and shown on the File system page. This choice cannot be changed later. You can also configure your field to store files in a subdirectory of the public or private directory; this setting can be changed later and can be different for each entity sub-type using the field. For more information on file storage, see the System module help page.', array('@file-system' => \Drupal::url('system.file_system_settings'), '@system-help' => \Drupal::url('help.page', array('name' => 'system')))) . '
'; $output .= '
' . t('The maximum file size that can be uploaded is limited by PHP settings of the server, but you can restrict it further by configuring a Maximum upload size in the field settings (this setting can be changed later). The maximum file size, either from PHP server settings or field configuration, is automatically displayed to users in the help text of the image field.') . '
'; - $output .= '
' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the EXIF data in the image will be lost.', array('!exif' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')) . '
'; + $output .= '
' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the EXIF data in the image will be lost.', array('@exif' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')) . '
'; $output .= '
' . t('You can also configure a default image that will be used if no image is uploaded in an image field. This default can be defined for all instances of the field in the field storage settings when you create a field, and the setting can be overridden for each entity sub-type that uses the field.') . '
'; $output .= '
' . t('Configuring displays and form displays') . '
'; $output .= '
' . t('On the Manage display page, you can choose the image formatter, which determines the image style used to display the image in each display mode and whether or not to display the image as a link. On the Manage form display page, you can configure the image upload widget, including setting the preview image style shown on the entity edit form.') . '
'; diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc index b854ff2..29e6b6a 100644 --- a/core/modules/image/image.views.inc +++ b/core/modules/image/image.views.inc @@ -24,7 +24,7 @@ function image_field_views_data(FieldStorageConfigInterface $field_storage) { 'base' => 'file_managed', 'entity type' => 'file', 'base field' => 'fid', - 'label' => t('image from !field_name', array('!field_name' => $field_storage->getName())), + 'label' => t('image from @field_name', array('@field_name' => $field_storage->getName())), ); } diff --git a/core/modules/image/src/ImageStyleListBuilder.php b/core/modules/image/src/ImageStyleListBuilder.php index b0ad227..3b8df1d 100644 --- a/core/modules/image/src/ImageStyleListBuilder.php +++ b/core/modules/image/src/ImageStyleListBuilder.php @@ -91,8 +91,8 @@ public function getDefaultOperations(EntityInterface $entity) { */ public function render() { $build = parent::render(); - $build['#empty'] = $this->t('There are currently no styles. Add a new one.', array( - '!url' => $this->urlGenerator->generateFromPath('admin/config/media/image-styles/add'), + $build['#empty'] = $this->t('There are currently no styles. Add a new one.', array( + '@url' => $this->urlGenerator->generateFromPath('admin/config/media/image-styles/add'), )); return $build; } diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php index d9c1120..b1d0ae9 100644 --- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php +++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php @@ -380,7 +380,7 @@ public static function validateResolution($element, FormStateInterface $form_sta if (!empty($element['x']['#value']) || !empty($element['y']['#value'])) { foreach (array('x', 'y') as $dimension) { if (!$element[$dimension]['#value']) { - $form_state->setError($element[$dimension], t('Both a height and width value must be specified in the !name field.', array('!name' => $element['#title']))); + $form_state->setError($element[$dimension], t('Both a height and width value must be specified in the @name field.', array('@name' => $element['#title']))); return; } } diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 4729316..a8b188c 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -29,27 +29,27 @@ function language_help($route_name, RouteMatchInterface $route_match) { case 'help.page.language': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Adding languages') . '
'; - $output .= '
' . t('You can add languages on the Languages page by selecting Add language and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the Interface translation module is enabled, and the translation server is set as a translation source, then the interface translation for this language is automatically downloaded as well.' , array('!language_list' => \Drupal::url('entity.configurable_language.collection'), '!interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#')) . '
'; + $output .= '
' . t('You can add languages on the Languages page by selecting Add language and choosing a language from the drop-down menu. This language is then displayed in the languages list, where it can be configured further. If the Interface translation module is enabled, and the translation server is set as a translation source, then the interface translation for this language is automatically downloaded as well.' , array('@language_list' => \Drupal::url('entity.configurable_language.collection'), '@interface' => (\Drupal::moduleHandler()->moduleExists('locale')) ? \Drupal::url('help.page', array('name' => 'locale')) : '#')) . '
'; $output .= '
' . t('Adding custom languages') . '
'; $output .= '
' . t('You can add a language that is not provided in the drop-down list by choosing Custom language at the end of the list. You then have to configure its language code, name, and direction in the form provided.') . '
'; $output .= '
' . t('Configuring content languages') . '
'; - $output .= '
' . t('By default, content is created in the site\'s default language and no language selector is displayed on content creation pages. On the Content language page you can customize the language configuration for any supported content entity on your site (for example for content types or menu links). After choosing an entity, you are provided with a drop-down menu to set the default language and a check-box to display language selectors.', array('!content_language' => \Drupal::url('language.content_settings_page'))) . '
'; + $output .= '
' . t('By default, content is created in the site\'s default language and no language selector is displayed on content creation pages. On the Content language page you can customize the language configuration for any supported content entity on your site (for example for content types or menu links). After choosing an entity, you are provided with a drop-down menu to set the default language and a check-box to display language selectors.', array('@content_language' => \Drupal::url('language.content_settings_page'))) . '
'; $output .= '
' . t('Adding a language switcher block') . '
'; - $output .= '
' . t('If the Block module is enabled, then you can add a language switcher block on the Block layout page to allow users to switch between languages.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t('If the Block module is enabled, then you can add a language switcher block on the Block layout page to allow users to switch between languages.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; $output .= '
' . t('Making a block visible per language') . '
'; - $output .= '
' . t('If the Block module is enabled, then the Language module allows you to set the visibility of a block based on selected languages on the Block layout page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t('If the Block module is enabled, then the Language module allows you to set the visibility of a block based on selected languages on the Block layout page.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; $output .= '
' . t('Choosing user languages') . '
'; $output .= '
' . t('Users can choose a Site language on their profile page. This language is used for email messages, and can be used by modules to determine a user\'s language. It can also be used for interface text, if the User method is enabled as a Detection and selection method (see below). Administrative users can choose a separate Administration pages language for the interface text on administration pages. This configuration is only available on the user\'s profile page if the Account administration pages method is enabled (see below).') . '
'; $output .= '
' . t('Language detection and selection') . '
'; - $output .= '
' . t('The Detection and selection page provides several methods for deciding which language is used for displaying interface text. When a method detects and selects an interface language, then the following methods in the list are not applied. You can order them by importance, with your preferred method at the top of the list, followed by one or several fall-back methods.', array('!detection' => \Drupal::url('language.negotiation'))); + $output .= '
' . t('The Detection and selection page provides several methods for deciding which language is used for displaying interface text. When a method detects and selects an interface language, then the following methods in the list are not applied. You can order them by importance, with your preferred method at the top of the list, followed by one or several fall-back methods.', array('@detection' => \Drupal::url('language.negotiation'))); $output .= '
  • ' . t('URL sets the interface language based on a path prefix or domain (for example specifying de for German would result in URLs like example.com/de/contact). The default language does not require a path prefix, but can have one assigned as well. If the language detection is done by domain name, a domain needs to be specified for each language.') . '
  • '; $output .= '
  • ' . t('Session determines the interface language from a request or session parameter (for example example.com?language=de would set the interface language to German based on the use of de as the language parameter).') . '
  • '; $output .= '
  • ' . t('User follows the language configuration set on the user\'s profile page.') . '
  • '; - $output .= '
  • ' . t('Browser sets the interface language based on the browser\'s language settings. Since browsers use different language codes to refer to the same languages, you can add and edit languages codes to map the browser language codes to the language codes used on your site.', array('!language_list' => \Drupal::url('entity.configurable_language.collection'))) . '
  • '; + $output .= '
  • ' . t('Browser sets the interface language based on the browser\'s language settings. Since browsers use different language codes to refer to the same languages, you can add and edit languages codes to map the browser language codes to the language codes used on your site.', array('@language_list' => \Drupal::url('entity.configurable_language.collection'))) . '
  • '; $output .= '
  • ' . t('Account administration pages follows the configuration set as Administration pages language on the profile page of an administrative user. This method is similar to the User method, but only sets the interface text language on administration pages, independent of the interface text language on other pages.') . '
  • '; $output .= '
  • ' . t('Selected language allows you to specify the site\'s default language or a specific language as the fall-back language. This method should be listed last.') . '
'; $output .= '
'; @@ -64,7 +64,7 @@ function language_help($route_name, RouteMatchInterface $route_match) { return '

' . 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/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php index 938564e..b0059a8 100644 --- a/core/modules/language/src/Form/NegotiationConfigureForm.php +++ b/core/modules/language/src/Form/NegotiationConfigureForm.php @@ -281,7 +281,7 @@ protected function configureFormTable(array &$form, $type) { $table_form['weight'][$method_id] = array( '#type' => 'weight', - '#title' => $this->t('Weight for !title language detection method', array('!title' => Unicode::strtolower($method_name))), + '#title' => $this->t('Weight for @title language detection method', array('@title' => Unicode::strtolower($method_name))), '#title_display' => 'invisible', '#default_value' => $weight, '#attributes' => array('class' => array("language-method-weight-$type")), @@ -292,7 +292,7 @@ protected function configureFormTable(array &$form, $type) { $table_form['enabled'][$method_id] = array( '#type' => 'checkbox', - '#title' => $this->t('Enable !title language detection method', array('!title' => Unicode::strtolower($method_name))), + '#title' => $this->t('Enable @title language detection method', array('@title' => Unicode::strtolower($method_name))), '#title_display' => 'invisible', '#default_value' => $enabled, ); 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 8ce087f..eb9dcdb 100644 --- a/core/modules/link/link.module +++ b/core/modules/link/link.module @@ -16,11 +16,11 @@ function link_help($route_name, RouteMatchInterface $route_match) { case 'help.page.link': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying link fields') . '
'; - $output .= '
' . t('The settings and the display of the link field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the link field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Setting the allowed link type') . '
'; $output .= '
' . t('In the field settings you can define the allowed link type to be internal links only, external links only, or both internal and external links. Internal links only and both internal and external links options enable an autocomplete widget for internal links, so a user does not have to copy or remember a URL.') . '
'; $output .= '
' . t('Adding link text') . '
'; diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 37a61ee..b2bb4c6 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -159,7 +159,7 @@ public static function validateUriElement($element, FormStateInterface $form_sta public static function validateTitleElement(&$element, FormStateInterface $form_state, $form) { if ($element['uri']['#value'] !== '' && $element['title']['#value'] === '') { $element['title']['#required'] = TRUE; - $form_state->setError($element['title'], t('!name field is required.', array('!name' => $element['title']['#title']))); + $form_state->setError($element['title'], t('@name field is required.', array('@name' => $element['title']['#title']))); } } diff --git a/core/modules/link/src/Tests/LinkFieldTest.php b/core/modules/link/src/Tests/LinkFieldTest.php index 558e78f..4ca76ef 100644 --- a/core/modules/link/src/Tests/LinkFieldTest.php +++ b/core/modules/link/src/Tests/LinkFieldTest.php @@ -277,14 +277,14 @@ function testLinkTitle() { "{$field_name}[0][uri]" => 'http://www.example.com', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that the link text is not required, if the URL is empty. $edit = array( "{$field_name}[0][uri]" => '', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); // Verify that a URL and link text meets requirements. $this->drupalGet('entity_test/add'); @@ -293,7 +293,7 @@ function testLinkTitle() { "{$field_name}[0][title]" => 'Example', ); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertNoText(t('!name field is required.', array('!name' => t('Link text')))); + $this->assertNoText(t('@name field is required.', array('@name' => t('Link text')))); } } } diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 43c0d6c..506516c 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -220,7 +220,7 @@ function locale_translate_batch_import($file, array $options, array &$context) { // https://www.drupal.org/node/1089472. $context['finished'] = min(0.95, $report['seek'] / filesize($file->uri)); if (isset($options['message'])) { - $context['message'] = t('!message (@percent%).', array('!message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); + $context['message'] = t('@message (@percent%).', array('@message' => $options['message'], '@percent' => (int) ($context['finished'] * 100))); } else { $context['message'] = t('Importing translation file: %filename (@percent%).', array('%filename' => $file->filename, '@percent' => (int) ($context['finished'] * 100))); diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 99b7e34..cd4aa61 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -149,28 +149,36 @@ function locale_help($route_name, RouteMatchInterface $route_match) { case 'help.page.locale': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Importing translation files') . '
'; - $output .= '
' . t('Translation files with translated interface text are imported automatically when languages are added on the Languages page, or when modules or themes are enabled. On the Settings page, the Translation source can be restricted to local files only, or to include the Drupal translation server. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the Settings page. You can also manually import a translation file on the Import page.', array('!import' => \Drupal::url('locale.translate_import'), '!locale-settings' => \Drupal::url('locale.settings'), '!languages' => \Drupal::url('entity.configurable_language.collection'), '!server' => 'https://localize.drupal.org')) . '
'; + $output .= '
' . t('Translation files with translated interface text are imported automatically when languages are added on the Languages page, or when modules or themes are enabled. On the Settings page, the Translation source can be restricted to local files only, or to include the Drupal translation server. Although modules and themes may not be fully translated in all languages, new translations become available frequently. You can specify whether and how often to check for translation file updates and whether to overwrite existing translations on the Settings page. You can also manually import a translation file on the Import page.', array('@import' => \Drupal::url('locale.translate_import'), '@locale-settings' => \Drupal::url('locale.settings'), '@languages' => \Drupal::url('entity.configurable_language.collection'), '@ +@ +@server' => 'https://localize.drupal.org')) . '
'; $output .= '
' . t('Checking the translation status') . '
'; - $output .= '
' . t('You can check how much of the interface on your site is translated into which language on the Languages page. On the Available translation updates page, you can check whether interface translation updates are available on the Drupal translation server.', array('!languages' => \Drupal::url('entity.configurable_language.collection'), '!translation-updates' => \Drupal::url('locale.translate_status'), '!server' => 'https://localize.drupal.org')) . '
'; + $output .= '
' . t('You can check how much of the interface on your site is translated into which language on the Languages page. On the Available translation updates page, you can check whether interface translation updates are available on the Drupal translation server.', array('@languages' => \Drupal::url('entity.configurable_language.collection'), '@translation-updates' => \Drupal::url('locale.translate_status'), '@ +@ +@server' => 'https://localize.drupal.org')) . '
'; $output .= '
' . t('Translating individual strings') . '
'; - $output .= '
' . t('You can translate individual strings directly on the User interface translation page, or download the currently-used translation file for a specific language on the Export page. Once you have edited the translation file, you can then import it again on the Import page.', array('!translate' => \Drupal::url('locale.translate_page'), '!export' => \Drupal::url('locale.translate_export'), '!import' => \Drupal::url('locale.translate_import'))) . '
'; + $output .= '
' . t('You can translate individual strings directly on the User interface translation page, or download the currently-used translation file for a specific language on the Export page. Once you have edited the translation file, you can then import it again on the Import page.', array('@translate' => \Drupal::url('locale.translate_page'), '@export' => \Drupal::url('locale.translate_export'), '@import' => \Drupal::url('locale.translate_import'))) . '
'; $output .= '
'; return $output; case 'entity.configurable_language.collection': - 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'))) . '

'; + 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/locale.pages.inc b/core/modules/locale/locale.pages.inc index d58d955..c1b61c6 100644 --- a/core/modules/locale/locale.pages.inc +++ b/core/modules/locale/locale.pages.inc @@ -80,10 +80,10 @@ function template_preprocess_locale_translation_update_info(array &$variables) { if ($variables['not_found']) { foreach ($variables['not_found'] as $update) { $version = $update['version'] ? $update['version'] : t('no version'); - $releases[] = SafeMarkup::format('@module (@version). !info', array( + $releases[] = SafeMarkup::format('@module (@version). @info', array( '@module' => $update['name'], '@version' => $version, - '!info' => $update['info'], + '@info' => $update['info'], )); } } 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 bda7eec..ad49550 100644 --- a/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateInterfaceTest.php @@ -87,7 +87,7 @@ public function testInterface() { $this->assertRaw(t('Missing translations for: @languages. See the Available translation updates page for more information.', array('@languages' => t('German'), '@updates' => \Drupal::url('locale.translate_status'))), 'Missing translations message'); $this->drupalGet('admin/reports/translations'); $this->assertText(t('Missing translations for one project'), 'No translations found'); - $this->assertText(SafeMarkup::format('@module (@version). !info', array('@module' => 'Locale test translate', '@version' => '1.3-dev', '!info' => t('No translation files are provided for development releases.'))), 'Release details'); + $this->assertText(SafeMarkup::format('@module (@version). @info', array('@module' => 'Locale test translate', '@version' => '1.3-dev', '@info' => t('No translation files are provided for development releases.'))), 'Release details'); $this->assertText(t('No translation files are provided for development releases.'), 'Release info'); // Override Drupal core translation status as 'no translations found'. @@ -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('About') . '

'; $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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing menus') . '
'; - $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('help.page', array('name' => 'block')) : '#', '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; + $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('@block_help' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('help.page', array('name' => 'block')) : '#', '@menu' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '
' . t('Displaying menus') . '
'; - $output .= '
' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the Block layout page. In some themes, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the theme\'s settings page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!themes' => \Drupal::url('system.themes_page'), '!theme_settings' => \Drupal::url('system.theme_settings'))) . '
'; + $output .= '
' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the Block layout page. In some themes, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the theme\'s settings page.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '@themes' => \Drupal::url('system.themes_page'), '@theme_settings' => \Drupal::url('system.theme_settings'))) . '
'; $output .= '
'; return $output; } if ($route_name == 'entity.menu.add_form' && \Drupal::moduleHandler()->moduleExists('block') && \Drupal::currentUser()->hasPermission('administer blocks')) { - return '

' . 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/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php index 34dacc5..f156a80 100644 --- a/core/modules/menu_ui/src/Tests/MenuTest.php +++ b/core/modules/menu_ui/src/Tests/MenuTest.php @@ -195,8 +195,8 @@ function addCustomMenu() { // Verify that using a menu_name that is too long results in a validation // message. - $this->assertRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( - '!name' => t('Menu name'), + $this->assertRaw(t('@name cannot be longer than %max characters but is currently %length characters long.', array( + '@name' => t('Menu name'), '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, '%length' => Unicode::strlen($menu_name), ))); @@ -207,8 +207,8 @@ function addCustomMenu() { $this->drupalPostForm('admin/structure/menu/add', $edit, t('Save')); // Verify that no validation error is given for menu_name length. - $this->assertNoRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array( - '!name' => t('Menu name'), + $this->assertNoRaw(t('@name cannot be longer than %max characters but is currently %length characters long.', array( + '@name' => t('Menu name'), '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, '%length' => Unicode::strlen($menu_name), ))); @@ -609,7 +609,7 @@ function addMenuLink($parent = '', $path = '/', $menu_name = 'tools', $expanded $this->drupalGet("admin/structure/menu/manage/$menu_name/add"); $this->assertResponse(200); - $title = '!link_' . $this->randomMachineName(16); + $title = '@link_' . $this->randomMachineName(16); $edit = array( 'link[0][uri]' => $path, 'title[0][value]' => $title, 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 = '

' . t('About') . '

'; $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 78df532..810e6c6 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; @@ -227,7 +227,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'); return MigrationInterface::RESULT_FAILED; } @@ -296,8 +296,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'); return MigrationInterface::RESULT_FAILED; } } @@ -405,7 +405,7 @@ public function saveQueuedMessages() { */ protected function handleException(\Exception $exception, $save = TRUE) { $result = Error::decodeException($exception); - $message = $result['!message'] . ' (' . $result['%file'] . ':' . $result['%line'] . ')'; + $message = $result['@message'] . ' (' . $result['%file'] . ':' . $result['%line'] . ')'; if ($save) { $this->saveMessage($message); } @@ -438,10 +438,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; @@ -449,19 +449,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 7cdf45f..d6c39e4 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_drupal/migrate_drupal.module b/core/modules/migrate_drupal/migrate_drupal.module index fd4ccbc..c7bb96f 100644 --- a/core/modules/migrate_drupal/migrate_drupal.module +++ b/core/modules/migrate_drupal/migrate_drupal.module @@ -25,7 +25,7 @@ function migrate_drupal_help($route_name, RouteMatchInterface $route_match) { case 'help.page.migrate_drupal': $output = ''; $output .= '

' . t('About') . '

'; - $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..8c0cd89 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -82,19 +82,23 @@ function node_help($route_name, RouteMatchInterface $route_match) { case 'help.page.node': $output = ''; $output .= '

' . t('About') . '

'; - $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 .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating content') . '
'; - $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('!content-type' => \Drupal::url('entity.node_type.collection'))) . '
'; + $output .= '
' . t('When new content is created, the Node module records basic information about the content, including the author, date of creation, and the Content type. It also manages the publishing options, which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Default settings can be configured for each type of content on your site.', array('@content-type' => \Drupal::url('entity.node_type.collection'))) . '
'; $output .= '
' . t('Creating custom content types') . '
'; - $output .= '
' . t('The Node module gives users with the Administer content types permission the ability to create new content types in addition to the default ones already configured. Creating custom content types gives you the flexibility to add fields and configure default settings that suit the differing needs of various site content.', array('!content-new' => \Drupal::url('node.type_add'), '!field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '
' . t('The Node module gives users with the Administer content types permission the ability to create new content types in addition to the default ones already configured. Creating custom content types gives you the flexibility to add fields and configure default settings that suit the differing needs of various site content.', array('@content-new' => \Drupal::url('node.type_add'), '@field' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
' . t('Administering content') . '
'; - $output .= '
' . t('The Content page lists your content, allowing you add new content, filter, edit or delete existing content, or perform bulk operations on existing content.', array('!content' => \Drupal::url('system.admin_content'))) . '
'; + $output .= '
' . t('The Content page lists your content, allowing you add new content, filter, edit or delete existing content, or perform bulk operations on existing content.', array('@content' => \Drupal::url('system.admin_content'))) . '
'; $output .= '
' . t('Creating revisions') . '
'; $output .= '
' . t('The Node module also enables you to create multiple versions of any content, and revert to older versions using the Revision information settings.') . '
'; $output .= '
' . t('User permissions') . '
'; - $output .= '
' . t('The Node module makes a number of permissions available for each content type, which can be set by role on the permissions page.', array('!permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-node')))) . '
'; + $output .= '
' . t('The Node module makes a number of permissions available for each content type, which can be set by role on the permissions page.', array('@ +@ +@permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-node')))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/node/src/Tests/NodeCreationTest.php b/core/modules/node/src/Tests/NodeCreationTest.php index 5e8faaf..abe7ba7 100644 --- a/core/modules/node/src/Tests/NodeCreationTest.php +++ b/core/modules/node/src/Tests/NodeCreationTest.php @@ -52,7 +52,7 @@ function testNodeCreation() { $this->drupalPostForm('node/add/page', $edit, t('Save')); // Check that the Basic page has been created. - $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.'); + $this->assertRaw(t('@post %title has been created.', array('@post' => 'Basic page', '%title' => $edit['title[0][value]'])), 'Basic page created.'); // Check that the node exists in the database. $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); @@ -141,7 +141,7 @@ function testUnpublishedNodeCreation() { $this->assertText(t('Test page text')); // Confirm that the node was created. - $this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit['title[0][value]']))); + $this->assertRaw(t('@post %title has been created.', array('@post' => 'Basic page', '%title' => $edit['title[0][value]']))); } /** @@ -203,7 +203,7 @@ protected static function getWatchdogIdsForTestExceptionRollback() { $query = db_query("SELECT wid, variables FROM {watchdog}"); foreach ($query as $row) { $variables = (array) unserialize($row->variables); - if (isset($variables['!message']) && $variables['!message'] === 'Test exception for rollback.') { + if (isset($variables['@message']) && $variables['@message'] === 'Test exception for rollback.') { $matches[] = $row->wid; } } diff --git a/core/modules/node/src/Tests/NodeRSSContentTest.php b/core/modules/node/src/Tests/NodeRSSContentTest.php index 4b63eea..144e36e 100644 --- a/core/modules/node/src/Tests/NodeRSSContentTest.php +++ b/core/modules/node/src/Tests/NodeRSSContentTest.php @@ -45,16 +45,16 @@ function testNodeRSSContent() { $this->drupalGet('rss.xml'); // Check that content added in 'rss' view mode appear in RSS feed. - $rss_only_content = t('Extra data that should appear only in the RSS feed for node !nid.', array('!nid' => $node->id())); + $rss_only_content = t('Extra data that should appear only in the RSS feed for node @nid.', array('@nid' => $node->id())); $this->assertText($rss_only_content, 'Node content designated for RSS appear in RSS feed.'); // Check that content added in view modes other than 'rss' doesn't // appear in RSS feed. - $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node !nid.', array('!nid' => $node->id())); + $non_rss_content = t('Extra data that should appear everywhere except the RSS feed for node @nid.', array('@nid' => $node->id())); $this->assertNoText($non_rss_content, 'Node content not designed for RSS does not appear in RSS feed.'); // Check that extra RSS elements and namespaces are added to RSS feed. - $test_element = '' . t('Value of testElement RSS element for node !nid.', array('!nid' => $node->id())) . ''; + $test_element = '' . t('Value of testElement RSS element for node @nid.', array('@nid' => $node->id())) . ''; $test_ns = 'xmlns:drupaltest="http://example.com/test-namespace"'; $this->assertRaw($test_element, 'Extra RSS elements appear in RSS feed.'); $this->assertRaw($test_ns, 'Extra namespaces appear in RSS feed.'); diff --git a/core/modules/node/src/Tests/NodeRevisionsUiTest.php b/core/modules/node/src/Tests/NodeRevisionsUiTest.php index adc49bf..1112847 100644 --- a/core/modules/node/src/Tests/NodeRevisionsUiTest.php +++ b/core/modules/node/src/Tests/NodeRevisionsUiTest.php @@ -119,17 +119,17 @@ public function testNodeRevisionDoubleEscapeFix() { // Assert the old revision message. $date = format_date($nodes[0]->revision_timestamp->value, 'short'); $url = new Url('entity.node.revision', ['node' => $nodes[0]->id(), 'node_revision' => $nodes[0]->getRevisionId()]); - $old_revision_message = t('!date by !username', [ - '!date' => \Drupal::l($date, $url), - '!username' => $editor, + $old_revision_message = t('@date by @username', [ + '@date' => \Drupal::l($date, $url), + '@username' => $editor, ]); $this->assertRaw($old_revision_message); // Assert the current revision message. $date = format_date($nodes[1]->revision_timestamp->value, 'short'); - $current_revision_message = t('!date by !username', [ - '!date' => $nodes[1]->link($date), - '!username' => $editor, + $current_revision_message = t('@date by @username', [ + '@date' => $nodes[1]->link($date), + '@username' => $editor, ]); $current_revision_message .= '

' . $revision_log . '

'; $this->assertRaw($current_revision_message); diff --git a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php index af29bce..75e4f0d 100644 --- a/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php +++ b/core/modules/node/src/Tests/NodeTypeRenameConfigImportTest.php @@ -104,7 +104,7 @@ public function testConfigurationRename() { $this->drupalGet('admin/config/development/configuration'); foreach ($expected as $rename) { $names = $this->configImporter()->getStorageComparer()->extractRenameNames($rename); - $this->assertText(SafeMarkup::format('!source_name to !target_name', array('!source_name' => $names['old_name'], '!target_name' => $names['new_name']))); + $this->assertText(SafeMarkup::format('@source_name to @target_name', array('@source_name' => $names['old_name'], '@target_name' => $names['new_name']))); // Test that the diff link is present for each renamed item. $href = \Drupal::urlGenerator()->getPathFromRoute('config.diff', array('source_name' => $names['old_name'], 'target_name' => $names['new_name'])); $this->assertLinkByHref($href); diff --git a/core/modules/node/src/Tests/PageEditTest.php b/core/modules/node/src/Tests/PageEditTest.php index 9082dca..7cd6960 100644 --- a/core/modules/node/src/Tests/PageEditTest.php +++ b/core/modules/node/src/Tests/PageEditTest.php @@ -46,8 +46,7 @@ function testPageEdit() { $this->assertUrl($node->url('edit-form', ['absolute' => TRUE])); // Check that the title and body fields are displayed with the correct values. - $active = '' . t('(active tab)') . ''; - $link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active)); + $link_text = t('Edit(active tab)'); $this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.'); $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); diff --git a/core/modules/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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying list fields') . '
'; - $output .= '
' . t('The settings and the display of the list fields can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the list fields can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Defining option keys and labels') . '
'; $output .= '
' . t('When you define the list options you can define a key and a label for each option in the list. The label will be shown to the users while the key gets stored in the database.') . '
'; $output .= '
' . t('Choosing list field type') . '
'; diff --git a/core/modules/options/src/Tests/OptionsFieldUITest.php b/core/modules/options/src/Tests/OptionsFieldUITest.php index c0ab0df..d4219c6 100644 --- a/core/modules/options/src/Tests/OptionsFieldUITest.php +++ b/core/modules/options/src/Tests/OptionsFieldUITest.php @@ -326,7 +326,7 @@ function testNodeDisplay() { ); $this->drupalPostForm($this->adminPath, $edit, t('Save field settings')); - $this->assertText(format_string('Updated field !field_name field settings.', array('!field_name' => $this->fieldName)), "The 'On' and 'Off' form fields work for boolean fields."); + $this->assertText(format_string('Updated field @field_name field settings.', array('@field_name' => $this->fieldName)), "The 'On' and 'Off' form fields work for boolean fields."); // Select a default value. $edit = array( diff --git a/core/modules/options/src/Tests/OptionsWidgetsTest.php b/core/modules/options/src/Tests/OptionsWidgetsTest.php index 6bd4714..f1d2ca3 100644 --- a/core/modules/options/src/Tests/OptionsWidgetsTest.php +++ b/core/modules/options/src/Tests/OptionsWidgetsTest.php @@ -269,7 +269,7 @@ function testSelectListSingle() { // Submit form: select invalid 'none' option. $edit = array('card_1' => '_none'); $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertRaw(t('!title field is required.', array('!title' => $field->getName())), 'Cannot save a required field when selecting "none" from the select list.'); + $this->assertRaw(t('@title field is required.', array('@title' => $field->getName())), 'Cannot save a required field when selecting "none" from the select list.'); // Submit form: select first option. $edit = array('card_1' => 0); diff --git a/core/modules/page_cache/page_cache.module b/core/modules/page_cache/page_cache.module index f4eb71b..59d04a4 100644 --- a/core/modules/page_cache/page_cache.module +++ b/core/modules/page_cache/page_cache.module @@ -16,14 +16,14 @@ function page_cache_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.page_cache': $output = '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Speeding up your site') . '
'; $output .= '
' . t('Pages requested by anonymous users are stored the first time they are requested and then are reused. Depending on your site configuration and the amount of your web traffic tied to anonymous visitors, the caching system may significantly increase the speed of your site.') . '
'; $output .= '
' . t('Pages are usually identical for all anonymous users, while they can be customized for each authenticated user. This is why pages can be cached for anonymous users, whereas they will have to be rebuilt for every authenticated user.') . '
'; $output .= '
' . t('Configuring the internal page cache') . '
'; - $output .= '
' . t('On the Performance page, you can configure how long browsers and proxies may cache pages; that setting is also respected by the Internal Page Cache module. There is no other configuration.', array('!cache-settings' => \Drupal::url('system.performance_settings'))) . '
'; + $output .= '
' . t('On the Performance page, you can configure how long browsers and proxies may cache pages; that setting is also respected by the Internal Page Cache module. There is no other configuration.', array('@cache-settings' => \Drupal::url('system.performance_settings'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/path/path.module b/core/modules/path/path.module index a9bd9b0..62ddc47 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -20,13 +20,17 @@ function path_help($route_name, RouteMatchInterface $route_match) { case 'help.page.path': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating aliases') . '
'; - $output .= '
' . t('If you create or edit a taxonomy term you can add an alias (for example music/jazz) in the field "URL alias". When creating or editing content you can add an alias (for example about-us/team) under the section "URL path settings" in the field "URL alias". Aliases for any other path can be added through the page URL aliases. To add aliases a user needs the permission Create and edit URL aliases.', array('!aliases' => \Drupal::url('path.admin_overview'), '!permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-path')))) . '
'; + $output .= '
' . t('If you create or edit a taxonomy term you can add an alias (for example music/jazz) in the field "URL alias". When creating or editing content you can add an alias (for example about-us/team) under the section "URL path settings" in the field "URL alias". Aliases for any other path can be added through the page URL aliases. To add aliases a user needs the permission Create and edit URL aliases.', array('@aliases' => \Drupal::url('path.admin_overview'), '@ +@ +@permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-path')))) . '
'; $output .= '
' . t('Managing aliases') . '
'; - $output .= '
' . t('The Path module provides a way to search and view a list of all aliases that are in use on your website. Aliases can be added, edited and deleted through this list.', array('!aliases' => \Drupal::url('path.admin_overview'))) . '
'; + $output .= '
' . t('The Path module provides a way to search and view a list of all aliases that are in use on your website. Aliases can be added, edited and deleted through this list.', array('@aliases' => \Drupal::url('path.admin_overview'))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module index b68517d..d5c235f 100644 --- a/core/modules/quickedit/quickedit.module +++ b/core/modules/quickedit/quickedit.module @@ -22,12 +22,12 @@ function quickedit_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.quickedit': $output = '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Editing content in-place') . '
'; $output .= '
'; - $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 .= '
'; $output .= '
'; diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index 1beb1a1..08b2044 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -17,7 +17,7 @@ function rdf_help($route_name, RouteMatchInterface $route_match) { case 'help.page.rdf': $output = ''; $output .= '

' . t('About') . '

'; - $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 6d2559a..b5ef24f 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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Defining responsive image styles') . '
'; - $output .= '
' . t('By creating responsive image styles you define which options the browser has in selecting which image file to display. In most cases this means providing different image sizes based on the viewport size. On the Responsive image styles page, click Add responsive image style to create a new style. First choose a label, a fallback image style and a breakpoint group and click Save.', array('!responsive_image_style' => \Drupal::url('entity.responsive_image_style.collection'))) . '
'; + $output .= '
' . t('By creating responsive image styles you define which options the browser has in selecting which image file to display. In most cases this means providing different image sizes based on the viewport size. On the Responsive image styles page, click Add responsive image style to create a new style. First choose a label, a fallback image style and a breakpoint group and click Save.', array('@responsive_image_style' => \Drupal::url('entity.responsive_image_style.collection'))) . '
'; $output .= '
'; $output .= '
' . t('Fallback image style') . '
'; $output .= '
' . t('The fallback image style is typically the smallest size image you expect to appear in this space. Because the responsive images module uses the Picturefill library so that responsive images can work in older browsers, the fallback image should only appear on a site if an error occurs.)
'); $output .= '
' . t('Breakpoint groups: viewport sizing vs art direction') . '
'; - $output .= '
' . t('The breakpoint group typically only needs a single breakpoint with an empty media query in order to do viewport sizing. Multiple breakpoints are used for changing the crop or aspect ratio of images at different viewport sizes, which is often referred to as art direction. Once you select a breakpoint group, you can choose which breakpoints to use for the responsive image style. By default, the option do not use this breakpoint is selected for each breakpoint. See the help page of the Breakpoint module for more information.', array('!breakpoint_help' => \Drupal::url('help.page', array('name' => 'breakpoint')))) . '
'; + $output .= '
' . t('The breakpoint group typically only needs a single breakpoint with an empty media query in order to do viewport sizing. Multiple breakpoints are used for changing the crop or aspect ratio of images at different viewport sizes, which is often referred to as art direction. Once you select a breakpoint group, you can choose which breakpoints to use for the responsive image style. By default, the option do not use this breakpoint is selected for each breakpoint. See the help page of the Breakpoint module for more information.', array('@breakpoint_help' => \Drupal::url('help.page', array('name' => 'breakpoint')))) . '
'; $output .= '
' . t('Breakpoint settings: sizes vs image styles') . '
'; $output .= '
' . t('While you have the option to provide only image style per breakpoint, the sizes option allows you to provide more options to browsers as to which image file it can display, even when using multiple breakpoints for art direction. Breakpoints are defined in the configuration files of the theme.
'); $output .= '
' . t('Sizes field') . '
'; $output .= '
' . t('Once the sizes option is selected, you can let the browser know the size of this image in relation to the site layout, using the Sizes field. For a hero image that always fills the entire screen, you could simply enter 100vw, which means 100% of the viewport width. For an image that fills 90% of the screen for small viewports, but only fills 40% of the screen when the viewport is larger than 40em (typically 640px), you could enter "(min-width: 40em) 40vw, 90vw" in the Sizes field. The last item in the comma-separated list is the smallest viewport size: other items in the comma-separated list should have a media condition paired with an image width. Media conditions are similar to a media query, often a min-width paired with a viewport width using em or px units: e.g. (min-width: 640px) or (min-width: 40em). This is paired with the image width at that viewport size using px, em or vw units. The vw unit is viewport width and is used instead of a percentage because the percentage always refers to the width of the entire viewport.
'); $output .= '
' . t('Image styles for sizes') . '
'; - $output .= '
' . t('Below the Sizes field you can choose multiple image styles so the browser can choose the best image file size to fill the space defined in the Sizes field. Typically you will want to use image styles that resize your image to have options that range from the smallest px width possible for the space the image will appear in to the largest px width possible, with a variety of widths in between. You may want to provide image styles with widths that are 1.5x to 2x the space available in the layout to account for high resolution screens. Image styles can be defined on the Image styles page that is provided by the Image module.', array('!image_styles' => \Drupal::url('entity.image_style.collection'), '!image_help' => \Drupal::url('help.page', array('name' => 'image')))) . '
'; + $output .= '
' . t('Below the Sizes field you can choose multiple image styles so the browser can choose the best image file size to fill the space defined in the Sizes field. Typically you will want to use image styles that resize your image to have options that range from the smallest px width possible for the space the image will appear in to the largest px width possible, with a variety of widths in between. You may want to provide image styles with widths that are 1.5x to 2x the space available in the layout to account for high resolution screens. Image styles can be defined on the Image styles page that is provided by the Image module.', array('@image_styles' => \Drupal::url('entity.image_style.collection'), '@image_help' => \Drupal::url('help.page', array('name' => 'image')))) . '
'; $output .= '
'; $output .= '
' . t('Using responsive image styles in Image fields') . '
'; - $output .= '
' . t('After defining responsive image styles, you can use them in the display settings for your Image fields, so that the site displays responsive images using the HTML5 picture tag. Open the Manage display page for the entity type (content type, taxonomy vocabulary, etc.) that the Image field is attached to. Choose the format Responsive image, click the Edit icon, and select one of the responsive image styles that you have created. For general information on how to manage fields and their display see the Field UI module help page. For background information about entities and fields see the Field module help page.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '!field_help' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; + $output .= '
' . t('After defining responsive image styles, you can use them in the display settings for your Image fields, so that the site displays responsive images using the HTML5 picture tag. Open the Manage display page for the entity type (content type, taxonomy vocabulary, etc.) that the Image field is attached to. Choose the format Responsive image, click the Edit icon, and select one of the responsive image styles that you have created. For general information on how to manage fields and their display see the Field UI module help page. For background information about entities and fields see the Field module help page.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#', '@field_help' => \Drupal::url('help.page', array('name' => 'field')))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php index ea14f53..992f00b 100644 --- a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php @@ -118,7 +118,7 @@ public function form(array $form, FormStateInterface $form_state) { ); $image_style_mapping = $responsive_image_style->getImageStyleMapping($breakpoint_id, $multiplier); if (\Drupal::moduleHandler()->moduleExists('help')) { - $description = $this->t('See the Responsive Image help page for information on the sizes attribute.', array('!responsive_image_help' => (\Drupal::url('help.page', array('name' => 'responsive_image'))))); + $description = $this->t('See the Responsive Image help page for information on the sizes attribute.', array('@responsive_image_help' => (\Drupal::url('help.page', array('name' => 'responsive_image'))))); } else { $description = $this->t('Enable the Help module for more information on the sizes attribute.'); diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module index 76823ef..46822d9 100644 --- a/core/modules/rest/rest.module +++ b/core/modules/rest/rest.module @@ -15,13 +15,13 @@ function rest_help($route_name, RouteMatchInterface $route_match) { case 'help.page.rest': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Installing supporting modules') . '
'; - $output .= '
' . t('In order to use REST on a web site, you need to install modules that provide serialization and authentication services. You can use the Core module HAL for serialization and HTTP Basic Authentication for authentication, or install a contributed or custom module.', array('!hal' => (\Drupal::moduleHandler()->moduleExists('hal')) ? \Drupal::url('help.page', array('name' => 'hal')) : '#', '!basic_auth' => (\Drupal::moduleHandler()->moduleExists('basic_auth')) ? \Drupal::url('help.page', array('name' => 'basic_auth')) : '#')) . '
'; + $output .= '
' . t('In order to use REST on a web site, you need to install modules that provide serialization and authentication services. You can use the Core module HAL for serialization and HTTP Basic Authentication for authentication, or install a contributed or custom module.', array('@hal' => (\Drupal::moduleHandler()->moduleExists('hal')) ? \Drupal::url('help.page', array('name' => 'hal')) : '#', '@basic_auth' => (\Drupal::moduleHandler()->moduleExists('basic_auth')) ? \Drupal::url('help.page', array('name' => 'basic_auth')) : '#')) . '
'; $output .= '
' . t('Enabling REST support for an entity type') . '
'; - $output .= '
' . t('REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. To enable support, you can use a process based on configuration editing or the contributed Rest UI module.', array('!config' => 'https://www.drupal.org/documentation/modules/rest', '!restui' => 'https://www.drupal.org/project/restui')) . '
'; + $output .= '
' . t('REST support for content items of the Node module is enabled by default, and support for other types of content entities can be enabled. To enable support, you can use a process based on configuration editing or the contributed Rest UI module.', array('@config' => 'https://www.drupal.org/documentation/modules/rest', '@restui' => 'https://www.drupal.org/project/restui')) . '
'; $output .= '
' . t('You will also need to grant anonymous users permission to perform each of the REST operations you want to be available, and set up authentication properly to authorize web requests.') . '
'; $output .= '
'; return $output; diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 25d52b5..5eb47d5 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -75,25 +75,25 @@ function search_help($route_name, RouteMatchInterface $route_match) { case 'help.page.search': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Configuring search pages') . '
'; - $output .= '
' . t('To configure search pages, visit the Search pages page. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with search, and each will appear as a tab or local task link on the search page; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', array('!search-settings' => \Drupal::url('entity.search_page.collection'), '!search-url' => \Drupal::url('search.view'))) . '
'; + $output .= '
' . t('To configure search pages, visit the Search pages page. In the Search pages section, you can add a new search page, edit the configuration of existing search pages, enable and disable search pages, and choose the default search page. Each enabled search page has a URL path starting with search, and each will appear as a tab or local task link on the search page; you can configure the text that is shown in the tab. In addition, some search page plugins have additional settings that you can configure for each search page.', array('@search-settings' => \Drupal::url('entity.search_page.collection'), '@search-url' => \Drupal::url('search.view'))) . '
'; $output .= '
' . t('Managing the search index') . '
'; - $output .= '
' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during cron runs, so it requires a cron maintenance task to be set up. There are also several settings affecting indexing that can be configured on the Search pages page: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', array('!cron' => \Drupal::url('system.cron_settings'), '!search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; - $output .= '
' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search pages page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('!search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; + $output .= '
' . t('Some search page plugins, such as the core Content search page, index searchable text using the Drupal core search index, and will not work unless content is indexed. Indexing is done during cron runs, so it requires a cron maintenance task to be set up. There are also several settings affecting indexing that can be configured on the Search pages page: the number of items to index per cron run, the minimum word length to index, and how to handle Chinese, Japanese, and Korean characters.', array('@cron' => \Drupal::url('system.cron_settings'), '@search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; + $output .= '
' . t('Modules providing search page plugins generally ensure that content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. However, there are some actions related to the structure of your site that do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search pages page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('@search-settings' => \Drupal::url('entity.search_page.collection'))) . '
'; $output .= '
' . t('Displaying the Search block') . '
'; - $output .= '
' . t('The Search module includes a block, which can be enabled and configured on the Block layout page, if you have the Block module enabled; the default block title is Search, and it is the Search form block in the Forms category, if you wish to add another instance. The block is available to users with the Use search permission, and it performs a search using the configured default search page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!search_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-search')))) . '
'; + $output .= '
' . t('The Search module includes a block, which can be enabled and configured on the Block layout page, if you have the Block module enabled; the default block title is Search, and it is the Search form block in the Forms category, if you wish to add another instance. The block is available to users with the Use search permission, and it performs a search using the configured default search page.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '@search_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-search')))) . '
'; $output .= '
' . t('Searching your site') . '
'; - $output .= '
' . t('Users with Use search permission can use the Search block and Search page. Users with the View published content permission can use configured search pages of type Content to search for content containing exact keywords; in addition, users with Use advanced search permission can use more complex search filtering. Users with the View user information permission can use configured search pages of type Users to search for active users containing the keyword anywhere in the username, and users with the Administer users permission can search for active and blocked users, by email address or username keyword.', array('!search' => \Drupal::url('search.view'), '!search_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-search')), '!node_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-node')), '!user_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-user')))) . '
'; + $output .= '
' . t('Users with Use search permission can use the Search block and Search page. Users with the View published content permission can use configured search pages of type Content to search for content containing exact keywords; in addition, users with Use advanced search permission can use more complex search filtering. Users with the View user information permission can use configured search pages of type Users to search for active users containing the keyword anywhere in the username, and users with the Administer users permission can search for active and blocked users, by email address or username keyword.', array('@search' => \Drupal::url('search.view'), '@search_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-search')), '@node_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-node')), '@user_permission' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-user')))) . '
'; $output .= '
' . t('Extending the Search module') . '
'; - $output .= '
' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as Porter Stemmer for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as Apache Solr or Sphinx. There are also contributed modules that provide additional search pages. These and other search-related contributed modules can be downloaded by visiting Drupal.org.', array('!contrib-search' => 'https://www.drupal.org/project/project_module?f[2]=im_vid_3%3A105', '!porterstemmer_url' => 'https://www.drupal.org/project/porterstemmer', '!solr_url' => 'https://www.drupal.org/project/apachesolr', '!sphinx_url' => 'https://www.drupal.org/project/sphinx')) . '
'; + $output .= '
' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as Porter Stemmer for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as Apache Solr or Sphinx. There are also contributed modules that provide additional search pages. These and other search-related contributed modules can be downloaded by visiting Drupal.org.', array('@contrib-search' => 'https://www.drupal.org/project/project_module?f[2]=im_vid_3%3A105', '@porterstemmer_url' => 'https://www.drupal.org/project/porterstemmer', '@solr_url' => 'https://www.drupal.org/project/apachesolr', '@sphinx_url' => 'https://www.drupal.org/project/sphinx')) . '
'; $output .= '
'; return $output; case 'entity.search_page.collection': - 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'))) . '

'; + 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'))) . '

'; } } @@ -760,7 +760,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 = SafeMarkup::checkPlain($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('About') . '

'; - $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('Uses') . '

'; $output .= '
' . t('Administering shortcuts') . '
'; - $output .= '
' . t('Users with the Administer shortcuts permission can manage shortcut sets and edit the shortcuts within sets from the Shortcuts administration page.', array('!shortcuts' => \Drupal::url('entity.shortcut_set.collection'))) . '
'; + $output .= '
' . t('Users with the Administer shortcuts permission can manage shortcut sets and edit the shortcuts within sets from the Shortcuts administration page.', array('@shortcuts' => \Drupal::url('entity.shortcut_set.collection'))) . '
'; $output .= '
' . t('Choosing shortcut sets') . '
'; $output .= '
' . t('Users with permission to switch shortcut sets can choose a shortcut set to use from the Shortcuts tab of their user account page.') . '
'; $output .= '
' . t('Adding and removing shortcuts') . '
'; $output .= '
' . t('The Shortcut module creates an add/remove link for each page on your site; the link lets you add or remove the current page from the currently-enabled set of shortcuts (if your theme displays it and you have permission to edit your shortcut set). The core Seven administration theme displays this link next to the page title, as a grey or yellow star. If you click on the grey star, you will add that page to your preferred set of shortcuts. If the page is already part of your shortcut set, the link will be a yellow star, and will allow you to remove the current page from your shortcut set.') . '
'; $output .= '
' . t('Displaying shortcuts') . '
'; - $output .= '
' . t('You can display your shortcuts by enabling the Shortcuts block on the Blocks administration page. Certain administrative modules also display your shortcuts; for example, the core Toolbar module provides a corresponding menu item.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!toolbar-help' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
'; + $output .= '
' . t('You can display your shortcuts by enabling the Shortcuts block on the Blocks administration page. Certain administrative modules also display your shortcuts; for example, the core Toolbar module provides a corresponding menu item.', array('@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '@toolbar-help' => (\Drupal::moduleHandler()->moduleExists('toolbar')) ? \Drupal::url('help.page', array('name' => 'toolbar')) : '#')) . '
'; $output .= '
'; return $output; diff --git a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php index 7511205..0b5429a 100644 --- a/core/modules/shortcut/src/Tests/ShortcutSetsTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutSetsTest.php @@ -133,8 +133,8 @@ function testShortcutSetSwitchCreate() { function testShortcutSetSwitchNoSetName() { $edit = array('set' => 'new'); $this->drupalPostForm('user/' . $this->adminUser->id() . '/shortcuts', $edit, t('Change set')); - $this->assertRaw(\Drupal::translation()->formatPlural(1, '1 error has been found: !errors', '@count errors have been found: !errors', [ - '!errors' => SafeMarkup::set('Label') + $this->assertRaw(\Drupal::translation()->formatPlural(1, '1 error has been found: @errors', '@count errors have been found: @errors', [ + '@errors' => SafeMarkup::set('Label') ])); $current_set = shortcut_current_displayed_set($this->adminUser); $this->assertEqual($current_set->id(), $this->set->id(), 'Attempting to switch to a new shortcut set without providing a set name does not succeed.'); diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 52243c8..cad0d47 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -22,11 +22,11 @@ function simpletest_help($route_name, RouteMatchInterface $route_match) { case 'help.page.simpletest': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Running tests') . '
'; - $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.') . '

'; $output .= '
'; return $output; diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php index aa5ed49..bdf5b39 100644 --- a/core/modules/simpletest/src/TestBase.php +++ b/core/modules/simpletest/src/TestBase.php @@ -760,9 +760,9 @@ protected function assertNotIdentical($first, $second, $message = '', $group = ' * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertIdenticalObject($object1, $object2, $message = '', $group = 'Other') { - $message = $message ?: SafeMarkup::format('!object1 is identical to !object2', array( - '!object1' => var_export($object1, TRUE), - '!object2' => var_export($object2, TRUE), + $message = $message ?: SafeMarkup::format('@object1 is identical to @object2', array( + '@object1' => var_export($object1, TRUE), + '@object2' => var_export($object2, TRUE), )); $identical = TRUE; foreach ($object1 as $key => $value) { @@ -1395,8 +1395,8 @@ protected function exceptionHandler($exception) { // message through \Drupal\Component\Utility\SafeMarkup::checkPlain(). $decoded_exception = Error::decodeException($exception); unset($decoded_exception['backtrace']); - $message = SafeMarkup::format('%type: !message in %function (line %line of %file).
!backtrace
', $decoded_exception + array( - '!backtrace' => Error::formatBacktrace($verbose_backtrace), + $message = SafeMarkup::format('%type: @message in %function (line %line of %file).
@backtrace
', $decoded_exception + array( + '@backtrace' => Error::formatBacktrace($verbose_backtrace), )); $this->error($message, 'Uncaught exception', Error::getLastCaller($backtrace)); } diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 30aa69e..30a9436 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -1384,12 +1384,12 @@ protected function curlExec($curl_options, $redirect = FALSE) { $this->url = isset($original_url) ? $original_url : curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL); $message_vars = array( - '!method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), + '@method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '@url' => isset($original_url) ? $original_url : $url, '@status' => $status, - '!length' => format_size(strlen($this->getRawContent())) + '@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(); } @@ -2675,7 +2675,7 @@ protected function assertUrl($path, array $options = array(), $message = '', $gr protected function assertResponse($code, $message = '', $group = 'Browser') { $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE); $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code; - return $this->assertTrue($match, $message ? $message : SafeMarkup::format('HTTP response expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), $group); + return $this->assertTrue($match, $message ? $message : SafeMarkup::format('HTTP response expected @code, actual @curl_code', array('@code' => $code, '@curl_code' => $curl_code)), $group); } /** @@ -2700,7 +2700,7 @@ protected function assertResponse($code, $message = '', $group = 'Browser') { protected function assertNoResponse($code, $message = '', $group = 'Browser') { $curl_code = curl_getinfo($this->curlHandle, CURLINFO_HTTP_CODE); $match = is_array($code) ? in_array($curl_code, $code) : $curl_code == $code; - return $this->assertFalse($match, $message ? $message : SafeMarkup::format('HTTP response not expected !code, actual !curl_code', array('!code' => $code, '!curl_code' => $curl_code)), $group); + return $this->assertFalse($match, $message ? $message : SafeMarkup::format('HTTP response not expected @code, actual @curl_code', array('@code' => $code, '@curl_code' => $curl_code)), $group); } /** diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 9b3be36..9892ccc 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -19,13 +19,17 @@ function statistics_help($route_name, RouteMatchInterface $route_match) { case 'help.page.statistics': $output = ''; $output .= '

' . t('About') . '

'; - $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 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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Displaying popular content') . '
'; - $output .= '
' . t('The module includes a Popular content block that displays the most viewed pages today and for all time, and the last content viewed. To use the block, enable Count content views on the Statistics page, and then you can enable and configure the block on the Block layout page.', array('!statistics-settings' => \Drupal::url('statistics.settings'), '!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; + $output .= '
' . t('The module includes a Popular content block that displays the most viewed pages today and for all time, and the last content viewed. To use the block, enable Count content views on the Statistics page, and then you can enable and configure the block on the Block layout page.', array('@statistics-settings' => \Drupal::url('statistics.settings'), '@blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '
'; $output .= '
' . t('Page view counter') . '
'; - $output .= '
' . t('The Statistics module includes a counter for each page that increases whenever the page is viewed. To use the counter, enable Count content views on the Statistics page, and set the necessary permissions (View content hits) so that the counter is visible to the users.', array('!statistics-settings' => \Drupal::url('statistics.settings'), '!permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-statistics')))) . '
'; + $output .= '
' . t('The Statistics module includes a counter for each page that increases whenever the page is viewed. To use the counter, enable Count content views on the Statistics page, and set the necessary permissions (View content hits) so that the counter is visible to the users.', array('@statistics-settings' => \Drupal::url('statistics.settings'), '@ +@ +@permissions' => \Drupal::url('user.admin_permissions', array(), array('fragment' => 'module-statistics')))) . '
'; $output .= '
'; return $output; diff --git a/core/modules/syslog/config/install/syslog.settings.yml b/core/modules/syslog/config/install/syslog.settings.yml index 1aa5b90..e4caa15 100644 --- a/core/modules/syslog/config/install/syslog.settings.yml +++ b/core/modules/syslog/config/install/syslog.settings.yml @@ -1,3 +1,3 @@ identity: drupal facility: '' -format: '!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message' +format: '@base_url|@timestamp|@type|@ip|@request_uri|@referer|@uid|@link|@message' diff --git a/core/modules/syslog/src/Logger/SysLog.php b/core/modules/syslog/src/Logger/SysLog.php index a40762b..fac5098 100644 --- a/core/modules/syslog/src/Logger/SysLog.php +++ b/core/modules/syslog/src/Logger/SysLog.php @@ -79,15 +79,15 @@ public function log($level, $message, array $context = array()) { $message = empty($message_placeholders) ? $message : strtr($message, $message_placeholders); $entry = strtr($this->config->get('format'), array( - '!base_url' => $base_url, - '!timestamp' => $context['timestamp'], - '!type' => $context['channel'], - '!ip' => $context['ip'], - '!request_uri' => $context['request_uri'], - '!referer' => $context['referer'], - '!uid' => $context['uid'], - '!link' => strip_tags($context['link']), - '!message' => strip_tags($message), + '@base_url' => $base_url, + '@timestamp' => $context['timestamp'], + '@type' => $context['channel'], + '@ip' => $context['ip'], + '@request_uri' => $context['request_uri'], + '@referer' => $context['referer'], + '@uid' => $context['uid'], + '@link' => strip_tags($context['link']), + '@message' => strip_tags($message), )); syslog($level, $entry); diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module index 339636b..b1acee4 100644 --- a/core/modules/syslog/syslog.module +++ b/core/modules/syslog/syslog.module @@ -17,7 +17,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) { case 'help.page.syslog': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Logging for UNIX, Linux, and Mac OS X') . '
'; @@ -54,7 +54,7 @@ function syslog_form_system_logging_settings_alter(&$form, FormStateInterface $f '#type' => 'textarea', '#title' => t('Syslog format'), '#default_value' => $config->get('format'), - '#description' => t('Specify the format of the syslog entry. Available variables are:
!base_url
Base URL of the site.
!timestamp
Unix timestamp of the log entry.
!type
The category to which this message belongs.
!ip
IP address of the user triggering the message.
!request_uri
The requested URI.
!referer
HTTP Referer if available.
!uid
User ID.
!link
A link to associate with the message.
!message
The message to store in the log.
'), + '#description' => t('Specify the format of the syslog entry. Available variables are:
@base_url
Base URL of the site.
@timestamp
Unix timestamp of the log entry.
@type
The category to which this message belongs.
@ip
IP address of the user triggering the message.
@request_uri
The requested URI.
@referer
HTTP Referer if available.
@uid
User ID.
@link
A link to associate with the message.
@message
The message to store in the log.
'), ); $form['#submit'][] = 'syslog_logging_settings_submit'; diff --git a/core/modules/system/js/system.modules.js b/core/modules/system/js/system.modules.js index f9c08e4..0732e39 100644 --- a/core/modules/system/js/system.modules.js +++ b/core/modules/system/js/system.modules.js @@ -64,8 +64,8 @@ Drupal.announce( Drupal.t( - '!modules modules are available in the modified list.', - {'!modules': $rowsAndDetails.find('tbody tr:visible').length} + '@modules modules are available in the modified list.', + {'@modules': $rowsAndDetails.find('tbody tr:visible').length} ) ); } diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php index 6bae397..729d780 100644 --- a/core/modules/system/src/Controller/SystemController.php +++ b/core/modules/system/src/Controller/SystemController.php @@ -231,8 +231,8 @@ public function themesPage() { if (isset($themes[$theme_key]) && file_exists($themes[$theme_key]->info['screenshot'])) { $theme->screenshot = array( 'uri' => $themes[$theme_key]->info['screenshot'], - 'alt' => $this->t('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), - 'title' => $this->t('Screenshot for !theme theme', array('!theme' => $theme->info['name'])), + 'alt' => $this->t('Screenshot for @theme theme', array('@theme' => $theme->info['name'])), + 'title' => $this->t('Screenshot for @theme theme', array('@theme' => $theme->info['name'])), 'attributes' => array('class' => array('screenshot')), ); break; @@ -259,7 +259,7 @@ public function themesPage() { $theme->operations[] = array( 'title' => $this->t('Settings'), 'url' => Url::fromRoute('system.theme_settings_theme', ['theme' => $theme->getName()]), - 'attributes' => array('title' => $this->t('Settings for !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->t('Settings for @theme theme', array('@theme' => $theme->info['name']))), ); } if (!empty($theme->status)) { @@ -279,14 +279,14 @@ public function themesPage() { 'title' => $this->t('Uninstall'), 'url' => Url::fromRoute('system.theme_uninstall'), 'query' => $query, - 'attributes' => array('title' => $this->t('Uninstall !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->t('Uninstall @theme theme', array('@theme' => $theme->info['name']))), ); } $theme->operations[] = array( 'title' => $this->t('Set as default'), 'url' => Url::fromRoute('system.theme_set_default'), 'query' => $query, - 'attributes' => array('title' => $this->t('Set !theme as default theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->t('Set @theme as default theme', array('@theme' => $theme->info['name']))), ); } $admin_theme_options[$theme->getName()] = $theme->info['name']; @@ -296,13 +296,13 @@ public function themesPage() { 'title' => $this->t('Install'), 'url' => Url::fromRoute('system.theme_install'), 'query' => $query, - 'attributes' => array('title' => $this->t('Install !theme theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->t('Install @theme theme', array('@theme' => $theme->info['name']))), ); $theme->operations[] = array( 'title' => $this->t('Install and set as default'), 'url' => Url::fromRoute('system.theme_set_default'), 'query' => $query, - 'attributes' => array('title' => $this->t('Install !theme as default theme', array('!theme' => $theme->info['name']))), + 'attributes' => array('title' => $this->t('Install @theme as default theme', array('@theme' => $theme->info['name']))), ); } } diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php index c57ceae..08e2297 100644 --- a/core/modules/system/src/Form/CronForm.php +++ b/core/modules/system/src/Form/CronForm.php @@ -107,7 +107,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ); $form['cron_url'] = array( - '#markup' => '

' . t('To run cron from outside the site, go to !cron', array('!cron' => $this->url('system.cron', array('key' => $this->state->get('system.cron_key')), array('absolute' => TRUE)))) . '

', + '#markup' => '

' . t('To run cron from outside the site, go to @cron', array('@cron' => $this->url('system.cron', array('key' => $this->state->get('system.cron_key')), array('absolute' => TRUE)))) . '

', ); $form['cron'] = array( diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index 289928f..e788177 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -354,8 +354,8 @@ protected function buildRow(array $modules, Extension $module, $distribution) { // Check the core compatibility. if ($module->info['core'] != \Drupal::CORE_COMPATIBILITY) { $compatible = FALSE; - $reasons[] = $this->t('This version is not compatible with Drupal !core_version and should be replaced.', array( - '!core_version' => \Drupal::CORE_COMPATIBILITY, + $reasons[] = $this->t('This version is not compatible with Drupal @core_version and should be replaced.', array( + '@core_version' => \Drupal::CORE_COMPATIBILITY, )); } @@ -363,9 +363,9 @@ protected function buildRow(array $modules, Extension $module, $distribution) { if (version_compare(phpversion(), $module->info['php']) < 0) { $compatible = FALSE; $required = $module->info['php'] . (substr_count($module->info['php'], '.') < 2 ? '.*' : ''); - $reasons[] = $this->t('This module requires PHP version @php_required and is incompatible with PHP version !php_version.', array( + $reasons[] = $this->t('This module requires PHP version @php_required and is incompatible with PHP version @php_version.', array( '@php_required' => $required, - '!php_version' => phpversion(), + '@php_version' => phpversion(), )); } diff --git a/core/modules/system/src/Form/PerformanceForm.php b/core/modules/system/src/Form/PerformanceForm.php index 542d691..db39b92 100644 --- a/core/modules/system/src/Form/PerformanceForm.php +++ b/core/modules/system/src/Form/PerformanceForm.php @@ -141,7 +141,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $disabled = !$is_writable; $disabled_message = ''; if (!$is_writable) { - $disabled_message = ' ' . t('Set up the public files directory to make these optimizations available.', array('!file-system' => $this->url('system.file_system_settings'))); + $disabled_message = ' ' . t('Set up the public files directory to make these optimizations available.', array('@file-system' => $this->url('system.file_system_settings'))); } $form['bandwidth_optimization'] = array( diff --git a/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php b/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php index 7073c28..d361a53 100644 --- a/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php +++ b/core/modules/system/src/Tests/Common/TableSortExtenderUnitTest.php @@ -38,7 +38,7 @@ function testTableSortInit() { $request->query->replace(array()); \Drupal::getContainer()->get('request_stack')->push($request); $ts = tablesort_init($headers); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Simple table headers sorted correctly.'); // Test with simple table headers plus $_GET parameters that should _not_ @@ -51,7 +51,7 @@ function testTableSortInit() { )); \Drupal::getContainer()->get('request_stack')->push($request); $ts = tablesort_init($headers); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Simple table headers plus non-overriding $_GET parameters sorted correctly.'); // Test with simple table headers plus $_GET parameters that _should_ @@ -67,7 +67,7 @@ function testTableSortInit() { $expected_ts['sort'] = 'desc'; $expected_ts['query'] = array('alpha' => 'beta'); $ts = tablesort_init($headers); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Simple table headers plus $_GET parameters sorted correctly.'); // Test complex table headers. @@ -99,7 +99,7 @@ function testTableSortInit() { 'sort' => 'desc', 'query' => array(), ); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Complex table headers sorted correctly.'); // Test complex table headers plus $_GET parameters that should _not_ @@ -118,7 +118,7 @@ function testTableSortInit() { 'sort' => 'asc', 'query' => array(), ); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Complex table headers plus non-overriding $_GET parameters sorted correctly.'); // Test complex table headers plus $_GET parameters that _should_ @@ -139,7 +139,7 @@ function testTableSortInit() { 'query' => array('alpha' => 'beta'), ); $ts = tablesort_init($headers); - $this->verbose(strtr('$ts:
!ts
', array('!ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); + $this->verbose(strtr('$ts:
@ts
', array('@ts' => SafeMarkup::checkPlain(var_export($ts, TRUE))))); $this->assertEqual($ts, $expected_ts, 'Complex table headers plus $_GET parameters sorted correctly.'); } } diff --git a/core/modules/system/src/Tests/Element/PathElementFormTest.php b/core/modules/system/src/Tests/Element/PathElementFormTest.php index 5698951..bcbe534 100644 --- a/core/modules/system/src/Tests/Element/PathElementFormTest.php +++ b/core/modules/system/src/Tests/Element/PathElementFormTest.php @@ -184,7 +184,7 @@ public function testPathElement() { $errors = $form_state->getErrors(); // Should be missing 'required_validate' field. $this->assertEqual(count($errors), 1); - $this->assertEqual($errors, array('required_validate' => t('!name field is required.', array('!name' => 'required_validate')))); + $this->assertEqual($errors, array('required_validate' => t('@name field is required.', array('@name' => 'required_validate')))); // Test invalid parameters. $form_state = (new FormState()) diff --git a/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php b/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php index a3262ea..5497920 100644 --- a/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php +++ b/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php @@ -570,7 +570,7 @@ protected function assertResults($expected, $sorted = FALSE) { $found = FALSE; break; } - return $this->assertTrue($found, strtr('!expected expected, !found found', array('!expected' => print_r($expected, TRUE), '!found' => print_r($this->queryResult, TRUE)))); + return $this->assertTrue($found, strtr('@expected expected, @found found', array('@expected' => print_r($expected, TRUE), '@found' => print_r($this->queryResult, TRUE)))); } /** diff --git a/core/modules/system/src/Tests/Form/EmailTest.php b/core/modules/system/src/Tests/Form/EmailTest.php index 69e9807..f409b46 100644 --- a/core/modules/system/src/Tests/Form/EmailTest.php +++ b/core/modules/system/src/Tests/Form/EmailTest.php @@ -35,7 +35,7 @@ function testFormEmail() { $edit['email_required'] = ' '; $this->drupalPostForm('form-test/email', $edit, 'Submit'); $this->assertRaw(t('The email address %mail is not valid.', array('%mail' => 'invalid'))); - $this->assertRaw(t('!name field is required.', array('!name' => 'Address'))); + $this->assertRaw(t('@name field is required.', array('@name' => 'Address'))); $edit = array(); $edit['email_required'] = ' foo.bar@example.com '; diff --git a/core/modules/system/src/Tests/Form/FormTest.php b/core/modules/system/src/Tests/Form/FormTest.php index 67508a2..13e94f8 100644 --- a/core/modules/system/src/Tests/Form/FormTest.php +++ b/core/modules/system/src/Tests/Form/FormTest.php @@ -183,7 +183,7 @@ function testRequiredCheckboxesRadio() { $expected[] = $form[$key]['#form_test_required_error']; } else { - $expected[] = t('!name field is required.', array('!name' => $form[$key]['#title'])); + $expected[] = t('@name field is required.', array('@name' => $form[$key]['#title'])); } } @@ -272,7 +272,7 @@ function testCheckboxProcessing() { // First, try to submit without the required checkbox. $edit = array(); $this->drupalPostForm('form-test/checkbox', $edit, t('Submit')); - $this->assertRaw(t('!name field is required.', array('!name' => 'required_checkbox')), 'A required checkbox is actually mandatory'); + $this->assertRaw(t('@name field is required.', array('@name' => 'required_checkbox')), 'A required checkbox is actually mandatory'); // Now try to submit the form correctly. $values = Json::decode($this->drupalPostForm(NULL, array('required_checkbox' => 1), t('Submit'))); @@ -298,7 +298,7 @@ function testCheckboxProcessing() { */ function testSelect() { $form = \Drupal::formBuilder()->getForm('Drupal\form_test\Form\FormTestSelectForm'); - $error = '!name field is required.'; + $error = '@name field is required.'; $this->drupalGet('form-test/select'); // Posting without any values should throw validation errors. @@ -316,7 +316,7 @@ function testSelect() { 'multiple_no_default', ); foreach ($no_errors as $key) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); } $expected_errors = array( @@ -327,7 +327,7 @@ function testSelect() { 'multiple_no_default_required', ); foreach ($expected_errors as $key) { - $this->assertText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertText(t('@name field is required.', array('@name' => $form[$key]['#title']))); } // Post values for required fields. diff --git a/core/modules/system/src/Tests/Form/UrlTest.php b/core/modules/system/src/Tests/Form/UrlTest.php index 494255d..67d7a41 100644 --- a/core/modules/system/src/Tests/Form/UrlTest.php +++ b/core/modules/system/src/Tests/Form/UrlTest.php @@ -35,7 +35,7 @@ function testFormUrl() { $edit['url_required'] = ' '; $this->drupalPostForm('form-test/url', $edit, 'Submit'); $this->assertRaw(t('The URL %url is not valid.', array('%url' => 'http://'))); - $this->assertRaw(t('!name field is required.', array('!name' => 'Required URL'))); + $this->assertRaw(t('@name field is required.', array('@name' => 'Required URL'))); $edit = array(); $edit['url'] = "\n"; diff --git a/core/modules/system/src/Tests/Form/ValidationTest.php b/core/modules/system/src/Tests/Form/ValidationTest.php index 31db834..2eaded8 100644 --- a/core/modules/system/src/Tests/Form/ValidationTest.php +++ b/core/modules/system/src/Tests/Form/ValidationTest.php @@ -111,19 +111,19 @@ function testValidateLimitErrors() { // validated, but the #element_validate handler for the 'test' field // is triggered. $this->drupalPostForm($path, $edit, t('Partial validate')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test element is invalid'); // Edge case of #limit_validation_errors containing numeric indexes: same // thing with the 'Partial validate (numeric index)' button and the // 'test_numeric_index' field. $this->drupalPostForm($path, $edit, t('Partial validate (numeric index)')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test (numeric index) element is invalid'); // Ensure something like 'foobar' isn't considered "inside" 'foo'. $this->drupalPostForm($path, $edit, t('Partial validate (substring)')); - $this->assertNoText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertNoText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test (substring) foo element is invalid'); // Ensure not validated values are not available to submit handlers. @@ -133,7 +133,7 @@ function testValidateLimitErrors() { // Now test full form validation and ensure that the #element_validate // handler is still triggered. $this->drupalPostForm($path, $edit, t('Full validate')); - $this->assertText(t('!name field is required.', array('!name' => 'Title'))); + $this->assertText(t('@name field is required.', array('@name' => 'Title'))); $this->assertText('Test element is invalid'); } @@ -211,7 +211,7 @@ function testCustomRequiredError() { $messages = []; foreach (Element::children($form) as $key) { if (isset($form[$key]['#required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $messages[] = [ 'title' => $form[$key]['#title'], 'message' => $form[$key]['#required_error'], @@ -219,7 +219,7 @@ function testCustomRequiredError() { ]; } elseif (isset($form[$key]['#form_test_required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $messages[] = [ 'title' => $form[$key]['#title'], 'message' => $form[$key]['#form_test_required_error'], @@ -229,7 +229,7 @@ function testCustomRequiredError() { elseif (!empty($form[$key]['#required'])) { $messages[] = [ 'title' => $form[$key]['#title'], - 'message' => t('!name field is required.', ['!name' => $form[$key]['#title']]), + 'message' => t('@name field is required.', ['@name' => $form[$key]['#title']]), 'key' => $key, ]; } @@ -247,17 +247,17 @@ function testCustomRequiredError() { $messages = []; foreach (Element::children($form) as $key) { if (isset($form[$key]['#required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $this->assertNoText($form[$key]['#required_error']); } elseif (isset($form[$key]['#form_test_required_error'])) { - $this->assertNoText(t('!name field is required.', array('!name' => $form[$key]['#title']))); + $this->assertNoText(t('@name field is required.', array('@name' => $form[$key]['#title']))); $this->assertNoText($form[$key]['#form_test_required_error']); } elseif (!empty($form[$key]['#required'])) { $messages[] = [ 'title' => $form[$key]['#title'], - 'message' => t('!name field is required.', ['!name' => $form[$key]['#title']]), + 'message' => t('@name field is required.', ['@name' => $form[$key]['#title']]), 'key' => $key, ]; } @@ -292,8 +292,8 @@ protected function assertErrorMessages($messages) { // Gather the element for checking the jump link section. $error_links[] = \Drupal::l($message['title'], Url::fromRoute('', [], ['fragment' => 'edit-' . str_replace('_', '-', $message['key']), 'external' => TRUE])); } - $top_message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found: !errors', '@count errors have been found: !errors', [ - '!errors' => SafeMarkup::set(implode(', ', $error_links)) + $top_message = \Drupal::translation()->formatPlural(count($error_links), '1 error has been found: @errors', '@count errors have been found: @errors', [ + '@errors' => SafeMarkup::set(implode(', ', $error_links)) ]); $this->assertRaw($top_message); $this->assertNoText(t('An illegal choice has been detected. Please contact the site administrator.')); diff --git a/core/modules/system/src/Tests/Module/UninstallTest.php b/core/modules/system/src/Tests/Module/UninstallTest.php index 4f5e193..03d3392 100644 --- a/core/modules/system/src/Tests/Module/UninstallTest.php +++ b/core/modules/system/src/Tests/Module/UninstallTest.php @@ -72,7 +72,7 @@ function testUninstallPage() { $this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall')); $this->assertNoText(\Drupal::translation()->translate('Configuration deletions'), 'No configuration deletions listed on the module install confirmation page.'); $this->assertText(\Drupal::translation()->translate('Configuration updates'), 'Configuration updates listed on the module install confirmation page.'); - $this->assertText($node_type->label(), SafeMarkup::format('The entity label "!label" found.', array('!label' => $node_type->label()))); + $this->assertText($node_type->label(), SafeMarkup::format('The entity label "@label" found.', array('@label' => $node_type->label()))); $this->drupalPostForm(NULL, NULL, t('Uninstall')); $this->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.'); @@ -88,7 +88,7 @@ function testUninstallPage() { $entity_types = array(); foreach ($node_dependencies as $entity) { $label = $entity->label() ?: $entity->id(); - $this->assertText($label, SafeMarkup::format('The entity label "!label" found.', array('!label' => $label))); + $this->assertText($label, SafeMarkup::format('The entity label "@label" found.', array('@label' => $label))); $entity_types[] = $entity->getEntityTypeId(); } $entity_types = array_unique($entity_types); diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php index a67decc..be3d007 100644 --- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php +++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php @@ -30,32 +30,32 @@ function testErrorHandler() { $config = $this->config('system.logging'); $error_notice = array( '%type' => 'Notice', - '!message' => 'Undefined variable: bananas', + '@message' => 'Undefined variable: bananas', '%function' => 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()', '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ); $error_warning = array( '%type' => 'Warning', - '!message' => 'Division by zero', + '@message' => 'Division by zero', '%function' => 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()', '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ); $error_user_notice = array( '%type' => 'User warning', - '!message' => 'Drupal is awesome', + '@message' => 'Drupal is awesome', '%function' => 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()', '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ); $fatal_error = array( '%type' => 'Recoverable fatal error', '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()', - '!message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66 and defined', + '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66 and defined', ); if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) { // In PHP 7, instead of a recoverable fatal error we get a TypeError. $fatal_error['%type'] = 'TypeError'; // The error message also changes in PHP 7. - $fatal_error['!message'] = 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66'; + $fatal_error['@message'] = 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66'; } // Set error reporting to display verbose notices. @@ -124,21 +124,21 @@ function testExceptionHandler() { $error_exception = array( '%type' => 'Exception', - '!message' => 'Drupal is awesome', + '@message' => 'Drupal is awesome', '%function' => 'Drupal\error_test\Controller\ErrorTestController->triggerException()', '%line' => 56, '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ); $error_pdo_exception = array( '%type' => 'DatabaseExceptionWrapper', - '!message' => 'SELECT * FROM bananas_are_awesome', + '@message' => 'SELECT * FROM bananas_are_awesome', '%function' => 'Drupal\error_test\Controller\ErrorTestController->triggerPDOException()', '%line' => 64, '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ); $error_renderer_exception = array( '%type' => 'Exception', - '!message' => 'This is an exception that occurs during rendering', + '@message' => 'This is an exception that occurs during rendering', '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()', '%line' => 82, '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', @@ -153,9 +153,9 @@ function testExceptionHandler() { // We cannot use assertErrorMessage() since the exact error reported // varies from database to database. Check that the SQL string is displayed. $this->assertText($error_pdo_exception['%type'], format_string('Found %type in error page.', $error_pdo_exception)); - $this->assertText($error_pdo_exception['!message'], format_string('Found !message in error page.', $error_pdo_exception)); + $this->assertText($error_pdo_exception['@message'], format_string('Found @message in error page.', $error_pdo_exception)); $error_details = format_string('in %function (line ', $error_pdo_exception); - $this->assertRaw($error_details, format_string("Found '!message' in error page.", array('!message' => $error_details))); + $this->assertRaw($error_details, format_string("Found '@message' in error page.", array('@message' => $error_details))); $this->drupalGet('error-test/trigger-renderer-exception'); $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.'); @@ -181,16 +181,16 @@ function testExceptionHandler() { * Helper function: assert that the error message is found. */ function assertErrorMessage(array $error) { - $message = t('%type: !message in %function (line ', $error); - $this->assertRaw($message, format_string('Found error message: !message.', array('!message' => $message))); + $message = t('%type: @message in %function (line ', $error); + $this->assertRaw($message, format_string('Found error message: @message.', array('@message' => $message))); } /** * Helper function: assert that the error message is not found. */ function assertNoErrorMessage(array $error) { - $message = t('%type: !message in %function (line ', $error); - $this->assertNoRaw($message, format_string('Did not find error message: !message.', array('!message' => $message))); + $message = t('%type: @message in %function (line ', $error); + $this->assertNoRaw($message, format_string('Did not find error message: @message.', array('@message' => $message))); } /** diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index a0095b8..35ddc29 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -66,7 +66,7 @@ function testThemeDataTypes() { $foos = array('null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo', 'empty_string' => ''); foreach ($foos as $type => $example) { $output = \Drupal::theme()->render('theme_test_foo', array('foo' => $example)); - $this->assertTrue($output instanceof SafeStringInterface || is_string($output), format_string('\Drupal::theme() returns an object that implements SafeStringInterface or a string for data type !type.', array('!type' => $type))); + $this->assertTrue($output instanceof SafeStringInterface || is_string($output), format_string('\Drupal::theme() returns an object that implements SafeStringInterface or a string for data type @type.', array('@type' => $type))); if ($output instanceof SafeStringInterface) { $this->assertIdentical((string) $example, $output->__toString()); } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 021e2dc..f032a36 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -243,15 +243,15 @@ function theme_system_modules_details($variables) { // Add the description, along with any modules it requires. $description = ''; $description .= '
'; - $description .= '
' . t('Machine name: !machine-name', array('!machine-name' => '' . $key . '')) . '
'; + $description .= '
' . t('Machine name: @machine-name', array('@machine-name' => '' . $key . '')) . '
'; if ($version) { - $description .= '
' . t('Version: !module-version', array('!module-version' => drupal_render($module['version']))) . '
'; + $description .= '
' . t('Version: @module-version', array('@module-version' => drupal_render($module['version']))) . '
'; } if ($requires) { - $description .= '
' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '
'; + $description .= '
' . t('Requires: @module-list', array('@module-list' => implode(', ', $module['#requires']))) . '
'; } if ($required_by) { - $description .= '
' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '
'; + $description .= '
' . t('Required by: @module-list', array('@module-list' => implode(', ', $module['#required_by']))) . '
'; } $description .= '
'; $links = ''; @@ -439,7 +439,7 @@ function template_preprocess_system_themes_page(&$variables) { if (substr_count($theme->info['php'], '.') < 2) { $theme->info['php'] .= '.*'; } - $current_theme['incompatible'] = t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion())); + $current_theme['incompatible'] = t('This theme requires PHP version @php_required and is incompatible with PHP version @php_version.', array('@php_required' => $theme->info['php'], '@php_version' => phpversion())); } elseif (!empty($theme->incompatible_base)) { $current_theme['incompatible'] = t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme'])); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 948e6f4..c37a832 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -434,14 +434,14 @@ function system_requirements($phase) { } // Set summary and description based on values determined above. - $summary = t('Last run !time ago', array('!time' => \Drupal::service('date.formatter')->formatTimeDiffSince($cron_last))); + $summary = t('Last run @time ago', array('@time' => \Drupal::service('date.formatter')->formatTimeDiffSince($cron_last))); $description = ''; if ($severity != REQUIREMENT_INFO) { $description = t('Cron has not run recently.') . ' ' . $help; } $description .= ' ' . t('You can run cron manually.', array('@cron' => \Drupal::url('system.run_cron'))); - $description .= '
' . t('To run cron from outside the site, go to !cron', array('!cron' => \Drupal::url('system.cron', array('key' => \Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))))); + $description .= '
' . t('To run cron from outside the site, go to @cron', array('@cron' => \Drupal::url('system.cron', array('key' => \Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))))); $requirements['cron'] = array( 'title' => t('Cron maintenance tasks'), diff --git a/core/modules/system/system.module b/core/modules/system/system.module index d6d98c8..4da4f80 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -75,27 +75,27 @@ function system_help($route_name, RouteMatchInterface $route_match) { case 'help.page.system': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing modules') . '
'; - $output .= '
' . t('Users with appropriate permission can install and uninstall modules from the Extend page. Depending on which distribution or installation profile you choose when you install your site, several modules are installed and others are provided but not installed. Each module provides a discrete set of features; modules may be installed or uninstalled depending on the needs of the site. Many additional modules contributed by members of the Drupal community are available for download from the Drupal.org module page. Note that uninstalling a module is a destructive action: when you uninstall a module, you will permanently lose all data connected to the module.', array('!modules' => \Drupal::url('system.modules_list'), '!drupal-modules' => 'https://www.drupal.org/project/modules')) . '
'; + $output .= '
' . t('Users with appropriate permission can install and uninstall modules from the Extend page. Depending on which distribution or installation profile you choose when you install your site, several modules are installed and others are provided but not installed. Each module provides a discrete set of features; modules may be installed or uninstalled depending on the needs of the site. Many additional modules contributed by members of the Drupal community are available for download from the Drupal.org module page. Note that uninstalling a module is a destructive action: when you uninstall a module, you will permanently lose all data connected to the module.', array('@modules' => \Drupal::url('system.modules_list'), '@drupal-modules' => 'https://www.drupal.org/project/modules')) . '
'; $output .= '
' . t('Managing themes') . '
'; - $output .= '
' . t('Users with appropriate permission can install and uninstall themes on the Appearance page. Themes determine the design and presentation of your site. Depending on which distribution or installation profile you choose when you install your site, a default theme is installed, and possibly a different theme for administration pages. Other themes are provided but not installed, and additional contributed themes are available at the Drupal.org theme page.', array('!themes' => \Drupal::url('system.themes_page'), '!drupal-themes' => 'https://www.drupal.org/project/themes')) . '
'; + $output .= '
' . t('Users with appropriate permission can install and uninstall themes on the Appearance page. Themes determine the design and presentation of your site. Depending on which distribution or installation profile you choose when you install your site, a default theme is installed, and possibly a different theme for administration pages. Other themes are provided but not installed, and additional contributed themes are available at the Drupal.org theme page.', array('@themes' => \Drupal::url('system.themes_page'), '@drupal-themes' => 'https://www.drupal.org/project/themes')) . '
'; $output .= '
' . t('Disabling drag-and-drop functionality') . '
'; $output .= '
' . t('The default drag-and-drop user interface for ordering tables in the administrative interface presents a challenge for some users, including users of screen readers and other assistive technology. The drag-and-drop interface can be disabled in a table by clicking a link labeled "Show row weights" above the table. The replacement interface allows users to order the table by choosing numerical weights instead of dragging table rows.') . '
'; $output .= '
' . t('Configuring basic site settings') . '
'; - $output .= '
' . t('The System module provides pages for managing basic site configuration, including Date and time formats and basic Site information (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main Configuration page.', array('!date-time-settings' => \Drupal::url('entity.date_format.collection'), '!site-info' => \Drupal::url('system.site_information_settings'), '!config' => \Drupal::url('system.admin_config'))) . '
'; + $output .= '
' . t('The System module provides pages for managing basic site configuration, including Date and time formats and basic Site information (site name, email address to send mail from, home page, and error pages). Additional configuration pages are listed on the main Configuration page.', array('@date-time-settings' => \Drupal::url('entity.date_format.collection'), '@site-info' => \Drupal::url('system.site_information_settings'), '@config' => \Drupal::url('system.admin_config'))) . '
'; $output .= '
' . t('Using maintenance mode') . '
'; - $output .= '
' . t('When you are performing site maintenance, you can prevent non-administrative users (including anonymous visitors) from viewing your site by putting it in Maintenance mode. This will prevent unauthorized users from making changes to the site while you are performing maintenance, or from seeing a broken site while updates are in progress.', array('!maintenance-mode' => \Drupal::url('system.site_maintenance_mode'))) . '
'; + $output .= '
' . t('When you are performing site maintenance, you can prevent non-administrative users (including anonymous visitors) from viewing your site by putting it in Maintenance mode. This will prevent unauthorized users from making changes to the site while you are performing maintenance, or from seeing a broken site while updates are in progress.', array('@maintenance-mode' => \Drupal::url('system.site_maintenance_mode'))) . '
'; $output .= '
' . t('Configuring for performance') . '
'; - $output .= '
' . t('On the Performance page, the site can be configured to aggregate CSS and JavaScript files, making the total request size smaller. Note that, for small- to medium-sized websites, the Internal Page Cache module should be installed so that pages are efficiently cached and reused.', array('!performance-page' => \Drupal::url('system.performance_settings'), '!page-cache' => (\Drupal::moduleHandler()->moduleExists('page_cache')) ? \Drupal::url('help.page', array('name' => 'page_cache')) : '#')) . '
'; + $output .= '
' . t('On the Performance page, the site can be configured to aggregate CSS and JavaScript files, making the total request size smaller. Note that, for small- to medium-sized websites, the Internal Page Cache module should be installed so that pages are efficiently cached and reused.', array('@performance-page' => \Drupal::url('system.performance_settings'), '@page-cache' => (\Drupal::moduleHandler()->moduleExists('page_cache')) ? \Drupal::url('help.page', array('name' => 'page_cache')) : '#')) . '
'; $output .= '
' . t('Configuring cron') . '
'; - $output .= '
' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis; these operations are known as cron tasks. On the Cron page, you can configure cron to run periodically as part of normal page requests, or you can turn this off and trigger cron from an outside process on your web server. You can verify the status of cron tasks by visiting the Status report page. For more information, see the online documentation for configuring cron jobs.', array('!status' => \Drupal::url('system.status'), '!handbook' => 'https://www.drupal.org/cron', '!cron' => \Drupal::url('system.cron_settings'))) . '
'; + $output .= '
' . t('In order for the site and its modules to continue to operate well, a set of routine administrative operations must run on a regular basis; these operations are known as cron tasks. On the Cron page, you can configure cron to run periodically as part of normal page requests, or you can turn this off and trigger cron from an outside process on your web server. You can verify the status of cron tasks by visiting the Status report page. For more information, see the online documentation for configuring cron jobs.', array('@status' => \Drupal::url('system.status'), '@handbook' => 'https://www.drupal.org/cron', '@cron' => \Drupal::url('system.cron_settings'))) . '
'; $output .= '
' . t('Configuring the file system') . '
'; - $output .= '
' . t('Your site has several file directories, which are used to store and process uploaded and generated files. The public file directory, which is configured in your settings.php file, is the default place for storing uploaded files. Links to files in this directory contain the direct file URL, so when the files are requested, the web server will send them directly without invoking your site code. This means that the files can be downloaded by anyone with the file URL, so requests are not access-controlled but they are efficient. The private file directory, also configured in your settings.php file and ideally located outside the site web root, is access controlled. Links to files in this directory are not direct, so requests to these files are mediated by your site code. This means that your site can check file access permission for each file before deciding to fulfill the request, so the requests are more secure, but less efficient. You should only use the private storage for files that need access control, not for files like your site logo and background images used on every page. The temporary file directory is used internally by your site code for various operations, and is configured on the File system settings page. You can also see the configured public and private file directories on this page, and choose whether public or private should be the default for uploaded files.', array('!file-system' => \Drupal::url('system.file_system_settings'))) . '
'; + $output .= '
' . t('Your site has several file directories, which are used to store and process uploaded and generated files. The public file directory, which is configured in your settings.php file, is the default place for storing uploaded files. Links to files in this directory contain the direct file URL, so when the files are requested, the web server will send them directly without invoking your site code. This means that the files can be downloaded by anyone with the file URL, so requests are not access-controlled but they are efficient. The private file directory, also configured in your settings.php file and ideally located outside the site web root, is access controlled. Links to files in this directory are not direct, so requests to these files are mediated by your site code. This means that your site can check file access permission for each file before deciding to fulfill the request, so the requests are more secure, but less efficient. You should only use the private storage for files that need access control, not for files like your site logo and background images used on every page. The temporary file directory is used internally by your site code for various operations, and is configured on the File system settings page. You can also see the configured public and private file directories on this page, and choose whether public or private should be the default for uploaded files.', array('@file-system' => \Drupal::url('system.file_system_settings'))) . '
'; $output .= '
' . t('Configuring the image toolkit') . '
'; - $output .= '
' . t('On the Image toolkit page, you can select and configure the PHP toolkit used to manipulate images. Depending on which distribution or installation profile you choose when you install your site, the GD2 toolkit and possibly others are included; other toolkits may be provided by contributed modules.', array('!toolkit' => \Drupal::url('system.image_toolkit_settings'))) . '
'; + $output .= '
' . t('On the Image toolkit page, you can select and configure the PHP toolkit used to manipulate images. Depending on which distribution or installation profile you choose when you install your site, the GD2 toolkit and possibly others are included; other toolkits may be provided by contributed modules.', array('@toolkit' => \Drupal::url('system.image_toolkit_settings'))) . '
'; $output .= '
'; return $output; @@ -103,7 +103,7 @@ function system_help($route_name, RouteMatchInterface $route_match) { return '

' . 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')) . '

'; return $output; case 'system.theme_settings_theme': @@ -115,17 +115,17 @@ 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')) { if (update_manager_access()) { - $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'))) . '

'; } } 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. 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; @@ -151,7 +151,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/system/templates/table.html.twig b/core/modules/system/templates/table.html.twig index f6b32e4..7848910 100644 --- a/core/modules/system/templates/table.html.twig +++ b/core/modules/system/templates/table.html.twig @@ -10,7 +10,7 @@ * - attributes: HTML attributes to apply to the tag. * Note: Drupal currently supports only one table header row, see * https://www.drupal.org/node/893530 and - * http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. + * http://api.drupal.org/api/drupal/includes@theme.inc/function/theme_table/7#comment-5109. * - header: Table header cells. Each cell contains the following properties: * - tag: The HTML tag name to use; either TH or TD. * - attributes: HTML attributes to apply to the tag. diff --git a/core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php b/core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php index 78c29b3..6075d2e 100644 --- a/core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php +++ b/core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php @@ -22,7 +22,7 @@ class CacheTestController { public function urlBubbling() { $url = Url::fromRoute('')->setAbsolute(); return [ - '#markup' => SafeMarkup::format('This URL is early-rendered: !url. Yet, its bubbleable metadata should be bubbled.', ['!url' => $url->toString()]) + '#markup' => SafeMarkup::format('This URL is early-rendered: @url. Yet, its bubbleable metadata should be bubbled.', ['@url' => $url->toString()]) ]; } diff --git a/core/modules/system/tests/modules/error_service_test/src/Logger/TestLog.php b/core/modules/system/tests/modules/error_service_test/src/Logger/TestLog.php index 4c7723f..aae24b4 100644 --- a/core/modules/system/tests/modules/error_service_test/src/Logger/TestLog.php +++ b/core/modules/system/tests/modules/error_service_test/src/Logger/TestLog.php @@ -24,7 +24,7 @@ class TestLog implements LoggerInterface { public function log($level, $message, array $context = array()) { $trigger = [ '%type' => 'Exception', - '!message' => 'Deforestation', + '@message' => 'Deforestation', '%function' => 'Drupal\error_service_test\MonkeysInTheControlRoom->handle()', 'severity_level' => 3, 'channel' => 'php', diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php index 2c47068..a2bac03 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestVerticalTabsForm.php @@ -33,12 +33,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { for ($i = 1; $i <= $tab_count; $i++) { $form['tab' . $i] = array( '#type' => 'fieldset', - '#title' => t('Tab !num', array('!num' => $i)), + '#title' => t('Tab @num', array('@num' => $i)), '#group' => 'vertical_tabs', '#access' => \Drupal::currentUser()->hasPermission('access vertical_tab_test tabs'), ); $form['tab' . $i]['field' . $i] = array( - '#title' => t('Field !num', array('!num' => $i)), + '#title' => t('Field @num', array('@num' => $i)), '#type' => 'textfield', ); diff --git a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php index f824792..5bdba22 100644 --- a/core/modules/taxonomy/src/Tests/LoadMultipleTest.php +++ b/core/modules/taxonomy/src/Tests/LoadMultipleTest.php @@ -38,7 +38,7 @@ function testTaxonomyTermMultipleLoad() { // Load the terms from the vocabulary. $terms = entity_load_multiple_by_properties('taxonomy_term', array('vid' => $vocabulary->id())); $count = count($terms); - $this->assertEqual($count, 5, format_string('Correct number of terms were loaded. !count terms.', array('!count' => $count))); + $this->assertEqual($count, 5, format_string('Correct number of terms were loaded. @count terms.', array('@count' => $count))); // Load the same terms again by tid. $terms2 = Term::loadMultiple(array_keys($terms)); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index f7c8c0e..06bac5d 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -41,20 +41,24 @@ 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('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing vocabularies') . '
'; - $output .= '
' . t('Users who have the Administer vocabularies and terms permission can add and edit vocabularies from the Taxonomy administration page. Vocabularies can be deleted from their Edit vocabulary page. Users with the Taxonomy term: Administer fields permission may add additional fields for terms in that vocabulary using the Field UI module.' , array('!taxonomy_admin' => \Drupal::url('entity.taxonomy_vocabulary.collection'), '!field_ui' => $field_ui_url)) . '
'; + $output .= '
' . t('Users who have the Administer vocabularies and terms permission can add and edit vocabularies from the Taxonomy administration page. Vocabularies can be deleted from their Edit vocabulary page. Users with the Taxonomy term: Administer fields permission may add additional fields for terms in that vocabulary using the Field UI module.' , array('@taxonomy_admin' => \Drupal::url('entity.taxonomy_vocabulary.collection'), '@field_ui' => $field_ui_url)) . '
'; $output .= '
' . t('Managing terms') . '
'; - $output .= '
' . t('Users who have the Administer vocabularies and terms permission or the Edit terms permission for a particular vocabulary can add, edit, and organize the terms in a vocabulary from a vocabulary\'s term listing page, which can be accessed by going to the Taxonomy administration page and clicking List terms in the Operations column. Users must have the Administer vocabularies and terms permission or the Delete terms permission for a particular vocabulary to delete terms.' , array('!taxonomy_admin' => \Drupal::url('entity.taxonomy_vocabulary.collection'))) . '
'; + $output .= '
' . t('Users who have the Administer vocabularies and terms permission or the Edit terms permission for a particular vocabulary can add, edit, and organize the terms in a vocabulary from a vocabulary\'s term listing page, which can be accessed by going to the Taxonomy administration page and clicking List terms in the Operations column. Users must have the Administer vocabularies and terms permission or the Delete terms permission for a particular vocabulary to delete terms.' , array('@taxonomy_admin' => \Drupal::url('entity.taxonomy_vocabulary.collection'))) . '
'; $output .= '
' . t('Classifying entity content') . '
'; - $output .= '
' . t('A user with the Administer fields permission for a certain entity type may add Taxonomy term reference fields to the entity type, which will allow entities to be classified using taxonomy terms. See the Entity Reference help for more information about reference fields. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them.' , array('!field_ui' => $field_ui_url, '!field' => \Drupal::url('help.page', array('name' => 'field')), '!entity_reference' => \Drupal::url('help.page', array('name' => 'entity_reference')))) . '
'; + $output .= '
' . t('A user with the Administer fields permission for a certain entity type may add Taxonomy term reference fields to the entity type, which will allow entities to be classified using taxonomy terms. See the Entity Reference help for more information about reference fields. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them.' , array('@field_ui' => $field_ui_url, '@field' => \Drupal::url('help.page', array('name' => 'field')), '@entity_reference' => \Drupal::url('help.page', array('name' => 'entity_reference')))) . '
'; $output .= '
' . t('Adding new terms during content creation') . '
'; $output .= '
' . t('Allowing users to add new terms gradually builds a vocabulary as content is added and edited. Users can add new terms if either of the two Autocomplete widgets is chosen for the Taxonomy term reference field in the Manage form display page for the field. You will also need to enable the Create referenced entities if they don\'t already exist option, and restrict the field to one vocabulary.') . '
'; $output .= '
' . t('Configuring displays and form displays') . '
'; - $output .= '
' . t('See the Entity Reference help page for the field widgets and formatters that can be configured for any reference field on the Manage display and Manage form display pages. Taxonomy additionally provides an RSS category formatter that displays nothing when the entity item is displayed as HTML, but displays an RSS category instead of a list when the entity item is displayed in an RSS feed.', array('!entity_reference' => \Drupal::url('help.page', array('name' => 'entity_reference')))) . ''; + $output .= '
' . t('See the Entity Reference help page for the field widgets and formatters that can be configured for any reference field on the Manage display and Manage form display pages. Taxonomy additionally provides an RSS category formatter that displays nothing when the entity item is displayed as HTML, but displays an RSS category instead of a list when the entity item is displayed in an RSS feed.', array('@entity_reference' => \Drupal::url('help.page', array('name' => 'entity_reference')))) . ''; $output .= ''; $output .= '
'; $output .= '
'; diff --git a/core/modules/telephone/telephone.module b/core/modules/telephone/telephone.module index fbf43c3..5ff573c 100644 --- a/core/modules/telephone/telephone.module +++ b/core/modules/telephone/telephone.module @@ -15,11 +15,11 @@ function telephone_help($route_name, RouteMatchInterface $route_match) { case 'help.page.telephone': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying telephone fields') . '
'; - $output .= '
' . t('The settings and the display of the telephone field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and the display of the telephone field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Displaying telephone numbers as links') . '
'; $output .= '
' . t('Telephone numbers can be displayed as links with the scheme name tel: by choosing the Telephone display format on the Manage display page. Any spaces will be stripped out of the link text. This semantic markup improves the user experience on mobile and assistive technology devices.') . '
'; $output .= '
'; diff --git a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php index c6bef4f..8349f7a 100644 --- a/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php +++ b/core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php @@ -57,7 +57,7 @@ public function settingsForm(array $form, FormStateInterface $form_state) { public function settingsSummary() { $summary = parent::settingsSummary(); - $summary[] = t('Number of summary rows: !rows', array('!rows' => $this->getSetting('summary_rows'))); + $summary[] = t('Number of summary rows: @rows', array('@rows' => $this->getSetting('summary_rows'))); return $summary; } diff --git a/core/modules/text/text.module b/core/modules/text/text.module index 8c72d90..5e11608 100644 --- a/core/modules/text/text.module +++ b/core/modules/text/text.module @@ -18,11 +18,11 @@ function text_help($route_name, RouteMatchInterface $route_match) { case 'help.page.text': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying text fields') . '
'; - $output .= '
' . t('The settings and display of the text field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; + $output .= '
' . t('The settings and display of the text field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => (\Drupal::moduleHandler()->moduleExists('field_ui')) ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#')) . '
'; $output .= '
' . t('Creating short text fields') . '
'; $output .= '
' . t('If you choose Text (plain) or Text (formatted) as the field type on the Manage fields page, then a field with a single row is displayed. You can change the maximum text length in the Field settings when you set up the field.') . '
'; $output .= '
' . t('Creating long text fields') . '
'; @@ -32,7 +32,7 @@ function text_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Displaying summaries instead of trimmed text') . '
'; $output .= '
' . t('As an alternative to using a trimmed version of the text, you can enter a separate summary by choosing the Text (formatted, long, with summary) field type on the Manage fields page. Even when Summary input is enabled, and summaries are provided, you can display trimmed text nonetheless by choosing the appropriate format on the Manage display page.') . '
'; $output .= '
' . t('Using text formats and editors') . '
'; - $output .= '
' . t('If you choose Text (plain) or Text (plain, long) you restrict the input to Plain text only. If you choose Text (formatted), Text (formatted, long), or Text (formatted, long with summary) you allow users to write formatted text. Which options are available to individual users depends on the settings on the Text formats and editors page.', array('!formats' => \Drupal::url('filter.admin_overview'))) . '
'; + $output .= '
' . t('If you choose Text (plain) or Text (plain, long) you restrict the input to Plain text only. If you choose Text (formatted), Text (formatted, long), or Text (formatted, long with summary) you allow users to write formatted text. Which options are available to individual users depends on the settings on the Text formats and editors page.', array('@formats' => \Drupal::url('filter.admin_overview'))) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index d837b17..ba1d3ae 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -23,7 +23,7 @@ function toolbar_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.toolbar': $output = '

' . t('About') . '

'; - $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('Terminology') . '

'; $output .= '
'; $output .= '
' . t('Tabs') . '
'; diff --git a/core/modules/tour/js/tour.js b/core/modules/tour/js/tour.js index d6ca172..fc23460 100644 --- a/core/modules/tour/js/tour.js +++ b/core/modules/tour/js/tour.js @@ -251,7 +251,7 @@ .find('li') // Rebuild the progress data. .each(function (index) { - var progress = Drupal.t('!tour_item of !total', {'!tour_item': index + 1, '!total': total}); + var progress = Drupal.t('@tour_item of @total', {'@tour_item': index + 1, '@total': total}); $(this).find('.tour-progress').text(progress); }) // Update the last item to have "End tour" as the button. diff --git a/core/modules/tour/src/TourViewBuilder.php b/core/modules/tour/src/TourViewBuilder.php index ecbd1ac..caccf15 100644 --- a/core/modules/tour/src/TourViewBuilder.php +++ b/core/modules/tour/src/TourViewBuilder.php @@ -44,7 +44,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la 'tour-progress', ), ), - '#children' => t('!tour_item of !total', array('!tour_item' => $index + 1, '!total' => $count)), + '#children' => t('@tour_item of @total', array('@tour_item' => $index + 1, '@total' => $count)), ), '#wrapper_attributes' => $tip->getAttributes() + $attributes, ); diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module index a5e4414..ef32451 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -16,13 +16,13 @@ function tour_help($route_name, RouteMatchInterface $route_match) { case 'help.page.tour': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Viewing tours') . '
'; $output .= '
' . t("If a tour is available on a page, a Tour button will be visible in the toolbar. If you click this button the first tip of the tour will appear. The tour continues after clicking the Next button in the tip. To see a tour users must have the permission Access tour and JavaScript must be enabled in the browser") . '
'; $output .= '
' . t('Creating tours') . '
'; - $output .= '
' . t("Tours can be written as YAML-documents with a text editor, or using the contributed Tour UI module. For more information, see the online documentation for writing tours.", array('!doc_url' => 'https://www.drupal.org/developing/api/tour', '!tour_ui' => 'https://www.drupal.org/project/tour_ui')) . '
'; + $output .= '
' . t("Tours can be written as YAML-documents with a text editor, or using the contributed Tour UI module. For more information, see the online documentation for writing tours.", array('@doc_url' => 'https://www.drupal.org/developing/api/tour', '@tour_ui' => 'https://www.drupal.org/project/tour_ui')) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module index fbd4d9a..e2acfcd 100644 --- a/core/modules/tracker/tracker.module +++ b/core/modules/tracker/tracker.module @@ -19,11 +19,11 @@ function tracker_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.tracker': $output = '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Tracking new and updated site content') . '
'; - $output .= '
' . t('The Recent content page shows new and updated content in reverse chronological order, listing the content type, title, author\'s name, number of comments, and time of last update. Content is considered updated when changes occur in the text, or when new comments are added. The My recent content tab limits the list to the currently logged-in user.', array('!recent' => \Drupal::url('tracker.page'))) . '
'; + $output .= '
' . t('The Recent content page shows new and updated content in reverse chronological order, listing the content type, title, author\'s name, number of comments, and time of last update. Content is considered updated when changes occur in the text, or when new comments are added. The My recent content tab limits the list to the currently logged-in user.', array('@recent' => \Drupal::url('tracker.page'))) . '
'; $output .= '
' . t('Tracking user-specific content') . '
'; $output .= '
' . t("To follow a specific user's new and updated content, select the Activity tab from the user's profile page.") . '
'; $output .= '
'; diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc index 3be3966..e0a8948 100644 --- a/core/modules/tracker/tracker.pages.inc +++ b/core/modules/tracker/tracker.pages.inc @@ -107,8 +107,8 @@ function tracker_page($account = NULL) { 'data-history-node-last-comment-timestamp' => $node->last_comment_timestamp, ), 'last updated' => array( - 'data' => t('!time ago', array( - '!time' => \Drupal::service('date.formatter')->formatTimeDiffSince($node->last_activity), + 'data' => t('@time ago', array( + '@time' => \Drupal::service('date.formatter')->formatTimeDiffSince($node->last_activity), )), ), ); diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 4aed1ef..0caa6c5 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -73,7 +73,7 @@ function update_help($route_name, RouteMatchInterface $route_match) { case 'help.page.update': $output = ''; $output .= '

' . t('About') . '

'; - $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.') . '

'; @@ -81,13 +81,13 @@ function update_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Checking for available updates') . '
'; - $output .= '
' . t('The Available updates report displays core, contributed modules, and themes for which there are new releases available for download. On the report page, you can also check manually for updates. You can configure the frequency of update checks, which are performed during cron runs, and whether notifications are sent on the Update Manager settings page.', array('!update-report' => \Drupal::url('update.status'), '!update-settings' => \Drupal::url('update.settings'))) . '
'; + $output .= '
' . t('The Available updates report displays core, contributed modules, and themes for which there are new releases available for download. On the report page, you can also check manually for updates. You can configure the frequency of update checks, which are performed during cron runs, and whether notifications are sent on the Update Manager settings page.', array('@update-report' => \Drupal::url('update.status'), '@update-settings' => \Drupal::url('update.settings'))) . '
'; // Only explain the Update manager if it has not been disabled. if (update_manager_access()) { $output .= '
' . t('Performing updates through the Update page') . '
'; - $output .= '
' . t('The Update Manager module allows administrators to perform updates directly from the Update page. It lists all available updates, and you can confirm whether you want to download them. If you don\'t have sufficient access rights to your web server, you could be prompted for your FTP/SSH password. Afterwards the files are transferred into your site installation, overwriting your old files. Direct links to the Update page are also displayed on the Extend page and the Appearance page.', array('!modules_page' => \Drupal::url('system.modules_list'), '!themes_page' => \Drupal::url('system.themes_page'), '!update-page' => \Drupal::url('update.report_update'))) . '
'; + $output .= '
' . t('The Update Manager module allows administrators to perform updates directly from the Update page. It lists all available updates, and you can confirm whether you want to download them. If you don\'t have sufficient access rights to your web server, you could be prompted for your FTP/SSH password. Afterwards the files are transferred into your site installation, overwriting your old files. Direct links to the Update page are also displayed on the Extend page and the Appearance page.', array('@modules_page' => \Drupal::url('system.modules_list'), '@themes_page' => \Drupal::url('system.themes_page'), '@update-page' => \Drupal::url('update.report_update'))) . '
'; $output .= '
' . t('Installing new modules and themes through the Install page') . '
'; - $output .= '
' . t('You can also install new modules and themes in the same fashion, through the Install page, or by clicking the Install new module/theme links at the top of the Extend page and the Appearance page. In this case, you are prompted to provide either the URL to the download, or to upload a packaged release file from your local computer.', array('!modules_page' => \Drupal::url('system.modules_list'), '!themes_page' => \Drupal::url('system.themes_page'), '!install' => \Drupal::url('update.report_install'))) . '
'; + $output .= '
' . t('You can also install new modules and themes in the same fashion, through the Install page, or by clicking the Install new module/theme links at the top of the Extend page and the Appearance page. In this case, you are prompted to provide either the URL to the download, or to upload a packaged release file from your local computer.', array('@modules_page' => \Drupal::url('system.modules_list'), '@themes_page' => \Drupal::url('system.themes_page'), '@install' => \Drupal::url('update.report_install'))) . '
'; } $output .= '
'; return $output; @@ -435,7 +435,7 @@ function update_fetch_data_finished($success, $results) { function update_mail($key, &$message, $params) { $langcode = $message['langcode']; $language = \Drupal::languageManager()->getLanguage($langcode); - $message['subject'] .= t('New release(s) available for !site_name', array('!site_name' => \Drupal::config('system.site')->get('name')), array('langcode' => $langcode)); + $message['subject'] .= t('New release(s) available for @site_name', array('@site_name' => \Drupal::config('system.site')->get('name')), array('langcode' => $langcode)); foreach ($params as $msg_type => $msg_reason) { $message['body'][] = _update_message_text($msg_type, $msg_reason, FALSE, $langcode); } @@ -445,10 +445,10 @@ function update_mail($key, &$message, $params) { } $settings_url = \Drupal::url('update.settings', [], ['absolute' => TRUE]); if (\Drupal::config('update.settings')->get('notification.threshold') == 'all') { - $message['body'][] = t('Your site is currently configured to send these emails when any updates are available. To get notified only for security updates, !url.', array('!url' => $settings_url)); + $message['body'][] = t('Your site is currently configured to send these emails when any updates are available. To get notified only for security updates, @url.', array('@url' => $settings_url)); } else { - $message['body'][] = t('Your site is currently configured to send these emails only when security updates are available. To get notified for any available updates, !url.', array('!url' => $settings_url)); + $message['body'][] = t('Your site is currently configured to send these emails only when security updates are available. To get notified for any available updates, @url.', array('@url' => $settings_url)); } } @@ -635,9 +635,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/update/update.report.inc b/core/modules/update/update.report.inc index dd2494f..946e844 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -266,9 +266,9 @@ function template_preprocess_update_project_status(&$variables) { } if ($base_status_label) { - $base_themes[] = t('%base_theme (!base_label)', array( + $base_themes[] = t('%base_theme (@base_label)', array( '%base_theme' => $base_theme, - '!base_label' => $base_status_label, + '@base_label' => $base_status_label, )); } else { diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 0bcfad9..a43f39a 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -144,11 +144,11 @@ public function form(array $form, FormStateInterface $form_state) { $request_new = $this->l($this->t('Reset your password'), new Url('user.pass', array(), array('attributes' => array('title' => $this->t('Send password reset instructions via e-mail.')))) ); - $current_pass_description = $this->t('Required if you want to change the %mail or %pass below. !request_new.', + $current_pass_description = $this->t('Required if you want to change the %mail or %pass below. @request_new.', array( '%mail' => $protected_values['mail'], '%pass' => $protected_values['pass'], - '!request_new' => $request_new, + '@request_new' => $request_new, ) ); } diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php index 0a6b8e9..72b83ec 100644 --- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php +++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php @@ -31,7 +31,7 @@ class UserMailRequired extends Constraint implements ConstraintValidatorInterfac * * @var string */ - public $message = '!name field is required.'; + public $message = '@name field is required.'; /** * @var \Symfony\Component\Validator\ExecutionContextInterface @@ -70,7 +70,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, array('!name' => SafeMarkup::placeholder($account->getFieldDefinition('mail')->getLabel()))); + $this->context->addViolation($this->message, array('@name' => SafeMarkup::placeholder($account->getFieldDefinition('mail')->getLabel()))); } } diff --git a/core/modules/user/src/Tests/UserBlocksTest.php b/core/modules/user/src/Tests/UserBlocksTest.php index 830b87a..ee66830 100644 --- a/core/modules/user/src/Tests/UserBlocksTest.php +++ b/core/modules/user/src/Tests/UserBlocksTest.php @@ -49,8 +49,8 @@ function testUserLoginBlock() { $edit['name'] = $this->randomMachineName(); $edit['pass'] = $this->randomMachineName(); $this->drupalPostForm('node', $edit, t('Log in')); - $this->assertRaw(\Drupal::translation()->formatPlural(1, '1 error has been found: !errors', '@count errors have been found: !errors', [ - '!errors' => SafeMarkup::set('Username') + $this->assertRaw(\Drupal::translation()->formatPlural(1, '1 error has been found: @errors', '@count errors have been found: @errors', [ + '@errors' => SafeMarkup::set('Username') ])); $this->assertText(t('Sorry, unrecognized username or password.')); 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 c099dc3..ed344f9 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' => SafeMarkup::placeholder($user->getFieldDefinition('mail')->getLabel())))); + $this->assertEqual($violations[0]->getMessage(), t('@name field is required.', array('@name' => SafeMarkup::placeholder($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 5f990ca..ec1f517 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -55,19 +55,19 @@ function user_help($route_name, RouteMatchInterface $route_match) { case 'help.page.user': $output = ''; $output .= '

' . t('About') . '

'; - $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('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing users') . '
'; - $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', array('!people' => \Drupal::url('entity.user.collection'))) . '
'; + $output .= '
' . t('Through the People administration page you can add and cancel user accounts and assign users to roles. By editing one particular user you can change their username, email address, password, and information in other fields.', array('@people' => \Drupal::url('entity.user.collection'))) . '
'; $output .= '
' . t('Configuring user roles') . '
'; - $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', array('!roles' => \Drupal::url('entity.user_role.collection'))) . '
'; + $output .= '
' . t('Roles are used to group and classify users; each user can be assigned one or more roles. Typically there are two pre-defined roles: Anonymous user (users that are not logged in), and Authenticated user (users that are registered and logged in). Depending on how your site was set up, an Administrator role may also be available: users with this role will automatically be assigned any new permissions whenever a module is enabled. You can create additional roles on the Roles administration page.', array('@roles' => \Drupal::url('entity.user_role.collection'))) . '
'; $output .= '
' . t('Setting permissions') . '
'; - $output .= '
' . t('After creating roles, you can set permissions for each role on the Permissions page. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('!permissions_user' => \Drupal::url('user.admin_permissions'))) . '
'; + $output .= '
' . t('After creating roles, you can set permissions for each role on the Permissions page. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing content, editing or creating a particular type of content, administering settings for a particular module, or using a particular function of the site (such as search).', array('@permissions_user' => \Drupal::url('user.admin_permissions'))) . '
'; $output .= '
' . t('Managing account settings') . '
'; - $output .= '
' . t('The Account settings page allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', array('!accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; + $output .= '
' . t('The Account settings page allows you to manage settings for the displayed name of the Anonymous user role, personal contact forms, user registration settings, and account cancellation settings. On this page you can also manage settings for account personalization, and adapt the text for the email messages that users receive when they register or request a password recovery. You may also set which role is automatically assigned new permissions whenever a module is enabled (the Administrator role).', array('@accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; $output .= '
' . t('Managing user account fields') . '
'; - $output .= '
' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the Account settings page. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the Field module help page.', array('!field_help'=>(\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', array('name' => 'field')) : '#', '!accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; + $output .= '
' . t('Because User accounts are an entity type, you can extend them by adding fields through the Manage fields tab on the Account settings page. By adding fields for e.g., a picture, a biography, or address, you can a create a custom profile for the users of the website. For background information on entities and fields, see the Field module help page.', array('@field_help'=>(\Drupal::moduleHandler()->moduleExists('field')) ? \Drupal::url('help.page', array('name' => 'field')) : '#', '@accounts' => \Drupal::url('entity.user.admin_form'))) . '
'; $output .= '
'; return $output; @@ -75,10 +75,14 @@ function user_help($route_name, RouteMatchInterface $route_match) { return '

' . 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 e56dcae..b6f4076 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -562,7 +562,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)) { @@ -572,7 +572,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 f9ae57a..500557e 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1545,7 +1545,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { if ($access_plugin->usesOptions()) { $form['markup'] = array( '#prefix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->optionLink(t('settings'), 'access_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected access restriction.', array('@settings' => $this->optionLink(t('settings'), 'access_options'))), '#suffix' => '
', ); } @@ -1583,7 +1583,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['markup'] = array( '#prefix' => '
', '#suffix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected cache mechanism.', array('!settings' => $this->optionLink(t('settings'), 'cache_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected cache mechanism.', array('@settings' => $this->optionLink(t('settings'), 'cache_options'))), ); } break; @@ -1655,7 +1655,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['markup'] = array( '#prefix' => '
', '#suffix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'style_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected style.', array('@settings' => $this->optionLink(t('settings'), 'style_options'))), ); } @@ -1703,7 +1703,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['markup'] = array( '#prefix' => '
', '#suffix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->optionLink(t('settings'), 'row_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected row style.', array('@settings' => $this->optionLink(t('settings'), 'row_options'))), ); } @@ -1798,7 +1798,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['markup'] = array( '#prefix' => '
', '#suffix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'exposed_form_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected style.', array('@settings' => $this->optionLink(t('settings'), 'exposed_form_options'))), ); } break; @@ -1834,7 +1834,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['markup'] = array( '#prefix' => '
', '#suffix' => '
', - '#markup' => $this->t('You may also adjust the !settings for the currently selected pager.', array('!settings' => $this->optionLink(t('settings'), 'pager_options'))), + '#markup' => $this->t('You may also adjust the @settings for the currently selected pager.', array('@settings' => $this->optionLink(t('settings'), 'pager_options'))), ); } diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index 60dd605..52dabbe 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -37,7 +37,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Value type'), '#options' => array( 'date' => $this->t('A date in any machine readable format. CCYY-MM-DD HH:MM:SS is preferred.'), - 'offset' => $this->t('An offset from the current time such as "!example1" or "!example2"', array('!example1' => '+1 day', '!example2' => '-2 hours -30 minutes')), + 'offset' => $this->t('An offset from the current time such as "@example1" or "@example2"', array('@example1' => '+1 day', '@example2' => '-2 hours -30 minutes')), ), '#default_value' => !empty($this->value['type']) ? $this->value['type'] : 'date', ); diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index 9713351..a1ab7d2 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -95,7 +95,7 @@ function operators() { ), 'not' => array( 'title' => $this->t('Does not contain'), - 'short' => $this->t('!has'), + 'short' => $this->t('@has'), 'method' => 'opNotLike', 'values' => 1, ), diff --git a/core/modules/views/src/Tests/Handler/FieldUnitTest.php b/core/modules/views/src/Tests/Handler/FieldUnitTest.php index 7ad9cdc..fa75c1a 100644 --- a/core/modules/views/src/Tests/Handler/FieldUnitTest.php +++ b/core/modules/views/src/Tests/Handler/FieldUnitTest.php @@ -202,25 +202,25 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_0, $row) { return $name_field_0->advancedRender($row); }); - $this->assertEqual($output, $expected_output_0, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_0->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_0, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_0->options['alter']['text'], + '@output' => $output, ])); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_1, $row) { return $name_field_1->advancedRender($row); }); - $this->assertEqual($output, $expected_output_1, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_1->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_1, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_1->options['alter']['text'], + '@output' => $output, ])); $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field_2, $row) { return $name_field_2->advancedRender($row); }); - $this->assertEqual($output, $expected_output_2, format_string('Test token replacement: "!token" gave "!output"', [ - '!token' => $name_field_2->options['alter']['text'], - '!output' => $output, + $this->assertEqual($output, $expected_output_2, format_string('Test token replacement: "@token" gave "@output"', [ + '@token' => $name_field_2->options['alter']['text'], + '@output' => $output, ])); } @@ -233,10 +233,10 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertSubString($output, $random_text, format_string('Make sure the self token (!token => !value) appears in the output (!output)', [ - '!value' => $random_text, - '!output' => $output, - '!token' => $job_field->options['alter']['text'], + $this->assertSubString($output, $random_text, format_string('Make sure the self token (@token => @value) appears in the output (@output)', [ + '@value' => $random_text, + '@output' => $output, + '@token' => $job_field->options['alter']['text'], ])); // Verify the token format used in D7 and earlier does not get substituted. @@ -247,10 +247,10 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertEqual($output, $old_token, format_string('Make sure the old token style (!token => !value) is not changed in the output (!output)', [ - '!value' => $random_text, - '!output' => $output, - '!token' => $job_field->options['alter']['text'], + $this->assertEqual($output, $old_token, format_string('Make sure the old token style (@token => @value) is not changed in the output (@output)', [ + '@value' => $random_text, + '@output' => $output, + '@token' => $job_field->options['alter']['text'], ])); // Verify HTML tags are allowed in rewrite templates while token @@ -280,9 +280,9 @@ public function testFieldTokens() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($job_field, $row) { return $job_field->advancedRender($row); }); - $this->assertEqual($output, $random_text, format_string('Make sure a script tag in the template (!template) is removed, leaving only the replaced token in the output (!output)', [ - '!output' => $output, - '!template' => $rewrite_template, + $this->assertEqual($output, $random_text, format_string('Make sure a script tag in the template (@template) is removed, leaving only the replaced token in the output (@output)', [ + '@output' => $output, + '@template' => $rewrite_template, ])); } diff --git a/core/modules/views/src/Tests/Handler/FieldWebTest.php b/core/modules/views/src/Tests/Handler/FieldWebTest.php index 3ffec6b..75ab2e6 100644 --- a/core/modules/views/src/Tests/Handler/FieldWebTest.php +++ b/core/modules/views/src/Tests/Handler/FieldWebTest.php @@ -564,14 +564,14 @@ public function testTextRendering() { $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field, $row) { return $name_field->advancedRender($row); }); - $this->assertSubString($output, $trimmed_name, format_string('Make sure the trimmed output (!trimmed) appears in the rendered output (!output).', array('!trimmed' => $trimmed_name, '!output' => $output))); - $this->assertNotSubString($output, $row->views_test_data_name, format_string("Make sure the untrimmed value (!untrimmed) shouldn't appear in the rendered output (!output).", array('!untrimmed' => $row->views_test_data_name, '!output' => $output))); + $this->assertSubString($output, $trimmed_name, format_string('Make sure the trimmed output (@trimmed) appears in the rendered output (@output).', array('@trimmed' => $trimmed_name, '@output' => $output))); + $this->assertNotSubString($output, $row->views_test_data_name, format_string("Make sure the untrimmed value (@untrimmed) shouldn't appear in the rendered output (@output).", array('@untrimmed' => $row->views_test_data_name, '@output' => $output))); $name_field->options['alter']['max_length'] = 9; $output = $renderer->executeInRenderContext(new RenderContext(), function () use ($name_field, $row) { return $name_field->advancedRender($row); }); - $this->assertSubString($output, $trimmed_name, format_string('Make sure the untrimmed (!untrimmed) output appears in the rendered output (!output).', array('!trimmed' => $trimmed_name, '!output' => $output))); + $this->assertSubString($output, $trimmed_name, format_string('Make sure the untrimmed (@untrimmed) output appears in the rendered output (@output).', array('@trimmed' => $trimmed_name, '@output' => $output))); // Take word_boundary into account for the tests. $name_field->options['alter']['max_length'] = 5; @@ -615,10 +615,10 @@ public function testTextRendering() { }); if ($tuple['trimmed']) { - $this->assertNotSubString($output, $tuple['value'], format_string('The untrimmed value (!untrimmed) should not appear in the trimmed output (!output).', array('!untrimmed' => $tuple['value'], '!output' => $output))); + $this->assertNotSubString($output, $tuple['value'], format_string('The untrimmed value (@untrimmed) should not appear in the trimmed output (@output).', array('@untrimmed' => $tuple['value'], '@output' => $output))); } if (!empty($tuple['trimmed_value'])) { - $this->assertSubString($output, $tuple['trimmed_value'], format_string('The trimmed value (!trimmed) should appear in the trimmed output (!output).', array('!trimmed' => $tuple['trimmed_value'], '!output' => $output))); + $this->assertSubString($output, $tuple['trimmed_value'], format_string('The trimmed value (@trimmed) should appear in the trimmed output (@output).', array('@trimmed' => $tuple['trimmed_value'], '@output' => $output))); } } diff --git a/core/modules/views/src/Tests/Plugin/ArgumentDefaultTest.php b/core/modules/views/src/Tests/Plugin/ArgumentDefaultTest.php index 58dadf1..a4f9986 100644 --- a/core/modules/views/src/Tests/Plugin/ArgumentDefaultTest.php +++ b/core/modules/views/src/Tests/Plugin/ArgumentDefaultTest.php @@ -94,11 +94,11 @@ function testArgumentDefaultNoOptions() { // Note, the undefined index error has two spaces after it. $error = array( '%type' => 'Notice', - '!message' => 'Undefined index: ' . $argument_type, + '@message' => 'Undefined index: ' . $argument_type, '%function' => 'views_handler_argument->validateOptionsForm()', ); - $message = t('%type: !message in %function', $error); - $this->assertNoRaw($message, t('Did not find error message: !message.', array('!message' => $message))); + $message = t('%type: @message in %function', $error); + $this->assertNoRaw($message, t('Did not find error message: @message.', array('@message' => $message))); } /** diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index 0291027..fe88521 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -482,7 +482,7 @@ function hook_field_views_data(\Drupal\field\FieldStorageConfigInterface $field_ 'id' => 'standard', 'base' => 'file_managed', 'base field' => 'target_id', - 'label' => t('image from !field_name', array('!field_name' => $field_storage->getName())), + 'label' => t('image from @field_name', array('@field_name' => $field_storage->getName())), ); } @@ -526,7 +526,7 @@ function hook_field_views_data_alter(array &$data, \Drupal\field\FieldStorageCon 'field field' => $field_name . '_target_id', 'base' => $entity_type->getBaseTable(), 'base field' => $entity_type->getKey('id'), - 'label' => t('!field_name', array('!field_name' => $field_name)), + 'label' => t('@field_name', array('@field_name' => $field_name)), 'join_extra' => array( 0 => array( 'field' => 'deleted', @@ -583,7 +583,7 @@ function hook_field_views_data_views_data_alter(array &$data, \Drupal\field\Fiel 'field field' => $field_name . '_target_id', 'base' => $entity_type->getBaseTable(), 'base field' => $entity_type->getKey('id'), - 'label' => t('!field_name', array('!field_name' => $field_name)), + 'label' => t('@field_name', array('@field_name' => $field_name)), 'join_extra' => array( 0 => array( 'field' => 'deleted', diff --git a/core/modules/views/views.module b/core/modules/views/views.module index b321940..ea8776f 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -35,14 +35,14 @@ function views_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '

' . t('About') . '

'; $output .= '

' . 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 .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Adding functionality to administrative pages') . '
'; $output .= '
' . t('The Views module adds functionality to some core administration pages. For example, admin/content uses Views to filter and sort content. With Views uninstalled, admin/content is more limited.') . '
'; $output .= '
' . t('Expanding Views functionality') . '
'; - $output .= '
' . t('Contributed projects that support the Views module can be found in the online documentation for Views-related contributed modules.', array('!node' => 'https://www.drupal.org/documentation/modules/views/add-ons')) . '
'; + $output .= '
' . t('Contributed projects that support the Views module can be found in the online documentation for Views-related contributed modules.', array('@node' => 'https://www.drupal.org/documentation/modules/views/add-ons')) . '
'; $output .= '
' . t('Improving table accessibility') . '
'; $output .= '
' . t('Views tables include semantic markup to improve accessibility. Data cells are automatically associated with header cells through id and header attributes. To improve the accessibility of your tables you can add descriptive elements within the Views table settings. The caption element can introduce context for a table, making it easier to understand. The summary element can provide an overview of how the data has been organized and how to navigate the table. Both the caption and summary are visible by default and also implemented according to HTML5 guidelines.') . '
'; $output .= '
' . t('Working with multilingual views') . '
'; diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc index 4f28122..ab15d3f 100644 --- a/core/modules/views/views.views.inc +++ b/core/modules/views/views.views.inc @@ -449,7 +449,7 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora } if ($aliases) { $data[$table_alias][$field_alias]['aliases'] = $aliases; - $data[$table_alias][$field_alias]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known))); + $data[$table_alias][$field_alias]['help'] .= ' ' . t('Also known as: @also.', array('@also' => implode(', ', $also_known))); } $keys = array_keys($field_columns); @@ -497,12 +497,12 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora } if (count($field_columns) == 1 || $column == 'value') { - $title = t('@label (!name)', array('@label' => $label, '!name' => $field_name)); + $title = t('@label (@name)', array('@label' => $label, '@name' => $field_name)); $title_short = $label; } else { - $title = t('@label (!name:!column)', array('@label' => $label, '!name' => $field_name, '!column' => $column)); - $title_short = t('@label:!column', array('@label' => $label, '!column' => $column)); + $title = t('@label (@name:@column)', array('@label' => $label, '@name' => $field_name, '@column' => $column)); + $title_short = t('@label:@column', array('@label' => $label, '@column' => $column)); } // Expose data for the property. @@ -535,10 +535,10 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora foreach ($all_labels as $label_name => $true) { if ($label != $label_name) { if (count($field_columns) == 1 || $column == 'value') { - $alias_title = t('@label (!name)', array('@label' => $label_name, '!name' => $field_name)); + $alias_title = t('@label (@name)', array('@label' => $label_name, '@name' => $field_name)); } else { - $alias_title = t('@label (!name:!column)', array('@label' => $label_name, '!name' => $field_name, '!column' => $column)); + $alias_title = t('@label (@name:@column)', array('@label' => $label_name, '@name' => $field_name, '@column' => $column)); } $aliases[] = array( 'group' => $group_name, @@ -550,7 +550,7 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora } if ($aliases) { $data[$table_alias][$column_real_name]['aliases'] = $aliases; - $data[$table_alias][$column_real_name]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known))); + $data[$table_alias][$column_real_name]['help'] .= ' ' . t('Also known as: @also.', array('@also' => implode(', ', $also_known))); } $data[$table_alias][$column_real_name]['argument'] = array( @@ -589,7 +589,7 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora // Expose additional delta column for multiple value fields. if ($field_storage->isMultiple()) { - $title_delta = t('@label (!name:delta)', array('@label' => $label, '!name' => $field_name)); + $title_delta = t('@label (@name:delta)', array('@label' => $label, '@name' => $field_name)); $title_short_delta = t('@label:delta', array('@label' => $label)); $data[$table_alias]['delta'] = array( diff --git a/core/modules/views_ui/src/Form/Ajax/AddHandler.php b/core/modules/views_ui/src/Form/Ajax/AddHandler.php index a60da37..cc7d6d9 100644 --- a/core/modules/views_ui/src/Form/Ajax/AddHandler.php +++ b/core/modules/views_ui/src/Form/Ajax/AddHandler.php @@ -139,7 +139,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { foreach ($group_options as $key => $option) { $form['options']['name'][$key] = array( '#type' => 'checkbox', - '#title' => $this->t('!group: !field', array('!group' => $option['group'], '!field' => $option['title'])), + '#title' => $this->t('@group: @field', array('@group' => $option['group'], '@field' => $option['title'])), '#description' => $option['help'], '#return_value' => $key, '#prefix' => "
", diff --git a/core/modules/views_ui/src/Form/BreakLockForm.php b/core/modules/views_ui/src/Form/BreakLockForm.php index 82f1f6f..89f0ce0 100644 --- a/core/modules/views_ui/src/Form/BreakLockForm.php +++ b/core/modules/views_ui/src/Form/BreakLockForm.php @@ -79,7 +79,7 @@ public function getDescription() { '#theme' => 'username', '#account' => $account, ); - return $this->t('By breaking this lock, any unsaved changes made by !user will be lost.', array('!user' => drupal_render($username))); + return $this->t('By breaking this lock, any unsaved changes made by @user will be lost.', array('@user' => drupal_render($username))); } /** diff --git a/core/modules/views_ui/src/Tests/DisplayTest.php b/core/modules/views_ui/src/Tests/DisplayTest.php index 20667de..4f145c7 100644 --- a/core/modules/views_ui/src/Tests/DisplayTest.php +++ b/core/modules/views_ui/src/Tests/DisplayTest.php @@ -225,16 +225,16 @@ public function testActionLinks() { $display_title_path = 'admin/structure/views/nojs/display/test_display/block_1/display_title'; $this->drupalPostForm($display_title_path, array('display_title' => $display_title), t('Apply')); - $placeholder = array('!display_title' => $display_title); + $placeholder = array('@display_title' => $display_title); // Ensure that the dropdown buttons are displayed correctly. - $this->assertFieldByXpath('//input[@type="submit"]', t('Duplicate !display_title', $placeholder)); - $this->assertFieldByXpath('//input[@type="submit"]', t('Delete !display_title', $placeholder)); - $this->assertFieldByXpath('//input[@type="submit"]', t('Disable !display_title', $placeholder)); - $this->assertNoFieldByXpath('//input[@type="submit"]', t('Enable !display_title', $placeholder)); + $this->assertFieldByXpath('//input[@type="submit"]', t('Duplicate @display_title', $placeholder)); + $this->assertFieldByXpath('//input[@type="submit"]', t('Delete @display_title', $placeholder)); + $this->assertFieldByXpath('//input[@type="submit"]', t('Disable @display_title', $placeholder)); + $this->assertNoFieldByXpath('//input[@type="submit"]', t('Enable @display_title', $placeholder)); // Disable the display so we can test the rendering of the "Enable" button. - $this->drupalPostForm(NULL, NULL, t('Disable !display_title', $placeholder)); - $this->assertFieldByXpath('//input[@type="submit"]', t('Enable !display_title', $placeholder)); - $this->assertNoFieldByXpath('//input[@type="submit"]', t('Disable !display_title', $placeholder)); + $this->drupalPostForm(NULL, NULL, t('Disable @display_title', $placeholder)); + $this->assertFieldByXpath('//input[@type="submit"]', t('Enable @display_title', $placeholder)); + $this->assertNoFieldByXpath('//input[@type="submit"]', t('Disable @display_title', $placeholder)); } } diff --git a/core/modules/views_ui/src/Tests/ViewEditTest.php b/core/modules/views_ui/src/Tests/ViewEditTest.php index 3595aa2..e706830 100644 --- a/core/modules/views_ui/src/Tests/ViewEditTest.php +++ b/core/modules/views_ui/src/Tests/ViewEditTest.php @@ -105,7 +105,7 @@ public function testEditFormLanguageOptions() { $this->assertResponse(200); $langcode_url = 'admin/structure/views/nojs/display/' . $view_name . '/' . $display . '/rendering_language'; $this->assertNoLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertNoLink(t('Content language of view row')); } @@ -122,12 +122,12 @@ public function testEditFormLanguageOptions() { $langcode_url = 'admin/structure/views/nojs/display/' . $view_name . '/' . $display . '/rendering_language'; if ($view_name == 'test_view') { $this->assertNoLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertNoLink(t('Content language of view row')); } else { $this->assertLinkByHref($langcode_url); - $this->assertNoLink(t('!type language selected for page', array('!type' => t('Content')))); + $this->assertNoLink(t('@type language selected for page', array('@type' => t('Content')))); $this->assertLink(t('Content language of view row')); } diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index 8cd4e7b..de2f29c 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -139,14 +139,14 @@ public function form(array $form, FormStateInterface $form_state) { '#account' => $this->entityManager->getStorage('user')->load($view->lock->owner), ); $lock_message_substitutions = array( - '!user' => drupal_render($username), - '!age' => $this->dateFormatter->formatTimeDiffSince($view->lock->updated), + '@user' => drupal_render($username), + '@age' => $this->dateFormatter->formatTimeDiffSince($view->lock->updated), '@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, ); } @@ -402,7 +402,7 @@ public function getDisplayDetails($view, $display) { if (!$is_enabled) { $build['top']['actions']['enable'] = array( '#type' => 'submit', - '#value' => $this->t('Enable !display_title', array('!display_title' => $display_title)), + '#value' => $this->t('Enable @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayEnable', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -425,7 +425,7 @@ public function getDisplayDetails($view, $display) { } $build['top']['actions']['path'] = array( '#type' => 'link', - '#title' => $this->t('View !display_title', array('!display_title' => $display_title)), + '#title' => $this->t('View @display_title', array('@display_title' => $display_title)), '#options' => array('alt' => array($this->t("Go to the real page for this display"))), '#url' => $url, '#prefix' => '
  • ', @@ -436,7 +436,7 @@ public function getDisplayDetails($view, $display) { if (!$is_default) { $build['top']['actions']['duplicate'] = array( '#type' => 'submit', - '#value' => $this->t('Duplicate !display_title', array('!display_title' => $display_title)), + '#value' => $this->t('Duplicate @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayDuplicate', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -446,7 +446,7 @@ public function getDisplayDetails($view, $display) { // Always allow a display to be deleted. $build['top']['actions']['delete'] = array( '#type' => 'submit', - '#value' => $this->t('Delete !display_title', array('!display_title' => $display_title)), + '#value' => $this->t('Delete @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayDelete', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -460,7 +460,7 @@ public function getDisplayDetails($view, $display) { $build['top']['actions']['duplicate_as'][$type] = array( '#type' => 'submit', - '#value' => $this->t('Duplicate as !type', array('!type' => $label)), + '#value' => $this->t('Duplicate as @type', array('@type' => $label)), '#limit_validation_errors' => array(), '#submit' => array('::submitDuplicateDisplayAsType', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -471,7 +471,7 @@ public function getDisplayDetails($view, $display) { else { $build['top']['actions']['undo_delete'] = array( '#type' => 'submit', - '#value' => $this->t('Undo delete of !display_title', array('!display_title' => $display_title)), + '#value' => $this->t('Undo delete of @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayUndoDelete', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -481,7 +481,7 @@ public function getDisplayDetails($view, $display) { if ($is_enabled) { $build['top']['actions']['disable'] = array( '#type' => 'submit', - '#value' => $this->t('Disable !display_title', array('!display_title' => $display_title)), + '#value' => $this->t('Disable @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayDisable', '::submitDelayDestination'), '#prefix' => '
  • ', @@ -755,14 +755,14 @@ public function renderDisplayTop(ViewUI $view) { foreach (Views::fetchPluginNames('display', NULL, array($view->get('base_table'))) as $type => $label) { $element['add_display'][$type] = array( '#type' => 'submit', - '#value' => $this->t('Add !display', array('!display' => $label)), + '#value' => $this->t('Add @display', array('@display' => $label)), '#limit_validation_errors' => array(), '#submit' => array('::submitDisplayAdd', '::submitDelayDestination'), '#attributes' => array('class' => array('add-display')), // Allow JavaScript to remove the 'Add ' prefix from the button label when // placing the button in a "Add" dropdown menu. '#process' => array_merge(array('views_ui_form_button_was_clicked'), $this->elementInfo->getInfoProperty('submit', '#process', array())), - '#values' => array($this->t('Add !display', array('!display' => $label)), $label), + '#values' => array($this->t('Add @display', array('@display' => $label)), $label), ); } @@ -1134,10 +1134,10 @@ public function getFormBucket(ViewUI $view, $type, $display) { foreach ($contents as $key => $pid) { if ($key != $last) { if ($group_info['groups'][$gid] == 'OR') { - $store[$pid]['#link'] = $this->t('!link    OR', ['!link' => $store[$pid]['#link']]); + $store[$pid]['#link'] = $this->t('@link    OR', ['@link' => $store[$pid]['#link']]); } else { - $store[$pid]['#link'] = $this->t('!link    AND', ['!link' => $store[$pid]['#link']]); + $store[$pid]['#link'] = $this->t('@link    AND', ['@link' => $store[$pid]['#link']]); } } $build['fields'][$pid] = $store[$pid]; diff --git a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php index ead6469..838f0c8 100644 --- a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php @@ -39,7 +39,7 @@ public function testRandomStringUniqueness() { $random = new Random(); for ($i = 0; $i <= 50; $i++) { $str = $random->string(1, TRUE); - $this->assertFalse(isset($strings[$str]), SafeMarkup::format('Generated duplicate random string !string', array('!string' => $str))); + $this->assertFalse(isset($strings[$str]), SafeMarkup::format('Generated duplicate random string @string', array('@string' => $str))); $strings[$str] = TRUE; } } @@ -54,7 +54,7 @@ public function testRandomNamesUniqueness() { $random = new Random(); for ($i = 0; $i <= 10; $i++) { $str = $random->name(1, TRUE); - $this->assertFalse(isset($names[$str]), SafeMarkup::format('Generated duplicate random name !name', array('!name' => $str))); + $this->assertFalse(isset($names[$str]), SafeMarkup::format('Generated duplicate random name @name', array('@name' => $str))); $names[$str] = TRUE; } } diff --git a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php index 5189531..0ca0f16 100644 --- a/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php @@ -98,7 +98,7 @@ public function testStaticTitleWithParameter($title, $expected_title) { $this->translationManager->expects($this->once()) ->method('translate') - ->with($title, $this->logicalOr($this->arrayHasKey('@test'), $this->arrayHasKey('%test'), $this->arrayHasKey('!test')), array()) + ->with($title, $this->logicalOr($this->arrayHasKey('@test'), $this->arrayHasKey('%test'), $this->arrayHasKey('@test')), array()) ->will($this->returnValue('static title value')); $this->assertEquals($expected_title, $this->titleResolver->getTitle($request, $route)); diff --git a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php index d701991..708c444 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormValidatorTest.php @@ -468,7 +468,7 @@ public function providerTestPerformRequiredValidation() { '#maxlength' => 7, '#value' => $this->randomMachineName(8), ), - SafeMarkup::format('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => 'Test', '%max' => '7', '%length' => 8)), + SafeMarkup::format('@name cannot be longer than %max characters but is currently %length characters long.', array('@name' => 'Test', '%max' => '7', '%length' => 8)), FALSE, ), );