Opened 10 years ago
Closed 10 years ago
#2415 closed defect (bug) (fixed)
API doesn't return translated plugin infomation
| Reported by: | ocean90 | Owned by: | dd32 |
|---|---|---|---|
| Priority: | high | Milestone: | Plugin Directory v3.0 |
| Component: | Plugin Directory | Keywords: | |
| Cc: |
Description
The new code for the api.w.org endpoint returns only results in English because the translation filters are not registered. Plugins_Info_API::load_wordpress() sets $_SERVER['HTTP_HOST'] to wordpress.org which means get_locale() returns en_US.
I think we should set $_SERVER['HTTP_HOST'] to the site of the requested locale.
Change History (5)
#2
@
10 years ago
- Keywords needs-patch removed
- Milestone → Plugin Directory v3.0
- Priority normal → high
- Status reviewing → accepted
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I think I'd rather add a locale filter (which was the original intention), or define the locale for the request instead of changing the
HTTP_HOST.The filters should also be registered all the time (I guess) bailing early when
en_US.