Opened 5 years ago
Closed 5 years ago
#47158 closed defect (bug) (fixed)
Merge similar strings introduced in WP 5.2
Reported by: | dimadin | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.2.2 | Priority: | normal |
Severity: | normal | Version: | 5.2 |
Component: | I18N | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
There are strings introduced in WordPress 5.2 that can be modified to reuse existing strings. No new strings are introduced with attached patch.
PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance.
and
PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance.
This is the only example where ’
is used in strings in PHP files, so I propose using string with HTML entity instead.
The authenticity of %1$s could not be verified as signature verification is unavailable on this system.
and
The authenticity of %s could not be verified as signature verification is unavailable on this system.
While in [45167] numbered placeholder was removed for second string, [45262] introduced first string, probably because patch was made before [45167] was committed.
<?php /* translators: %s: number of ratings */ echo sprintf( __( '(%s ratings) <span class="screen-reader-text">link to view ratings opens in a new tab</span>' ), '{{ data.num_ratings }}' );
and
<?php printf( '%1$s<span class="screen-reader-text"> %2$s</span>', /* translators: %s: number of ratings */ sprintf( __( '(%s ratings)' ), '{{ data.num_ratings }}' ), /* translators: accessibility text */ __( '(opens in a new tab)' ) );
The first string was unnecessary introduced in [44975]. There were already solutions for both main and accessibility texts.
'The email could not be sent.' ) . "<br />\n" . __( 'Possible reason: your host may have disabled the mail() function.'
and
'The email could not be sent. Possible reason: your host may have disabled the mail() function.'
In the error in the past, this message was split in two strings merged with <br>
tag. [44973] introduced this message as one string. I don't think there is need for old case and instead I propose to always use message in one string.
Attachments (1)
Change History (13)
#3
@
5 years ago
@ramiy Like I said in a ticket description, this will not introduce any new string.
#4
@
5 years ago
- Keywords commit added
Thanks @dimadin. I reviewed and can confirm no new strings are introduced, only consolidation.
#5
@
5 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 45298:
#6
follow-up:
↓ 9
@
5 years ago
- Keywords fixed-major added; commit removed
Reopening for backport consideration.
#9
in reply to:
↑ 6
@
5 years ago
- Milestone changed from 5.2.1 to 5.2.2
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to desrosj:
Reopening for backport consideration.
Looks like this wasn't actually reopened, moving for 5.2.2 consideration.
@desrosj We usually don't change translation strings in minor versions. You should change the Milestone to 5.3.0