peter-noster
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Broken stats field in control panel of WP 2.1Here is the complete code of the function select_string. Replace this (make sure to do a back up):
/**
* Detects which plural form to take
*
* @access private
* @param n count
* @return int array index of the right plural form
*/
function select_string($n) {
$string = $this->get_plural_forms();
$string = str_replace(‘nplurals’,”\$total”,$string);
$string = str_replace(“n”,$n,$string);
$string = str_replace(‘plural’,”\$plural”,$string);// New
$string = str_replace(‘,’,”;”,$string);# poEdit doesn’t put any semicolons, which
# results in parse error in eval
$string .= ‘;’;$total = 0;
$plural = 0;eval(“$string”);
if ($plural >= $total) $plural = $total – 1;
return $plural;
}Hope it works for you. Otherwise download my version of the gettext.php here and replace it:
http://www.peter-noster.de/tmp/gettext.zipForum: Fixing WordPress
In reply to: Broken stats field in control panel of WP 2.1I figured a temporary solution is a new ‘str_replace’ added to the ‘gettext.php’ in the wp-includes folder (function select_string()):
// NEW AT LINE 306
$string = str_replace(’,’,”;”,$string);
That does it for me at the moment with a german localization.
Forum: Fixing WordPress
In reply to: Broken stats field in control panel of WP 2.1sorry for double post. my solution below-