[wpmu-trac] [WordPress MU Trac] #1001: plugins.php admin_notices error for some languages

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Jun 19 17:28:12 GMT 2009


#1001: plugins.php admin_notices error for some languages
----------------------------+-----------------------------------------------
 Reporter:  yannux          |       Owner:  somebody           
     Type:  defect          |      Status:  new                
 Priority:  normal          |   Milestone:  2.7.1              
Component:  Administration  |     Version:  2.7.1              
 Severity:  normal          |    Keywords:  translation warning
----------------------------+-----------------------------------------------
 With some languages the translated string form line:540 in wp-
 admin/includes/mu.php
 have simple quote.

 So when PHP interpret create_function at line:542  it looks like :

 {{{
 add_action('admin_notices', create_function( '', "echo 'La page
 "Extensions" n'est pas visible pour les utilisateurs classiques. Vous
 devez précédemment l'activer depuis la page de réglages du site.';" ) );
 }}}

 Simple quote inside simple quoted string....
 And notice error isn't display.

 Seems to be same on trunk.

 One fix is to escape simple quote : (regexp is certainly better for that
 ?...)
 Line 540 - 544 :

 {{{
 $message = __( 'The plugins page is not visible to normal users. It must
 be <a href="wpmu-options.php#menu">activated</a> first.' );
 $message = str_replace('\\', '\'\\', $message);
 $message = "<div class=\'error\'><p>$message</p></div>";
 add_action('admin_notices', create_function( '', "echo '$message';" ) );
 }}}


 Or handling this in th translated string....

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/1001>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list