Index: potx.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/potx/Attic/potx.inc,v
retrieving revision 1.1.2.17.2.7.2.10
diff -u -p -r1.1.2.17.2.7.2.10 potx.inc
--- potx.inc 10 Sep 2008 10:18:39 -0000 1.1.2.17.2.7.2.10
+++ potx.inc 24 Sep 2008 14:35:18 -0000
@@ -538,8 +538,10 @@ function _potx_format_quoted_string($str
  *   Function name with which the error was identified
  * @param $ti
  *   Index on the token array
+ * @param $more_help
+ *   More help for users.
  */
-function _potx_marker_error($file, $line, $marker, $ti) {
+function _potx_marker_error($file, $line, $marker, $ti, $more_help) {
   global $_potx_tokens;

   $tokens = '';
@@ -561,7 +563,7 @@ function _potx_marker_error($file, $line
     }
     $ti++;
   }
-  potx_status('error', t("Invalid marker content in %filename:%lineno\n* %marker(%tokens\n\n", array('%filename' => $file, '%lineno' => $line, '%marker' => $marker, '%tokens' => $tokens)));
+  potx_status('error', t("Invalid marker content in %filename:%lineno\n* %marker(%tokens.", array('%filename' => $file, '%lineno' => $line, '%marker' => $marker, '%tokens' => $tokens)) ." ". $more_help ."\n\n");
 }

 /**
@@ -648,7 +650,7 @@ function _potx_find_t_calls($file, $save
         }
         else {
           // $function_name() found, but inside is something which is not a string literal.
-          _potx_marker_error($file, $line, $function_name, $ti);
+          _potx_marker_error($file, $line, $function_name, $ti, t("@function() should only be used with a literal string. There should be no variables, concatenation, constants or other non-literal strings in the first argument to @function().", array('@function' => $function_name)));
         }
       }
     }
@@ -685,7 +687,7 @@ function _potx_find_watchdog_calls($file
         }
         else {
           // watchdog() found, but inside is something which is not a string literal.
-          _potx_marker_error($file, $line, 'watchdog', $ti);
+          _potx_marker_error($file, $line, 'watchdog', $ti, t("The first two watchdog() parameters are literal strings and should not be enclosed within t()."));
         }
       }
     }
@@ -740,7 +742,7 @@ function _potx_find_format_plural_calls(
         }
         else {
           // format_plural() found, but the parameters are not correct.
-          _potx_marker_error($file, $line, "format_plural", $ti);
+          _potx_marker_error($file, $line, "format_plural", $ti, t("In format_plural(), the singular and plural strings are literal strings and should not be enclosed within t()."));
         }
       }
     }
@@ -786,7 +788,7 @@ function _potx_find_perm_hook($file, $fi
         }
       }
       if (!$count) {
-        potx_status('error', t("Found a hook_perm() implementation in %filename, but there were no literally provided permissions to record.\n\n", array('%filename' => $file)));
+        potx_status('error', t("Found a hook_perm() implementation in %filename, but there were no literally provided permissions to record. hook_perm() should have an array with literal string permission names which become translatable.", array('%filename' => $file)) ."\n\n");
       }
     }
   }
@@ -850,7 +852,7 @@ function _potx_find_menu_hook($file, $fi
             $tn+=2; // Jump forward by 2.
           }
           else {
-            potx_status('error', t("Invalid menu %element definition found in %hook in %filename on line %lineno\n\n", array('%element' => $_potx_tokens[$tn][1], '%filename' => $file, '%hook' => $filebase .'_menu()', '%lineno' => $_potx_tokens[$tn][2])));
+            potx_status('error', t("Invalid menu %element definition found in %hook in %filename on line %lineno. Title and description keys of the menu array are literal strings and should not be enclosed within t().", array('%element' => $_potx_tokens[$tn][1], '%filename' => $file, '%hook' => $filebase .'_menu()', '%lineno' => $_potx_tokens[$tn][2])) ."\n\n");
           }
         }
         $tn++;
@@ -1071,7 +1073,7 @@ function _potx_parse_js_file($code, $fil
   preg_match_all('~[^\w]Drupal\s*\.\s*(t|formatPlural)\s*\([^)]+\)~s', $code, $faulty_matches, PREG_SET_ORDER);
   if (isset($faulty_matches) && count($faulty_matches)) {
     foreach($faulty_matches as $index => $match) {
-      potx_status('error', t("Invalid marker content in %filename\n* %marker\n\n", array('%filename' => $file, '%marker' => $match[0])));
+      potx_status('error', t("Invalid marker content in %filename\n* %marker. Drupal.t() calls should have a single literal string as their first parameter. Drupal.formatPlural() calls should have a number, a literal string for the singular version and another literal string for the plural version which has a @count placeholder.", array('%filename' => $file, '%marker' => $match[0])) ."\n\n");
     }
   }
 }
