Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#41666 closed defect (bug) (fixed)

i18n: Use %s placeholders in wp-http

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

Old translation string:

  • Could not open handle for fopen() to %s

New translation string:

  • Could not open handle for %1$s to %2$s.

The function can be mistakenly changes by the translator. The best practice is to replace the fopen() function with a %s placeholder.

The patch also adds a period at the end of the sentence and adds translators comments.

Attachments (3)

fopen.png (23.5 KB) - added by ramiy 7 years ago.
41666.patch (1.6 KB) - added by ramiy 7 years ago.
41666.2.patch (1.6 KB) - added by ramiy 7 years ago.
add <code> tags around the function name

Download all attachments as: .zip

Change History (6)

@ramiy
7 years ago

@ramiy
7 years ago

#1 @ramiy
7 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 4.9
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

@ramiy
7 years ago

add <code> tags around the function name

#3 @SergeyBiryukov
7 years ago

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

In 41901:

I18N: Replace function name in error message in WP_Http_Curl::request() and WP_Http_Streams::request() with a placeholder.

Props ramiy.
Fixes #41666.

Note: See TracTickets for help on using tickets.