Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.207
diff -u -p -r1.207 system.admin.inc
--- modules/system/system.admin.inc	30 Sep 2009 13:09:30 -0000	1.207
+++ modules/system/system.admin.inc	4 Oct 2009 01:07:08 -0000
@@ -201,7 +201,7 @@ function system_settings_overview() {
 function system_themes_form() {
 
   $themes = system_get_theme_data();
-  uasort($themes, 'system_sort_modules_by_info_name');
+  uasort($themes, 'system_sort_themes_by_info_name');
 
   $status = array();
   $incompatible_core = array();
@@ -224,14 +224,14 @@ function system_themes_form() {
         break;
       }
     }
-    $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => array('screenshot')), FALSE) : t('no screenshot');
+    $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => t($theme->info['name'], array(), array('context' => 'Theme name')))), '', array('class' => array('screenshot')), FALSE) : t('no screenshot');
 
     $form[$theme->name]['screenshot'] = array('#markup' => $screenshot);
     $form[$theme->name]['info'] = array(
       '#type' => 'value',
       '#value' => $theme->info,
     );
-    $options[$theme->name] = $theme->info['name'];
+    $options[$theme->name] = t($theme->info['name'], array(), array('context' => 'Theme name'));
 
     if (drupal_theme_access($theme)) {
       $form[$theme->name]['operations'] = array('#markup' => l(t('configure'), 'admin/appearance/settings/' . $theme->name) );
@@ -557,7 +557,7 @@ function system_theme_settings($form, &$
     if (function_exists($function)) {
       $group = $function($settings, $form);
       if (!empty($group)) {
-        $form['theme_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $themes[$key]->info['name'])));
+        $form['theme_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => t($themes[$key]->info['name'], array(), array('context' => 'Theme name')))));
         $form['theme_specific'] = array_merge($form['theme_specific'], $group);
       }
     }
@@ -667,23 +667,24 @@ function system_modules($form, $form_sta
     // If this module requires other modules, add them to the array.
     foreach ($module->requires as $requires => $v) {
       if (!isset($files[$requires])) {
+        // Display the module filename, because module name is not known.
         $extra['requires'][$requires] = t('@module (<span class="admin-missing">missing</span>)', array('@module' => drupal_ucfirst($requires)));
         $extra['disabled'] = TRUE;
       }
       else {
-        $requires_name = $files[$requires]->info['name'];
+        $module_name = t($files[$requires]->info['name'], array(), array('context' => 'Module name'));
         if ($incompatible_version = drupal_check_incompatibility($v, str_replace(DRUPAL_CORE_COMPATIBILITY . '-', '', $files[$requires]->info['version']))) {
           $extra['requires'][$requires] = t('@module (<span class="admin-missing">incompatible with</span> version @version)', array(
-            '@module' => $requires_name . $incompatible_version,
+            '@module' => $module_name . $incompatible_version,
             '@version' => $files[$requires]->info['version'],
           ));
           $extra['disabled'] = TRUE;
         }
         elseif ($files[$requires]->status) {
-          $extra['requires'][$requires] = t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => $requires_name));
+          $extra['requires'][$requires] = t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => $module_name));
         }
         else {
-          $extra['requires'][$requires] = t('@module (<span class="admin-disabled">disabled</span>)', array('@module' => $requires_name));
+          $extra['requires'][$requires] = t('@module (<span class="admin-disabled">disabled</span>)', array('@module' => $module_name));
         }
       }
     }
@@ -701,12 +702,13 @@ function system_modules($form, $form_sta
     foreach ($module->required_by as $required_by => $v) {
       // Hidden modules are unset already.
       if (isset($files[$required_by])) {
+        $module_name = t($files[$required_by]->info['name'], array(), array('context' => 'Module name'));
         if ($files[$required_by]->status == 1) {
-          $extra['required_by'][] = t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => $files[$required_by]->info['name']));
+          $extra['required_by'][] = t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => $module_name));
           $extra['disabled'] = TRUE;
         }
         else {
-          $extra['required_by'][] = t('@module (<span class="admin-disabled">disabled</span>)', array('@module' => $files[$required_by]->info['name']));
+          $extra['required_by'][] = t('@module (<span class="admin-disabled">disabled</span>)', array('@module' => $module_name));
         }
       }
     }
