Opened 11 years ago
Closed 11 years ago
#34275 closed defect (bug) (fixed)
Missing i18n in the WP_oEmbed_Controller class
| Reported by: | johnbillion | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Embeds | Version: | 4.4 |
| Severity: | normal | Keywords: | commit has-patch |
| Cc: | Focuses: |
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
@
11 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
@
11 years ago
- Keywords commit added; 2nd-opinion removed
- Owner set to
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+1
See also #34207. The latest patch there already introduces these suggestions.