[wp-trac] Re: [WordPress Trac] #4005: php-gettext's plural forms parsing is broken for nplurals>2

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 25 17:56:44 GMT 2007


#4005: php-gettext's plural forms parsing is broken for nplurals>2
------------------------------+---------------------------------------------
 Reporter:  moeffju           |        Owner:  ryan 
     Type:  defect            |       Status:  new  
 Priority:  high              |    Milestone:  2.2  
Component:  i18n              |      Version:  2.1.2
 Severity:  normal            |   Resolution:       
 Keywords:  has-patch commit  |  
------------------------------+---------------------------------------------
Comment (by nbachiyski):

 It was hard, but being stubborn sometimes helps. Here is a string of code,
 which passes through your filter and includes an arbitrary file (I didn't
 have the nerve and just try to include {{{d}}} in the sample):
 {{{
 ob_start();
 print(chr(105));
 print(chr(110));
 print(chr(99));
 print(chr(108));
 print(chr(117));
 print(chr(100));
 print(chr(101));
 print(chr(32));
 print(chr(34));
 print(chr(100));
 print(chr(34));
 print(chr(59));
 eval(ob_get_flush());
 }}}
 It was not easy without neither quotes nor comas :)

 Anyway, I suggest that we just write some simple parser for php's ternary
 expressions. There are some
 [http://translate.sourceforge.net/wiki/l10n/pluralforms nice unit tests]
 on the topic.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4005#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list