[glotpress-updates] [GlotPress] #384: Inappropriate use of _n()
GlotPress
noreply at wordpress.org
Sat Dec 6 10:10:47 UTC 2014
#384: Inappropriate use of _n()
-------------------------+-----------------------------
Reporter: extendwings | Owner:
Type: defect | Status: new
Priority: minor | Milestone: Awaiting Review
Component: General | Version:
Keywords: |
-------------------------+-----------------------------
https://glotpress.trac.wordpress.org/browser/trunk/gp-templates/profile-
public.php#L15 is using combination of `vprintf()` + `_n()`.
But we shouldn't use this combination, considering that some languages
doesn't have plural forms.
I think this is better:
{{{
#!php
<dd><?php
if( 1 >= count( $locales ) )
printf( __('%s is a polyglot who
contributes to %s'), $user->display_name, array_keys( $locales )[0] );
else
vprintf( __('%s is a polyglot who
knows %s but also knows %s.'), array_merge( array( $user->display_name ),
array_keys( $locales ) ) );
?></dd>
}}}
--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/384>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'
More information about the glotpress-updates
mailing list