From e8df1cd6911b8f5a75e67a731fcb44b36581b8b4 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 28 Apr 2010 05:12:43 +0000 Subject: #654726 by bdurbin, sun, plach, et al: Fixed Installing Drupal 7 in non-English language doesn't pick up st() installation lists. --- includes/install.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/install.inc b/includes/install.inc index 11b1a35c2..23a7137b8 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -849,10 +849,14 @@ function install_goto($path) { * @see t() * @ingroup sanitization */ -function st($string, $args = array()) { +function st($string, array $args = array(), array $options = array()) { static $locale_strings = NULL; global $install_state; + if (empty($options['context'])) { + $options['context'] = ''; + } + if (!isset($locale_strings)) { $locale_strings = array(); if (isset($install_state['parameters']['profile']) && isset($install_state['parameters']['locale'])) { @@ -883,7 +887,7 @@ function st($string, $args = array()) { case '!': } } - return strtr((!empty($locale_strings[$string]) ? $locale_strings[$string] : $string), $args); + return strtr((!empty($locale_strings[$options['context']][$string]) ? $locale_strings[$options['context']][$string] : $string), $args); } /** -- cgit v1.2.3