summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2015-04-18 16:33:48 (GMT)
committerxjm2015-04-18 16:34:05 (GMT)
commit1bf9f3883be274732e3338dd9034bf9e3792dbb5 (patch)
tree71c2334047488a89b01ccefcc6049fbcf4d26f03
parent7e8d2129c43a43824325872c3268a19d8c4acb74 (diff)
Issue #2472187 by Cinnead, jhodgdon: t() docs should not use @code inline
-rw-r--r--core/includes/bootstrap.inc29
1 files changed, 15 insertions, 14 deletions
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 419d637..eeacd7a 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -383,31 +383,32 @@ function _drupal_set_preferred_header_name($name = NULL) {
* break up strings for translation.
*
* @section sec_translating_vars Translating Variables
- * You should never use t() to translate variables, such as calling
- * @code t($text); @endcode, unless the text that the variable holds has been
- * passed through t() elsewhere (e.g., $text is one of several translated
- * literal strings in an array). It is especially important never to call
- * @code t($user_text); @endcode, where $user_text is some text that a user
- * entered - doing that can lead to cross-site scripting and other security
- * problems. However, you can use variable substitution in your string, to put
- * variable text such as user names or link URLs into translated text. Variable
- * substitution looks like this:
+ * You should never use t() to translate variables, such as calling t($text)
+ * unless the text that the variable holds has been passed through t()
+ * elsewhere (e.g., $text is one of several translated literal strings in an
+ * array). It is especially important never to call t($user_text) where
+ * $user_text is some text that a user entered - doing that can lead to
+ * cross-site scripting and other security problems. However, you can use
+ * variable substitution in your string, to put variable text such as user
+ * names or link URLs into translated text. Variable substitution looks like
+ * this:
* @code
* $text = t("@name's blog", array('@name' => user_format_name($account)));
* @endcode
* Basically, you can put variables like @name into your string, and t() will
* substitute their sanitized values at translation time. (See the
* Localization API pages referenced above and the documentation of
- * format_string() for details about how to define variables in your string.)
- * Translators can then rearrange the string as necessary for the language
- * (e.g., in Spanish, it might be "blog de @name").
+ * \Drupal\Component\Utility\SafeMarkup::format() for details about how to
+ * define variables in your string.). Translators can then rearrange the string
+ * as necessary for the language (e.g., in Spanish, it might be "blog de
+ * @name").
*
* @param $string
* A string containing the English string to translate.
* @param $args
* An associative array of replacements to make after translation. Based
* on the first character of the key, the value is escaped and/or themed.
- * See format_string() for details.
+ * See \Drupal\Component\Utility\SafeMarkup::format() for details.
* @param $options
* An associative array of additional options, with the following elements:
* - 'langcode' (defaults to the current language): The language code to
@@ -418,7 +419,7 @@ function _drupal_set_preferred_header_name($name = NULL) {
* @return
* The translated string.
*
- * @see format_string()
+ * @see \Drupal\Component\Utility\SafeMarkup::format()
* @ingroup sanitization
*/
function t($string, array $args = array(), array $options = array()) {