Opened 7 years ago
Closed 7 years ago
#3446 closed defect (bug) (fixed)
Incorrect use of _n() in /plugins/plugin-directory/widgets/class-meta.php
Reported by: | tobifjellner | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
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'
Change History (1)
Note: See
TracTickets for help on using
tickets.
In 6595: