Opened 9 years ago
Closed 9 years ago
#34275 closed defect (bug) (fixed)
Missing i18n in the WP_oEmbed_Controller class
Reported by: | johnbillion | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Embeds | Keywords: | commit has-patch |
Focuses: | Cc: |
Description
The WP_oEmbed_Controller::parse_query()
method includes the following line:
echo 'URL parameter missing';
The WP_oEmbed_Controller::json_response()
method includes the following line:
return 'Not implemented';
The WP_oEmbed_Controller::xml_response()
method includes the following line:
return 'Not implemented';
The first instance needs internationalizing. The second and third instances should either not output the 'Not implemented' string at all, or they should use the return value of get_status_header_desc( 501 )
.
Attachments (1)
Change History (6)
#2
@
9 years ago
I don't think that these error messages should be translatable. It's an API which should return them only in one language.
[35354] has replaced one instace of "Not implemented" with get_status_header_desc( 501 )
.
#3
@
9 years ago
- Keywords commit added; 2nd-opinion removed
- Owner set to ocean90
- Status changed from new to assigned
I'm inclined to go with 34275.patch, though there's a good argument that we should be translating the messages in get_status_header_desc()
- the HTTP status code is the only part that's meant to be machine read, the message is for humans. That's for a different ticket, though, should anyone feel that way inclined.
+1
See also #34207. The latest patch there already introduces these suggestions.