[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:               |
 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:
                                 if( 1 >= count( $locales ) )
                                         printf( __('%s is a polyglot who
 contributes to %s'), $user->display_name, array_keys( $locales )[0] );
                                         vprintf( __('%s is a polyglot who
 knows %s but also knows %s.'), array_merge( array( $user->display_name ),
 array_keys( $locales ) ) );

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