[wp-trac] [WordPress Trac] #23257: Add plural versions of Post Format strings
WordPress Trac
noreply at wordpress.org
Tue Jan 22 08:15:26 UTC 2013
#23257: Add plural versions of Post Format strings
-----------------------------------+------------------------------
Reporter: obenland | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch ux-feedback |
-----------------------------------+------------------------------
Changes (by kovshenin):
* cc: kovshenin (added)
Comment:
I agree that it makes sense, but I disagree with the proposed patch. In
languages with more than one plural form, some of the forms make no sense
without the number context: for example in Russian, "comments", "2
comments", "5 comments" will all have different translations.
It's probably why _n is mostly used with printf. So to generate a title
for the archives in a theme, what are you going to pass as the $number
argument? The number of found posts, the number of posts on the page, or
perhaps a random plural number? :)
Again, due to plural forms in Russian, if you pass, say 21 to that
function, it will actually return the singular form of the post format.
The plurals 21, 101, 151, 1000001, etc are plural, but they use the
singular form words and in order to be differentiated from the real
singular (1) they need the number to be in context. Sorry this is so
confusing, maybe SergeyBiryukov can clarify :)
I don't know about other languages, but I think than changing `$number` to
be a boolean `$plural` could work, then we'd just provide plural
translations of post formats without the number context and without `_n`:
{{{
'gallery' => ( $plural ) ? _x( 'Galleries', 'Plural post format' ) : _x(
'Gallery', 'Post format' ),
}}}
It'll work for the post format archives title, but will fail if you put a
number in context, like "this blog has 5 galleries". What are the other
use cases for post formats plural forms, a except post format archives
title? Can we make a function that would fit all use cases?
Also, I think "standards" is pretty weird, and "audio" is uncountable, so
the plural would remain "audio" not "audios" :)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23257#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list