WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 8 weeks ago

#47255 closed defect (bug) (fixed)

i18n: Use %s placeholders in instead of `mail()`

Reported by: ramiy Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Mail Keywords: has-screenshots has-patch
Focuses: administration Cc:

Description

Old translation string:

  • The email could not be sent. Possible reason: your host may have disabled the mail() function.

New translation string:

  • The email could not be sent. Possible reason: your host may have disabled the %s function.

Translators cam change the function name by mistake while translating the string. The best practice is to replace the mail() function with a %s placeholder.

The patch also adds translators comments.

Attachments (2)

47255.png (12.7 KB) - added by ramiy 2 months ago.
47255.patch (1.4 KB) - added by ramiy 2 months ago.

Download all attachments as: .zip

Change History (8)

@ramiy
2 months ago

@ramiy
2 months ago

#1 @ramiy
2 months ago

  • Keywords has-screenshots has-patch added

#2 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.3
  • Status changed from assigned to reviewing

#3 @SergeyBiryukov
8 weeks ago

The string in wp-login.php was changed in [45404]. I'm not sure yet whether the other string should also be updated for consistency (it depends on where it is displayed and whether it supports HTML). A new ticket should probably be opened for that.

For now, going with 47255.patch seems fine.

#4 follow-up: @ramiy
8 weeks ago

@SergeyBiryukov Why should we care whether it supports HTML? the strings has no HTML.

#5 in reply to: ↑ 4 @SergeyBiryukov
8 weeks ago

Replying to ramiy:

Why should we care whether it supports HTML? the strings has no HTML.

The current one doesn't have HTML, but the one introduced in [45404] does. I was wondering if that new string could also be used in WP_Recovery_Mode_Email_Service. For now, left a comment on #39110: comment:17:ticket:39110.

#6 @SergeyBiryukov
8 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 45447:

I18N: Remove PHP function name from translatable string in WP_Recovery_Mode_Email_Service.

Props ramiy.
Fixes #47255.

Note: See TracTickets for help on using tickets.