Index: entity_translation.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity_translation/entity_translation.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 entity_translation.admin.inc
--- entity_translation.admin.inc	12 Feb 2011 03:15:18 -0000	1.1
+++ entity_translation.admin.inc	13 Feb 2011 09:54:19 -0000
@@ -56,8 +56,8 @@ function entity_translation_admin_form_s
 function entity_translation_overview($entity_type, $entity) {
   // Entity translation and node translation share the same system path.
   if (entity_translation_node($entity_type, $entity)) {
-    module_load_include('inc', 'entity_translation_node', 'entity_translation_node.pages');
-    return entity_translation_node_overview($entity);
+    module_load_include('inc', 'translation', 'translation.pages');
+    return translation_node_overview($entity);
   }
 
   $handler = entity_translation_get_handler($entity_type, $entity);
Index: entity_translation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity_translation/entity_translation.install,v
retrieving revision 1.2
diff -u -p -r1.2 entity_translation.install
--- entity_translation.install	12 Feb 2011 03:15:18 -0000	1.2
+++ entity_translation.install	13 Feb 2011 13:30:52 -0000
@@ -81,7 +81,8 @@ function entity_translation_schema() {
  * Implements hook_install().
  */
 function entity_translation_install() {
-  // entity_translation_form_alter() needs to run after locale_form_alter().
+  // entity_translation_form_alter() needs to run after locale_form_alter() and
+  // translation_menu().
   db_update('system')
     ->fields(array('weight' => 1))
     ->condition('name', 'entity_translation')
@@ -89,12 +90,16 @@ function entity_translation_install() {
 
   // Enable translation for nodes.
   variable_set('entity_translation_entity_types', array('node' => 'node'));
+
+  // Make translation use the content language type.
+  variable_set('translation_language_type', LANGUAGE_TYPE_CONTENT);
 }
 
 /**
  * Implements hook_uninstall().
  */
 function entity_translation_uninstall() {
+  variable_del('translation_language_type');
   variable_del('locale_field_language_fallback');
   variable_del('entity_translation_edit_form_info');
   variable_del('entity_translation_entity_types');
Index: entity_translation.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity_translation/entity_translation.module,v
retrieving revision 1.2
diff -u -p -r1.2 entity_translation.module
--- entity_translation.module	12 Feb 2011 03:15:18 -0000	1.2
+++ entity_translation.module	14 Feb 2011 13:53:35 -0000
@@ -68,26 +68,26 @@ function entity_translation_entity_info_
   // Provide defaults for translation info.
   foreach ($entity_info as $entity_type => $info) {
     if (entity_translation_enabled($entity_type, TRUE)) {
-      if (!isset($entity_info[$entity_type]['translation']['translation'])) {
-        $entity_info[$entity_type]['translation']['translation'] = array();
+      if (!isset($entity_info[$entity_type]['translation']['entity_translation'])) {
+        $entity_info[$entity_type]['translation']['entity_translation'] = array();
       }
 
-      if (!isset($entity_info[$entity_type]['translation']['translation']['base path'])) {
+      if (!isset($entity_info[$entity_type]['translation']['entity_translation']['base path'])) {
         // If no base path is provided we default to the common "node/%node"
         // pattern.
         $router = menu_get_router();
         // If we cannot find a usable base path we skip to the next entity type.
         if (!isset($router["$entity_type/%"])) {
-          unset($entity_info[$entity_type]['translation']['translation']);
+          unset($entity_info[$entity_type]['translation']['entity_translation']);
           continue;
         }
         $path = "$entity_type/%$entity_type";
-        $entity_info[$entity_type]['translation']['translation']['base path'] = $path;
+        $entity_info[$entity_type]['translation']['entity_translation']['base path'] = $path;
       }
 
-      $path = $entity_info[$entity_type]['translation']['translation']['base path'];
+      $path = $entity_info[$entity_type]['translation']['entity_translation']['base path'];
 
-      $entity_info[$entity_type]['translation']['translation'] += array(
+      $entity_info[$entity_type]['translation']['entity_translation'] += array(
         'view path' => $path,
         'edit path' => "$path/edit",
         'class' => 'EntityTranslationDefaultHandler',
@@ -124,11 +124,11 @@ function entity_translation_menu() {
   foreach (entity_get_info() as $entity_type => $info) {
     // Menu is rebuilt while determining base paths so we might not have them
     // available yet.
-    if (isset($info['translation']['translation']['base path']) && entity_translation_enabled($entity_type)) {
+    if (isset($info['translation']['entity_translation']['base path']) && entity_translation_enabled($entity_type)) {
       // Extract informations from the bundle description.
-      $path = $info['translation']['translation']['base path'];
+      $path = $info['translation']['entity_translation']['base path'];
       $keys = array('theme callback', 'theme arguments', 'access callback', 'access arguments', 'load arguments');
-      $item = array_intersect_key($info['translation']['translation'], drupal_map_assoc($keys));
+      $item = array_intersect_key($info['translation']['entity_translation'], drupal_map_assoc($keys));
 
       $item += array(
         'file' => 'entity_translation.admin.inc',
@@ -196,8 +196,8 @@ function entity_translation_menu() {
 function entity_translation_admin_paths() {
   $paths = array();
   foreach (entity_get_info() as $entity_type => $info) {
-    if (entity_translation_enabled($entity_type, TRUE) && isset($info['translation']['translation']['base path'])) {
-      $base_path = preg_replace('|%[^/]*|', '*', $info['translation']['translation']['base path']);
+    if (entity_translation_enabled($entity_type, TRUE) && isset($info['translation']['entity_translation']['base path'])) {
+      $base_path = preg_replace('|%[^/]*|', '*', $info['translation']['entity_translation']['base path']);
       $paths["$base_path/translate"] = TRUE;
       $paths["$base_path/translate/*"] = TRUE;
     }
@@ -485,7 +485,7 @@ function entity_translation_get_handler(
 
   if (!isset($handlers[$entity_type][$entity_id])) {
     $entity_info = entity_get_info($entity_type);
-    $class = $entity_info['translation']['translation']['class'];
+    $class = $entity_info['translation']['entity_translation']['class'];
     $handler = new $class($entity_type, $entity_info, $entity, $entity_id);
 
     // If the entity id is empty we cannot cache the translation handler
Index: entity_translation.node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity_translation/entity_translation.node.inc,v
retrieving revision 1.1
diff -u -p -r1.1 entity_translation.node.inc
--- entity_translation.node.inc	12 Feb 2011 03:15:18 -0000	1.1
+++ entity_translation.node.inc	14 Feb 2011 13:57:00 -0000
@@ -9,22 +9,22 @@
 /**
  * Identifies a content type which has translation support enabled.
  */
-define('TRANSLATION_ENABLED', 4);
+define('ENTITY_TRANSLATION_ENABLED', 4);
 
 /**
  * Do not show translation metadata.
  */
-define('TRANSLATION_METADATA_HIDE', 0);
+define('ENTITY_TRANSLATION_METADATA_HIDE', 0);
 
 /**
  * Add translation metadata to the original authoring information.
  */
-define('TRANSLATION_METADATA_SHOW', 1);
+define('ENTITY_TRANSLATION_METADATA_SHOW', 1);
 
 /**
  * Replace the original authoring information with translation metadata.
  */
-define('TRANSLATION_METADATA_REPLACE', 2);
+define('ENTITY_TRANSLATION_METADATA_REPLACE', 2);
 
 /**
  * Check if the given entity has node translation enabled.
@@ -37,7 +37,15 @@ function entity_translation_node($entity
  * Node specific access callback.
  */
 function entity_translation_node_tab_access($node) {
-  return !empty($node->language) && (translation_supported_type($node->type) || translation_node('node', $node)) && translation_tab_access('node');
+  if ($node->language != LANGUAGE_NONE) {
+    if (entity_translation_node_supported_type($node->type)) {
+      return entity_translation_tab_access($node);
+    }
+    elseif (entity_translation_node('node', $node)) {
+      return _translation_tab_access();
+    }
+  }
+  return FALSE;
 }
 
 /**
@@ -46,8 +54,8 @@ function entity_translation_node_tab_acc
  * @return
  *   Boolean value.
  */
-function entity_translation_supported_type($type) {
-  return variable_get('language_content_type_' . $type, 0) == TRANSLATION_ENABLED;
+function entity_translation_node_supported_type($type) {
+  return variable_get('language_content_type_' . $type, 0) == ENTITY_TRANSLATION_ENABLED;
 }
 
 /**
@@ -88,7 +96,7 @@ function entity_translation_node_alter_f
  * Provide content language switcher links to navigate among node translations.
  */
 function entity_translation_node_view($node, $build_mode) {
-  if (!empty($node->translations) && drupal_multilingual() && entity_translation_supported_type($node->type)) {
+  if (!empty($node->translations) && drupal_multilingual() && entity_translation_node_supported_type($node->type)) {
     $path = 'node/' . $node->nid;
     $links = language_negotiation_get_switch_links(LANGUAGE_TYPE_CONTENT, $path);
 
@@ -124,22 +132,22 @@ function entity_translation_node_view($n
 function entity_translation_form_node_type_form_alter(&$form, &$form_state) {
   $type = $form['#node_type']->type;
 
-  $form['workflow']['language_content_type']['#options'][TRANSLATION_ENABLED] = t('Enabled, with entity translation');
+  $form['workflow']['language_content_type']['#options'][ENTITY_TRANSLATION_ENABLED] = t('Enabled, with entity translation');
   $form['workflow']['language_content_type']['#description'] .= ' ' . t('If <em>entity translation</em> is enabled it will be possible to provide a different version of the same content for each available language.');
 
-  $form['display']['translation_node_metadata'] = array(
+  $form['display']['entity_translation_node_metadata'] = array(
     '#type' => 'radios',
     '#title' => t('Translation post information'),
     '#description' => t('Whether the translation authoring information should be hidden, shown, or replace the node\'s authoring information.'),
-    '#default_value' => variable_get("translation_node_metadata_$type", TRANSLATION_METADATA_HIDE),
+    '#default_value' => variable_get("entity_translation_node_metadata_$type", ENTITY_TRANSLATION_METADATA_HIDE),
     '#options' => array(t('Hidden'), t('Shown'), t('Replacing post information')),
   );
 
   if (isset($form['comment'])) {
-    $form['comment']['translation_comment_filter'] = array(
+    $form['comment']['entity_translation_comment_filter'] = array(
       '#type' => 'checkbox',
       '#title' => t('Filter comments per language'),
-      '#default_value' => variable_get("translation_comment_filter_$type", FALSE),
+      '#default_value' => variable_get("entity_translation_comment_filter_$type", FALSE),
       '#description' => t('Show only comments whose language matches content language.'),
     );
   }
@@ -153,9 +161,9 @@ function entity_translation_form_node_ty
 function entity_translation_preprocess_node(&$variables) {
   $node = $variables['node'];
   $submitted = variable_get("node_submitted_{$node->type}", TRUE);
-  $mode = variable_get("translation_node_metadata_{$node->type}", TRANSLATION_METADATA_HIDE);
+  $mode = variable_get("entity_translation_node_metadata_{$node->type}", ENTITY_TRANSLATION_METADATA_HIDE);
 
-  if ($submitted && $mode != TRANSLATION_METADATA_HIDE) {
+  if ($submitted && $mode != ENTITY_TRANSLATION_METADATA_HIDE) {
     global $language_content, $user;
 
     $handler = entity_translation_get_handler('node', $node);
@@ -173,14 +181,14 @@ function entity_translation_preprocess_n
       }
 
       switch ($mode) {
-        case TRANSLATION_METADATA_SHOW:
+        case ENTITY_TRANSLATION_METADATA_SHOW:
           $variables['date'] .= ' (' . t('translated on <em>!date</em>', array('!date' => $date)) . ')';
           if ($name) {
             $variables['name'] .= ' (' . t('translated by !name', array('!name' => $name)) . ')';
           }
           break;
 
-        case TRANSLATION_METADATA_REPLACE:
+        case ENTITY_TRANSLATION_METADATA_REPLACE:
           $variables['date'] = $date;
           if ($name) {
             $variables['name'] = $name;
@@ -200,7 +208,7 @@ function entity_translation_preprocess_n
  */
 function entity_translation_query_comment_filter_alter(QueryAlterableInterface $query) {
   $node = $query->getMetaData('node');
-  if (variable_get("translation_comment_filter_{$node->type}", FALSE)) {
+  if (variable_get("entity_translation_comment_filter_{$node->type}", FALSE)) {
     $query->where("language = :language OR language = :language_none", array(':language' => $GLOBALS['language_content']->language, ':language_none' => LANGUAGE_NONE));
   }
 }
Index: includes/translation.handler.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity_translation/includes/translation.handler.inc,v
retrieving revision 1.1
diff -u -p -r1.1 translation.handler.inc
--- includes/translation.handler.inc	12 Feb 2011 03:15:18 -0000	1.1
+++ includes/translation.handler.inc	13 Feb 2011 10:42:39 -0000
@@ -190,7 +190,7 @@ class EntityTranslationDefaultHandler im
     $this->translating = FALSE;
     $this->outdated = FALSE;
 
-    $info = $entity_info['translation']['translation'];
+    $info = $entity_info['translation']['entity_translation'];
     $this->basePath = $this->getPathInstance($info['base path']);
     $this->editPath = isset($info['edit path']) ? $this->getPathInstance($info['edit path']) : FALSE;
     $this->viewPath = isset($info['view path']) ? $this->getPathInstance($info['view path']) : FALSE;
@@ -491,7 +491,7 @@ class EntityTranslationDefaultHandler im
    *   The instantiated path.
    */
   protected function getPathInstance($path) {
-    $wildcard = $this->entityInfo['translation']['translation']['path wildcard'];
+    $wildcard = $this->entityInfo['translation']['entity_translation']['path wildcard'];
     return str_replace($wildcard, $this->getEntityId(), $path);
   }
 
