[wp-trac] [WordPress Trac] #34307: Incorrect use of _n_noop() on the About page

WordPress Trac noreply at wordpress.org
Thu Oct 15 04:38:04 UTC 2015


#34307: Incorrect use of _n_noop() on the About page
--------------------------+-----------------------------
 Reporter:  johnbillion   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:
 Severity:  minor         |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 `_n()` and `_n_noop()` are used to provide the singular and plural form of
 the same string. They should not be used when the singular string and the
 plural string are effectively different strings.
 [https://core.trac.wordpress.org/ticket/28502#comment:23 Sergey explains
 it well here].

 On `wp-admin/about.php`, `_n_noop()` is used incorrectly as it's providing
 strings which differ depending on whether the number is singular or
 plural.

 {{{
 _n_noop( 'Maintenance Release', 'Maintenance Releases' );
 _n_noop( 'Security Release', 'Security Releases' );
 _n_noop( 'Maintenance and Security Release', 'Maintenance and Security
 Releases' );
 }}}

 These need to be separated into six separate strings using `__()`.

 {{{
 /* translators: 1: WordPress version number. */
 _n_noop( '<strong>Version %1$s</strong> addressed a security issue.',
          '<strong>Version %1$s</strong> addressed some security issues.'
 );
 }}}

 This string needs to be altered so `a` and `some` are replaced with a
 number placeholder.

 In addition, the logic used in `about.php` in minor releases needs to be
 corrected so these strings are selected based on whether there is, for
 example, one maintenance release or multiple maintenance releases in the
 branch, rather than using `_n()`.

 Previously: #28502, #33239

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34307>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list