Standardise on either @placeholder or :placeholder for non-attribute URLs in t()

Created on 22 September 2015, over 9 years ago
Updated 13 April 2023, over 1 year ago

Follow-up from #2570355: Replace remaining !placeholder and @placeholder with :placeholder for URLs .

+++ b/core/includes/install.core.inc
@@ -1907,7 +1907,7 @@ function install_check_translations($langcode, $server_pattern) {
+      '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 <a href=":server_url">!server_url</a>.', array(':server_url' => $server_url, '!server_url' => $server_url)),

Note that !server_url is not converted, because it's not in an attribute.

The following two are from git diff --color-words

array('@:url' => $url, 'ht
tps://www.drupal.org/SA-CORE-2013-003@url' => $url
 '#markup' => t('To run cron from outside the site, go to <a href="@cron:url">@cron</a>', ['@cron' => \Drupal:::url('system.cron', ['key' => \Drupal::state()->get('system.cron_key')$cron_url,[ 'absolute@cron' => TRUE]])$cron_url]),

@placeholder is fine here, since these aren't in attributes, but possibly we could move to :url anyway.

Remaining tasks:

Pick @placeholder or :placeholder then convert the ! and make sure the rest of core is consistent

📌 Task
Status

Closed: outdated

Version

9.5

Component
Documentation 

Last updated 2 days ago

No maintainer
Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Documentation

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024