Opened 9 years ago
Closed 9 years ago
#34307 closed defect (bug) (fixed)
Incorrect use of _n_noop() on the About page
Reported by: | johnbillion | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | minor | Version: | |
Component: | I18N | Keywords: | has-patch |
Focuses: | Cc: |
Description
_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. 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()
.
Attachments (1)
Change History (7)
#2
@
9 years ago
- Milestone changed from 4.3.2 to 4.4
Bumping to 4.4 because we don't need to alter strings in a point release.
#3
@
9 years ago
- Keywords has-patch added; needs-patch removed
34307.patch decouples the strings. We should be careful to no longer use _n()
for them in minor releases from now on.
I didn't touch them while working on #28502, because we know we're dealing with values less than 21 there, so this wasn't a problem for Slavic languages, but I agree we should be consistent with this.
Milestoning for 4.3.2 as this bug only affects minor releases.