Right, I presumed you were looking functionality to pull the messages out of your code, that's what I meant by I'll try to dig the code up.
This is by no means pretty, but it might be useful as some place to start. Or maybe not.
$max_message_length = 0;
$messages = array();
foreach ($files as $orig_file) {
$contents = file_get_contents($svn_dir . $orig_file);
preg_match_all('#(?<=Exception\\()\\s*\\'(.*?)\\'|(?<=Exception\\()\\s*"(.*?)"|(?<=::compose\\()\\s*\\'(.*?)\\'|(?<=::compose\\()\\s*"(.*?)"#', $contents, $matches, PREG_SET_ORDER);
$start_pos = 0;
foreach ($matches as $match) {
$match_text = $match[1] . $match[2] . $match[3] . $match[4];
$pos = strpos($contents, $match_text, $start_pos);
$line_num = substr_count(substr($contents, 0, $pos), "\\n") + 1;
if (!isset($messages[$match_text])) {
$messages[$match_text] = array();
}
$messages[$match_text][] = $orig_file . ':' . $line_num;
$match_text = str_replace('\\\\$', '$', $match_text);
$match_text = str_replace('\\\\"', '"', $match_text);
$match_text = str_replace('\\\\\\'', '\\'', $match_text);
$len = strlen(str_replace("'", "\\\\'", $match_text));
if ($len > $max_message_length) {
$max_message_length = $len;
}
$start_pos = $pos + 2;
}
}
function keycmp($a, $b)
{
return strcasecmp($a, $b);
}
uksort($messages, "keycmp");