[wp-meta] [Making WordPress.org] #3446: Incorrect use of _n() in /plugins/plugin-directory/widgets/class-meta.php
Making WordPress.org
noreply at wordpress.org
Mon Feb 12 16:58:13 UTC 2018
#3446: Incorrect use of _n() in /plugins/plugin-directory/widgets/class-meta.php
------------------------------+-----------------
Reporter: tobifjellner | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Keywords:
------------------------------+-----------------
Incorrect use of _n() at
https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
/wp-content/plugins/plugin-directory/widgets/class-meta.php?marks=91#L91
{{{echo esc_html( _n( 'Language:', 'Languages:',
$available_languages_count, 'wporg-plugins' ) );}}}
_n() should be used only when the steering number is included in the
translated string.
Otherwise, for instance, Russian would put singular if there happen to be
21 languages available.
Solution: Either just a plain string "Number of languages:", or use
printf() to inject the number itself: 'There is %d language'/'There are %d
languages'
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3446>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list