Index: i18nsync/i18nsync.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/i18n/i18nsync/i18nsync.module,v
retrieving revision 1.1.2.6
diff -u -p -w -r1.1.2.6 i18nsync.module
--- i18nsync/i18nsync.module	24 Jun 2008 11:17:34 -0000	1.1.2.6
+++ i18nsync/i18nsync.module	8 Aug 2008 20:09:23 -0000
@@ -178,7 +178,31 @@ function i18nsync_prepare_translation(&$
 function i18nsync_node_translation($node, $translation, $fields, $op) {
   // Load full node, we need all data here
   $translation = node_load($translation->nid);
+
+  // Collect info on any CCK fields.
+  $content = module_invoke('content', 'types', $node->type);
+
   foreach ($fields as $field) {
+    // Check for CCK fields first
+    if (isset($content['fields'][$field])) {
+      dvm($node->$field);
+      switch ($content['fields'][$field]['type']) {
+        // TODO take type specific actions.
+        case 'filefield':
+        case 'imagefield':
+          dvm($content['fields'][$field]);
+          break;
+
+        default:
+          // For fields that don't need special handling
+          if (isset($node->$field)) {
+            $translation->$field = $node->$field;
+          }
+      }
+      // Skip over the regular handling.
+      continue;
+    }
+    else {
     switch($field) {
       case 'taxonomy': // Do nothing it has already been syncd
         i18nsync_taxonomyfield($translation, $node);
@@ -209,12 +233,14 @@ function i18nsync_node_translation($node
           }
         }
         break;
-      default: // For fields that don't need special handling
+        default:
+          // For fields that don't need special handling
         if (isset($node->$field)) {
           $translation->$field = $node->$field;
         }
     }
   }
+  }
   node_save($translation);
 }
 
@@ -310,7 +336,6 @@ function i18nsync_node_available_fields(
   }
 
   // Get CCK fields
-  /* Disabled until there's a stable version of CCK + views
   if (($content = module_invoke('content', 'types', $type)) && isset($content['fields'])) {
     // Get context information
     $info = module_invoke('content', 'fields', NULL, $type);
@@ -319,25 +344,5 @@ function i18nsync_node_available_fields(
       $fields['cck']['#options'][$data['field_name']] = $data['widget']['label'];      
     }
   }
-  */
   return $fields;
 }
-
-/*
- * Sample CCK field definition for Drupal 5
-'field_text' => 
-    array
-      'field_name' => string 'field_text' (length=10)
-      'type' => string 'text' (length=4)
-      'required' => string '0' (length=1)
-      'multiple' => string '1' (length=1)
-      'db_storage' => string '0' (length=1)
-      'text_processing' => string '0' (length=1)
-      'max_length' => string '' (length=0)
-      'allowed_values' => string '' (length=0)
-      'allowed_values_php' => string '' (length=0)
-      'widget' => 
-        array
-          ...
-      'type_name' => string 'test' (length=4)
-*/
