Index: active_translation.batch.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.batch.inc,v
retrieving revision 1.2
diff -u -p -r1.2 active_translation.batch.inc
--- active_translation.batch.inc	20 May 2008 06:14:37 -0000	1.2
+++ active_translation.batch.inc	22 May 2008 23:10:03 -0000
@@ -19,8 +19,10 @@ function active_translation_build_batch_
 
 function _active_translation_batch_operation(&$context) {
   if (empty($context['sandbox'])) {
-    // Initiate multistep processing.
-    $context['sandbox']['languages'] = array_keys(locale_language_list('name', TRUE));
+    watchdog('active_translation', 'Rebuilding the active translation table.');
+
+    // Initiate multistep processing. Call language_list() and reset its cache.
+    $context['sandbox']['languages'] = array_keys(language_list('language', TRUE));
     $context['sandbox']['progress'] = 0;
     $context['sandbox']['current_translation'] = 0;
     $context['sandbox']['max'] = db_result(db_query('SELECT COUNT(DISTINCT tnid) FROM {node} WHERE tnid <> 0'));
Index: active_translation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.install,v
retrieving revision 1.2
diff -u -p -r1.2 active_translation.install
--- active_translation.install	20 May 2008 06:14:37 -0000	1.2
+++ active_translation.install	22 May 2008 23:10:04 -0000
@@ -62,15 +62,15 @@ function active_translation_schema() {
     'primary key' => array('atid'),
   );
 
-  // And dynamically assemble the table with a column per language.
-  foreach (locale_language_list('name', TRUE) as $code => $name) {
-    $field = db_escape_table($code);
+  // And dynamically assemble the table with a column per languages. Call
+  // language_list() with $reset = TRUE in case the languages have changed.
+  foreach (language_list('language', TRUE) as $lang_code => $language) {
+    $field = db_escape_table($lang_code);
     $schema['active_translation']['fields'][$field] = array(
-      'description' => t('The node id of the that should be used when %language is the active language.', array('%language' => $name)),
+      'description' => t('The node id of the that should be used when %language is the active language.', array('%language' => t($language->name))),
       'type' => 'int',
       'unsigned' => TRUE,
       'not null' => TRUE,
-      'default' => 0,
     );
     $schema['active_translation']['indexes'][$field] = array($field);
   }
Index: active_translation.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/active_translation/active_translation.module,v
retrieving revision 1.2
diff -u -p -r1.2 active_translation.module
--- active_translation.module	20 May 2008 06:14:37 -0000	1.2
+++ active_translation.module	22 May 2008 23:10:04 -0000
@@ -143,7 +143,7 @@ function _active_translation_language_su
   if (empty($subs)) {
     // Break everything up by language.
     $chunks = array();
-    foreach (locale_language_list('name', TRUE) as $lang_code => $name) {
+    foreach (language_list('language', TRUE) as $lang_code => $language) {
       $parts = explode('-', $lang_code);
       if (count($parts) == 2) {
         $chunks[$parts[0]][] = $lang_code;
@@ -174,7 +174,7 @@ function _active_translation_language_su
  * @return array with translation mapping.
  */
 function active_translation_recompute($node) {
-  $languages = array_keys(locale_language_list('name', TRUE));
+  $languages = array_keys(language_list('language'));
 
   if (empty($node->tnid)) {
     // If there are no tranlsations use this for all languages.
