[wp-trac] [WordPress Trac] #20188: _n_noop() does not accept a textdomain

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 8 02:22:52 UTC 2012


#20188: _n_noop() does not accept a textdomain
--------------------------+------------------------------
 Reporter:  scribu        |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by nacin):

 Not sure I am following. Example usage in a plugin:

 {{{
 $num_apples = 12;
 $apple_string = _n_noop( 'Apple', 'Apples' );
 translate_nooped_plural( $apple_string, $num_apples, 'my-plugin-
 textdomain' );
 }}}

 When makepot.php runs over this file, the strings 'Apple' and 'Apples'
 will be picked up and added to the plugin's POT.
 When translate_nooped_plural() fires, it will call _n() internally with
 the domain passed to it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20188#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list