[wp-trac] [WordPress Trac] #13651: Problem with plural form in comments_number
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 3 18:28:41 UTC 2010
#13651: Problem with plural form in comments_number
--------------------------+-------------------------------------------------
Reporter: pavelevap | Owner: nbachiyski
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.1
Component: I18N | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by nacin):
Looks good. Still feels a bit ugly, Nikolay and I agreed, so if anyone has
any ideas, that'd be helpful.
Let's make sure that `array( 'One Comment', '%s Comments') )` also works,
as _n_noop() now returns an associative array.
Non-i18n examples:
{{{
comments_number_text( 'Zero Comments', array( 'One Comment', '%s Comments'
) );
comments_number_link( 'Zero Comments', array( 'One Comment', '%s Comments'
), 'Comments off.' );
}}}
I wish we could sanely add these functions directly to the pot generation,
which would allow for comments_number_text( 'Zero Comments', 'One
Comment', '%s Comments' ), then we could translate that in parts. The
_n_noop() makes little sense to most -- it's an extremely rare function to
use currently, outside of core.
Thoughts? String / array of two strings / string will trip a lot of people
up. And i18n makes it very confusing beyond that.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13651#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list