r73195 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73194‎ | r73195 | r73196 >
Date:07:35, 17 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Fix exporting of ruby plurals on messages with multiple different variables
Modified paths:
  • /trunk/extensions/Translate/FFS.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/FFS.php
@@ -977,7 +977,8 @@
978978 while ( preg_match( $regex, $message, $match ) ) {
979979 $uniqkey = $this->placeholder();
980980 $placeholders[$uniqkey] = $match[0];
981 - $message = preg_replace( $regex, $uniqkey, $message );
 981+ $search = preg_quote( $match[0], '~' );
 982+ $message = preg_replace( "~$search~", $uniqkey, $message );
982983 }
983984
984985 // Then replace (possible multiple) plural instances into placeholders.

Status & tagging log