Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.205
diff -u -p -r1.205 locale.inc
--- includes/locale.inc	22 Feb 2009 17:55:29 -0000	1.205
+++ includes/locale.inc	2 Mar 2009 00:00:52 -0000
@@ -886,7 +886,9 @@ function locale_translate_edit_form(&$fo
   // This ensures that the languages are always in the same order in forms.
   $languages = language_list();
   $default = language_default();
-  // We don't need the default language value, that value is in $source.
+  // Do not display translation status for the language of the source string.
+  // The source is assumed to be in English for the default text group, and in
+  // the default language for other text groups.
   $omit = $source->textgroup == 'default' ? 'en' : $default->language;
   unset($languages[($omit)]);
   $form['translations'] = array('#tree' => TRUE);
@@ -2132,6 +2134,7 @@ function _locale_translate_seek() {
   $arr = array();
   while ($locale = db_fetch_object($result)) {
     $arr[$locale->lid]['group'] = $groups[$locale->textgroup];
+    $arr[$locale->lid]['textgroup'] = $locale->textgroup;
     $arr[$locale->lid]['languages'][$locale->language] = $locale->translation;
     $arr[$locale->lid]['location'] = $locale->location;
     $arr[$locale->lid]['source'] = $locale->source;
@@ -2141,7 +2144,7 @@ function _locale_translate_seek() {
     $rows[] = array(
       $value['group'],
       array('data' => check_plain(truncate_utf8($value['source'], 150, FALSE, TRUE)) . '<br /><small>' . $value['location'] . '</small>'),
-      array('data' => _locale_translate_language_list($value['languages'], $limit_language), 'align' => 'center'),
+      array('data' => _locale_translate_language_list($value['languages'], $value['textgroup'], $limit_language), 'align' => 'center'),
       array('data' => l(t('edit'), "admin/build/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
       array('data' => l(t('delete'), "admin/build/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
     );
@@ -2343,12 +2346,16 @@ function _locale_rebuild_js($langcode = 
 /**
  * List languages in search result table
  */
-function _locale_translate_language_list($translation, $limit_language) {
+function _locale_translate_language_list($translation, $textgroup, $limit_language) {
   // Add CSS.
   drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css', array('preprocess' => FALSE));
 
   $languages = language_list();
-  unset($languages['en']);
+  $default = language_default();
+  // The default language value is assumed to be English for the 'default'
+  // textgroup and in the site default language for other textgroups.
+  $omit = $textgroup == 'default' ? 'en' : $default->language;
+  unset($languages[$omit]);
   $output = '';
   foreach ($languages as $langcode => $language) {
     if (!$limit_language || $limit_language == $langcode) {
Index: modules/locale/locale.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v
retrieving revision 1.19
diff -u -p -r1.19 locale.test
--- modules/locale/locale.test	24 Feb 2009 16:46:52 -0000	1.19
+++ modules/locale/locale.test	2 Mar 2009 00:00:54 -0000
@@ -32,7 +32,59 @@ class LocaleConfigurationTest extends Dr
   }
 
   function setUp() {
-    parent::setUp('locale');
+    parent::setUp('locale', 'locale_test');
+  }
+
+  function testTextGroup() {
+    $admin_user = $this->drupalCreateUser(array('administer languages', 'translate interface', 'access administration pages'));
+
+    // Generate a new custom language.
+    $langcode = substr($this->randomName(), 0, 2);
+    $string = $this->randomName(5);
+    $native = $this->randomName(5);
+    $prefix = $langcode;
+
+    // Add language.
+    $this->drupalLogin($admin_user);
+    $edit = array();
+    $edit['langcode'] = $langcode;
+    $edit['name'] = $string;
+    $edit['native'] = $native;
+    $edit['prefix'] = $prefix;
+    $edit['direction'] = '0';
+    $this->drupalPost('admin/settings/language/add', $edit, t('Add custom language'));
+
+    // Set the new language as the site default.
+    $edit = array();
+    $edit['site_default'] = $langcode;
+    $this->drupalPost('admin/settings/language', $edit, t('Save configuration'));
+
+    // Add the string to the locale table by calling t().
+    t($string, array(), $langcode);
+
+    // Update the string's so that it is not in the default.
+    db_update('locales_source')
+      ->fields(array(
+        'textgroup' => 'locale_test',
+      ))
+      ->condition('source', $string, '=')
+      ->execute();
+
+    // Reset the locale cache.
+    locale(NULL, NULL, TRUE);
+
+    // Search for the string.
+    $edit = array();
+    $edit['string'] = $string;
+    $edit['group'] = 'locale_test';
+    $this->drupalPost('admin/build/translate/search', $edit, t('Search'));
+
+    // Confirm that the string is shown as untranslated in English.
+    $this->assertRaw('<em class="locale-untranslated">en</em>', t('String is shown as untranslated in English'));
+
+    // Confirm that the string is not shown as untranslated in the site
+    // default language.
+    $this->assertNoRaw('<em class="locale-untranslated">' . $langcode . '</em>', t('String is not shown as untranslated in the site default language'));
   }
 
   /**
@@ -213,6 +265,7 @@ class LocaleTranslationFunctionalTest ex
     $this->drupalPost('admin/settings/language/add', $edit, t('Add custom language'));
     // Add string.
     t($name, array(), $langcode);
+
     // Reset locale cache.
     locale(NULL, NULL, TRUE);
     $this->assertText($langcode, t('Language code found.'));