@@ -738,10 +740,21 @@ function system_modules($form, $form_sta
 }
 
 /**
- * Array sorting callback; sorts modules or themes by their name.
+ * Array sorting callback; sorts modules by their name.
  */
 function system_sort_modules_by_info_name($a, $b) {
-  return strcasecmp($a->info['name'], $b->info['name']);
+  $module_a = t($a->info['name'], array(), array('context' => 'Module name'));
+  $module_b = t($b->info['name'], array(), array('context' => 'Module name'));
+  return strcasecmp($module_a, $module_b);
+}
+
+/**
+ * Array sorting callback; sorts themes by their name.
+ */
+function system_sort_themes_by_info_name($a, $b) {
+  $theme_a = t($a->info['name'], array(), array('context' => 'Theme name'));
+  $theme_b = t($b->info['name'], array(), array('context' => 'Theme name'));
+  return strcasecmp($theme_a, $theme_b);
 }
 
 /**
@@ -761,7 +774,7 @@ function _system_modules_build_row($info
   );
   // Set the basic properties.
   $form['name'] = array(
-    '#markup' => t($info['name']),
+    '#markup' => t($info['name'], array(), array('context' => 'Module name')),
   );
   $form['description'] = array(
     '#markup' => t($info['description']),
@@ -841,7 +854,7 @@ function system_modules_confirm_form($mo
 
   foreach ($storage['more_modules'] as $info) {
     $t_argument = array(
-      '@module' => $info['name'],
+      '@module' => t($info['name'], array(), array('context' => 'Module name')),
       '@required' => implode(', ', $info['requires']),
     );
     $items[] = format_plural(count($info['requires']), 'You must enable the @required module to install @module.', 'You must enable the @required modules to install @module.', $t_argument);
@@ -913,9 +926,9 @@ function system_modules_submit($form, &$
         foreach ($form['modules'][$module['group']][$name]['#requires'] as $requires => $v) {
           if (!$modules[$requires]['enabled']) {
             if (!isset($more_modules[$name])) {
-              $more_modules[$name]['name'] = $files[$name]->info['name'];
+              $more_modules[$name]['name'] = t($files[$name]->info['name'], array(), array('context' => 'Module name'));
             }
-            $more_modules[$name]['requires'][$requires] = $files[$requires]->info['name'];
+            $more_modules[$name]['requires'][$requires] = t($files[$requires]->info['name'], array(), array('context' => 'Module name'));
           }
           $modules[$requires] = array('group' => $files[$requires]->info['package'], 'enabled' => TRUE);
         }
@@ -1052,7 +1065,7 @@ function system_modules_uninstall($form,
     // If the hook exists, the module can be uninstalled.
     module_load_install($module->name);
     if (module_hook($module->name, 'uninstall') || module_hook($module->name, 'schema')) {
-      $form['modules'][$module->name]['name'] = array('#markup' => $info['name'] ? $info['name'] : $module->name);
+      $form['modules'][$module->name]['name'] = array('#markup' => $info['name'] ? t($info['name'], array(), array('context' => 'Module name')) : $module->name);
       $form['modules'][$module->name]['description'] = array('#markup' => t($info['description']));
       $options[$module->name] = '';
     }
@@ -1095,7 +1108,7 @@ function system_modules_uninstall_confir
   // Construct the hidden form elements and list items.
   foreach (array_filter($storage['uninstall']) as $module => $value) {
     $info = drupal_parse_info_file(dirname(drupal_get_filename('module', $module)) . '/' . $module . '.info');
-    $uninstall[] = $info['name'];
+    $uninstall[] = t($info['name'], array(), array('context' => 'Module name'));
     $form['uninstall'][$module] = array('#type' => 'hidden',
       '#value' => 1,
     );
@@ -1924,7 +1937,7 @@ function system_php() {
 function system_batch_page() {
   require_once DRUPAL_ROOT . '/includes/batch.inc';
   $output = _batch_page();
-  
+
   // Use the same theme that the page that started the batch.
   $batch = &batch_get();
   $GLOBALS['custom_theme'] = $batch['theme'];
@@ -2074,7 +2087,7 @@ function theme_system_admin_by_module($m
     // Output links
     if (count($items)) {
       $block = array();
-      $block['title'] = $module;
+      $block['title'] = t($module, array(), array('context' => 'Module name'));
       $block['content'] = theme('item_list', $items);
       $block['description'] = t($description);
       $block['show'] = TRUE;
@@ -2276,7 +2289,7 @@ function theme_system_themes_form($form)
     }
 
     // Style theme info
-    $theme = '<div class="theme-info"><h2>' . $info['name'] . '</h2><div class="description">' . $description . '</div></div>';
+    $theme = '<div class="theme-info"><h2>' . t($info['name'], array(), array('context' => 'Theme name')) . '</h2><div class="description">' . $description . '</div></div>';
 
     // Build rows
     $row = array();
