? .svn
? potx-coder.patch
? translations/.svn
Index: potx.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/potx/Attic/potx.module,v
retrieving revision 1.1.2.12.2.2.2.3
diff -u -u -p -r1.1.2.12.2.2.2.3 potx.module
--- potx.module	9 Sep 2008 14:03:01 -0000	1.1.2.12.2.2.2.3
+++ potx.module	17 Sep 2008 19:33:31 -0000
@@ -321,12 +321,23 @@ function potx_coder_review(&$coder_args,
   // Request collection of error messages internally.
   potx_status('set', POTX_STATUS_SILENT);
   // Process the file (but throw away the result);
-  _potx_process_file(realpath($coder_args['#filename']));
+  $filename = realpath($coder_args['#filename']);
+  _potx_process_file($filename);
   // Grab the errors and empty the error list.
   $errors = potx_status('get', TRUE);
-  
   $severity_name = _coder_severity_name($coder_args, $review, $rule);
+  $regex = ' in (<em>)?'. $filename .'(</em>)?:(<em>)?(\d+)(</em>)?';
   foreach ($errors as $error) {
-    $results[] = theme('coder_warning', array('#warning' => $error), $severity_name, 0, '');
+    if (preg_match(','. $regex .',', $error, $matches)) {
+      $lineno = $matches[4];
+      $line = $coder_args['#all_lines'][$lineno];
+      $error = preg_replace(','. $regex .',', '', $error);
+    }
+    else {
+      $lineno = 0;
+      $line = '';
+    }
+    $rule['#warning'] = preg_replace('/[\s\*]+/', ' ', $error);
+    _coder_error($results, $rule, $severity_name, $lineno, $line);
   }
 }
