[wp-trac] Re: [WordPress Trac] #5131: wp_tag_cloud(): title='1 topics', should be 1 topic

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 2 23:48:59 GMT 2007


#5131: wp_tag_cloud(): title='1 topics', should be 1 topic
-------------------------+--------------------------------------------------
 Reporter:  atppp        |        Owner:  westi   
     Type:  enhancement  |       Status:  assigned
 Priority:  normal       |    Milestone:  2.5     
Component:  General      |      Version:  2.3     
 Severity:  normal       |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by webrocker):

 Replying to [comment:9 westi]:
 > {{{__ngettext( '%d topic', '%d topics', $count) }}}
 >
 > This will output '1 topic' or '3 topics' giving you the correct plural
 form while still allowing translators to handle the "right to left" issues
 by translating the '%d topic' as something like 'topic %d'.
 Ok, I think I'm getting it... so it still needs to be used inside the
 {{{sprintf()}}} function, so that the %d thingie gets replaced with
 $count, while the !__ngettext() needs another instance of $count to
 determine if $single or $plural is to be used?
 So this should work:[[BR]]
 {{{ attribute_escape( sprintf( __ngettext( '%d topic', '%d topics', $count
 ), $count ) ) }}}

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


More information about the wp-trac mailing list