[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 20:27:32 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:               |  
-------------------------+--------------------------------------------------
Changes (by westi):

  * owner:  anonymous => westi
  * status:  new => assigned

Comment:

 Replying to [comment:7 webrocker]:
 > Replying to [comment:5 westi]:
 > > Indeed, patch should be reworked to use
 [http://trac.wordpress.org/browser/trunk/wp-includes/l10n.php#L50
 __ngettext] rather than !__
 > I see... would this work[[BR]]
 > original:[[BR]]
 > {{{ attribute_escape( sprintf( __('%d topics'), $count ) ) }}}[[BR]]
 > patch:[[BR]]
 > {{{ attribute_escape( __ngettext( 'topic', 'topics', $count )  }}}[[BR]]
 > ?

 Nearly !__ngettext allows you to use plural forms in your translations
 e.g.:

 {{{__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'.

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


More information about the wp-trac mailing list