Thread:Translating talk:IHRIS/format/reply (9)

I have cleaned up the extra spacing and punctuation, as much as possible, for both the source english as well as the existing translations (as hosted on launchpad). This was done by calling: solidifySource($text) as defined below.

I can pull in any and clean any of the translations hosted on translatewiki. Let me know what is the best route to proceed. Cheers. -carl

function solidifySourcePieces($text) { $leftstrip = preg_quote(':;[]|\\~@#$^&*_-+=,'); $rightstrip = preg_quote(':;[]|\\~@#^&*_-+=,'); if (!preg_match("/^([\s$leftstrip]*)(.*?)([\s$rightstrip]*)$/s",$text,$matches)) { //this really shouldn't happen. $text = preg_replace("/\s+/s"," ",trim($text)); return array(,$text,); }    $matches[2] = preg_replace("/\s+/s"," ",trim($matches[2]));  //no weird characters. just return array($matches[1],$matches[2],$matches[3]); } function solidifySource($text) { list($left,$text,$right) = solidifySourcePieces($text); return $text; }