Index: auto_nodetitle.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/auto_nodetitle/Attic/auto_nodetitle.module,v
retrieving revision 1.20.2.5
diff -u -p -r1.20.2.5 auto_nodetitle.module
--- auto_nodetitle.module	21 Apr 2009 08:52:10 -0000	1.20.2.5
+++ auto_nodetitle.module	13 Oct 2009 21:45:36 -0000
@@ -78,17 +78,18 @@ function auto_nodetitle_is_needed($node)
  * Sets the automatically generated nodetitle for the node
  */
 function auto_nodetitle_set_title(&$node) {
-  $types = node_get_types();
+  $type = node_get_types('type', $node->type);
   $pattern = variable_get('ant_pattern_'. $node->type, '');
+  $nodetype = auto_nodetitle_tt("nodetype:type:$node->type:name", $type->name); 
   if (trim($pattern)) {
     $node->changed = time();
     $node->title = _auto_nodetitle_patternprocessor($pattern, $node);
   }
   else if ($node->nid) {
-    $node->title = t('@type @node-id', array('@type' => $types[$node->type]->name, '@node-id' => $node->nid));
+    $node->title = t('@type @node-id', array('@type' => $nodetype, '@node-id' => $node->nid));
   }
   else {
-    $node->title = t('@type', array('@type' => $types[$node->type]->name));
+    $node->title = t('@type', array('@type' => $nodetype));
   }
   // With that flag we ensure we don't apply the title two times to the same node.
   $node->auto_nodetitle_applied = TRUE;
@@ -125,10 +126,10 @@ function auto_nodetitle_operations_updat
 }
 
 /**
-  * Helper function to generate the title according to the PHP code.
-  * Right now its only a wrapper, but if this is to be expanded, here is the place to be.
-  * @return a title string
-  */
+ * Helper function to generate the title according to the PHP code.
+ * Right now its only a wrapper, but if this is to be expanded, here is the place to be.
+ * @return a title string
+ */
 function _auto_nodetitle_patternprocessor($output, $node) {
   if (module_exists('token')) {
     $output = token_replace($output, 'node', $node);
@@ -143,8 +144,8 @@ function _auto_nodetitle_patternprocesso
 }
 
 /**
-  * Helper function for hook_form_alter() renders the settings per node-type.
-  */
+ * Helper function for hook_form_alter() renders the settings per node-type.
+ */
 function auto_nodetitle_node_settings_form(&$form) {
   $form['auto_nodetitle'] = array(
     '#type' => 'fieldset',
@@ -245,3 +246,15 @@ function auto_nodetitle_node_type($op, $
       break;
   }
 }
+ 
+/** 
+ * Wrapper function for tt() if i18nstrings enabled.
+ */
+function auto_nodetitle_tt($name, $string, $langcode = NULL, $update = FALSE) {
+  if (module_exists('i18nstrings')) {
+    return tt($name, $string, $langcode, $update);
+  }
+  else {
+    return $string;
+  }
+}
