http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70114
Revision: 70114
Author: nikerabbit
Date: 2010-07-28 21:32:53 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
Skip if there no translation and fix author parsing
Modified Paths:
--------------
trunk/extensions/Translate/ffs/PhpVariables.php
Modified: trunk/extensions/Translate/ffs/PhpVariables.php
===================================================================
--- trunk/extensions/Translate/ffs/PhpVariables.php 2010-07-28 21:22:30 UTC
(rev 70113)
+++ trunk/extensions/Translate/ffs/PhpVariables.php 2010-07-28 21:32:53 UTC
(rev 70114)
@@ -169,8 +169,9 @@
# Authors first
$matches = array();
- preg_match_all( '/^ * @author\s*(.*)\s*$/m', $data, $matches );
+ preg_match_all( '/^ \* @author\s+(.+)$/m', $data, $matches );
$authors = $matches[1];
+ var_dump( $matches );
# Then messages
$matches = array();
@@ -211,6 +212,7 @@
$key = stripcslashes( $key );
$value = $item->translation();
+ if ( $value === null ) continue;
$value = str_replace( TRANSLATE_FUZZY, '', $value );
$value = addcslashes( $value, "'" );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs