Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [59270] trunk/extensions/Translate/ffs/Gettext.php

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


nikerabbit at svn

Nov 19, 2009, 12:52 PM

Post #1 of 1 (104 views)
Permalink
SVN: [59270] trunk/extensions/Translate/ffs/Gettext.php

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59270

Revision: 59270
Author: nikerabbit
Date: 2009-11-19 20:52:09 +0000 (Thu, 19 Nov 2009)

Log Message:
-----------
Fix one plural issue

Modified Paths:
--------------
trunk/extensions/Translate/ffs/Gettext.php

Modified: trunk/extensions/Translate/ffs/Gettext.php
===================================================================
--- trunk/extensions/Translate/ffs/Gettext.php 2009-11-19 20:37:17 UTC (rev 59269)
+++ trunk/extensions/Translate/ffs/Gettext.php 2009-11-19 20:52:09 UTC (rev 59270)
@@ -97,10 +97,13 @@
$actualForms = array();
for ( $i = 0; $i < $pluralForms[1]; $i++ ) {
$matches = array();
+ if ( preg_match( "/^msgid_plural\s($poformat)/mx", $section, $matches ) ) {
+ continue; // Skip
+ }
if ( preg_match( "/^msgstr\[$i\]\s($poformat)/mx", $section, $matches ) ) {
$actualForms[] = GettextFFS::formatForWiki( $matches[1] );
} else {
- throw new MWException( "Plural not found, expecting $i" );
+ throw new MWException( "Plural not found, expecting $i for: $section" );
}
}




_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.