Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.132
diff -u -p -r1.132 install.inc
--- includes/install.inc	24 Apr 2010 14:53:59 -0000	1.132
+++ includes/install.inc	26 Apr 2010 17:53:02 -0000
@@ -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);
 }
 
 /**
Index: modules/locale/locale.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v
retrieving revision 1.69
diff -u -p -r1.69 locale.test
--- modules/locale/locale.test	31 Mar 2010 20:05:06 -0000	1.69
+++ modules/locale/locale.test	26 Apr 2010 17:53:03 -0000
@@ -1969,3 +1969,28 @@ class LocalizeDateFormatsFunctionalTest 
     $this->assertText($french_date, t('French date format appears'));
   }
 }
+
+/**
+ *  Test for making sure the t() and st() functions have matching signatures
+ */
+class LocaleTSignatureTest extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 't() and st() signature checks',
+      'description' => 'Tests that the number and types of arguments for t() and st() are the same.',
+      'group' => 'Locale',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('locale');
+  }
+
+  function testStSignature() {
+    $reflector_t = new ReflectionFunction('t');
+    $reflector_st = new ReflectionFunction('st');
+    $params_t = $reflector_t->getParameters();
+    $params_st = $reflector_st->getParameters();
+    $this->assert(($params_t == $params_st), t('The t() and st() function signatures must match.'));
+  }
+}
